Debian Admin - Your way to Debian World

November 16, 2006

Change your Network card MAC ( Media Access Control) address

by @ 4:21 pm. Filed under Network

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Media Access Control address, a hardware address that uniquely identifies each node of a network. In IEEE 802 networks, the Data Link Control (DLC) layer of the OSI Reference Model is divided into two sublayers: the Logical Link Control (LLC) layer and the Media Access Control (MAC) layer. The MAC layer interfaces directly with the network medium.Consequently, each different type of network medium requires a different MAC layer. On networks that do not conform to the IEEE 802 standards but do conform to the OSI Reference Model, the node address is called the Data Link Control (DLC) address.

If you want to change your network card mac address you need to use simple utility called mac changer.MAC changer is a utility for manipulating the MAC address of network interfaces

Possible usages

You’re in a DHCP network with some kind of IP-based restriction

You’ve a cluster that boot with BOOTP and you want to have a clean set of MACs

Debug MAC based routes

MAC Changer Features

Set specific MAC address of a network interface

Set the MAC randomly

Set a MAC of another vendor

Set another MAC of the same vendor

Set a MAC of the same kind (eg: wireless card)

Display a vendor MAC list (today, 6800 items) to choose from

Install MAC Changer in Debian

#apt-get install macchanger

Install MAC Changer in Ubuntu

sudo apt-get install macchanger

This will complete the installation.

If you Find your MAC address using the following command

ifconfig

eth0 Link encap:Ethernet HWaddr 00:0C:29:A8:D0:FA
inet addr:172.20.22.35 Bcast:172.20.22.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fea8:d0fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7690 errors:0 dropped:0 overruns:0 frame:0
TX packets:6399 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4284579 (4.0 MiB) TX bytes:876317 (855.7 KiB)
Interrupt:177 Base address:0×1080

In the above example MAC Address is 00:0C:29:A8:D0:FA

If you want to configure MAC Changer you need to stop the networking services using the following command

For Debian Users

#/etc/init.d/networking stop

For Ubuntu Users

sudo /etc/init.d/networking stop

Now you need to configure your MAC address using the following examples

MAC Changer Syntax

macchanger [options] device

Examples

# macchanger eth1

Current MAC: 00:09:a5:eb:23:f7 (Hansung Eletronic Industries Development Co., Ltd)
Faked MAC: 00:09:a5:eb:23:f8 (Hansung Eletronic Industries Development Co., Ltd)

# macchanger --endding eth1

Current MAC: 00:09:a5:eb:23:f8 (Hansung Eletronic Industries Development Co., Ltd)
Faked MAC: 00:09:a5:6f:31:23 (Hansung Eletronic Industries Development Co., Ltd)

# macchanger --another eth1

Current MAC: 00:09:a5:6f:31:23 (Hansung Eletronic Industries Development Co., Ltd)
Faked MAC: 00:11:18:5b:3a:1f (Blx Ic Design Corp., Ltd.)

# macchanger -A eth1

Current MAC: 00:06:5b:f6:f3:48 (Dell Computer Corp.)
Faked MAC: 00:0d:11:93:0c:4f (Dentsply - Gendex)

# macchanger -r eth1

Current MAC: 00:0d:11:93:0c:4f (Dentsply - Gendex)
Faked MAC: 3c:f1:89:f9:1f:ce (unknown)

# macchanger --mac=01:23:45:67:89:AB eth1

Current MAC: 00:40:96:43:87:65 [wireless] (Cisco/Aironet 4800/340)
Faked MAC: 01:23:45:67:89:ab (unknown)

# ./macchanger --list=Cray

Misc MACs:
Num MAC Vendor
— — ——
065 - 00:00:7d - Cray Research Superservers,Inc
068 - 00:00:80 - Cray Communications (formerly Dowty Network Services)
317 - 00:40:a6 - Cray Research Inc.

Here is the list of available options for MAC Changer

-h, -help

Show summary of options.

-V, -version

Show version of program.

-e, -endding

Don’t change the vendor bytes.

-a, -another

Set random vendor MAC of the same kind.

-A Set random vendor MAC of any kind.

-r, -random

Set fully random MAC.

-l, -list[=keyword]

Print known vendors (with keyword in the vendor’s description string)

-m, --mac XX:XX:XX:XX:XX:XX

Set the MAC XX:XX:XX:XX:XX:XX

If you completed the your MAC address changes you need to start the networking service using the following command

For Debian Users

#/etc/init.d/networking start

For Ubuntu Users

sudo /etc/init.d/networking start

Tags: , , , , ,

10 Responses to “Change your Network card MAC ( Media Access Control) address”

  1. Robert Emil Berge Says:

    It is possible to change the mac address with the ifconfig command as well, but without most of the features of MAC changer.
    Just write eg.: ifconfig eth1 hw ether 01:23:45:67:89:ab

  2. Vonskippy Says:

    And this is easier??? then:

    ifconfig eth0 down hw ether 00:00:00:00:00:01
    ifconfig eth0 up

  3. Jure Kodzoman Says:

    It is also possible to set this in you /etc/network/interfaces, so it stays active even after reboot. I don’t see much point in this software?

    /etc/network/interfaces
    —–
    auto eth0
    iface eth0 inet dhcp
    hwaddress ether 01:23:45:67:89:AB
    —–

  4. Bill Gates Says:

    i also think that programme is useless except the manufacture database

  5. kid Says:

    I think that program is great I need a different mac ever boot how do I load macchanger on boot?

  6. Mak Says:

    its not working any more

  7. JohnR Says:

    You guys are missing the point of this software- it’s to get a DIFFERENT, RANDOM MAC every time you bootup.

  8. MikkelM Says:

    I’ve created a script to run at the start at a session that set a new and random MAC address for my network connections on my computer at startup using this macchanger tool. This is tested on my Ubuntu 7.04 installation with Gnome Network Manager removed and Wicd installed instead. eth0 is my wired connection and eth1 my wireless connection.

    1. Create a sh script with these commands to E.G. “randomMac.sh”:
    killall /opt/wicd/daemon.py # closes use of eth1 by Wicd
    sleep 1

    ifconfig eth1 down # deactivate eth1

    macchanger -A eth0 # change mac address for eth0

    sleep 1 # wait a little to get different random mac addresses

    macchanger -A eth1 # change mac address for eth1

    ifconfig eth1 up # activates eth1

    sleep 1

    /opt/wicd/daemon.py 2> /dev/null # starts Wicd daemon again

    sleep 4

    /opt/wicd/tray-dapper.py 2> /dev/null # starts the Wicd tray

    2. Read the current mac addresses with the tool ifconfig.
    3. Run the script with the command “sudo sh randomMac.sh”.
    4. If the mac addresses is changed correct with the script then add the command “sudo sh randomMac.sh” to your session.

    This works for me. If gnome network manager is used instead of Wicd then some other way of closing it’s use of the wireless connection so macchanger can change the mac address.

  9. KA Says:

    People! What are you talking about??? I want to change my Mac address and I know nothing about computers! What shall I do? I don’t trust that softwares you can dawnload from the internet. Can you tell me how to do it step by step? Please???

  10. Kanagasabai Says:

    00-40-F4-CE-92-33
    The above MAC number is live number in my PC, now i want to change my MAC number to 00-19-D1-1E-E2-12.

    how to change my MAC number. If once changed any problem occur in feature.

    sabai

Leave a Reply

Subscribe RSS Feed

subscribe to the Debian Admin RSS feed

Internal links:

Sponsors:



Categories:

Support Debian Admin

Amount $:
Website(Optional):

Sponsors:

Archives:

Related Links:


Favourite Sites:

Wordpress Collection
Windows Reference
Ubuntu Geek
DebianHelp
All About Debian Tutorials
Power Electrical
Check Your IP Here
Debian,Ubuntu News
DebCentral
Tuxmachines
Capnkirby
Libervis
Nuxifield
Linux Horizon
Linux Appfinder
Debuntu
GNU/Linux For Everyone
Free Penguin
DebianAdmin is not related to the Debian Project.
This site is copyright © 2006,2007 Debian Admin
All Trademarks are the property of their respective owners.
The contents of this website may not be mirrored or archived without the express written permission of DebianAdmin Site Owner.

DISCLAIMER: All the information, troubleshooting methods, utilities offered in this website is provided AS-IS, without any warranties. Though I strive for perfection, and always test the validity and effectiveness of the troubleshooting content in various systems, I assume no responsibility for your use of these Fixes, Utilities and other troubleshooting advice. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. All use is completely at your own risk. Changes to the existing content and new additions are made to this website periodically, without notification.
Rodney's Kontera DynamiContext Plugin plugged in.