On many
NICs, the MAC address can be changed during operation of the card. This can pose interesting problems for the
network administrators of
colleges and other institutions full of
clever people.
Under Linux, you can change the MAC addresses of your network interfaces with the ifconfig(8) command. To change the MAC address of your first Ethernet interface to the constant 0xDEADBEEF, use the following:
ifconfig eth0 hw ether 00:00:DE:AD:BE:EF
Please note: Not all
Ethernet cards support changing the MAC address. On some networks, particularly those using a
VLAN model or MAC-based
filtering, changing this address may cause your
connectivity to go away. On
most networks, your network administrator will not appreciate it if you do things like this frequently.
Update, July 2001: I recently had cause to change the MAC address on a user's computer. The NIC had been damaged slightly in a power outage, and was coming up with an invalid address on boot. (Hint: The first byte of a host MAC address is always an even number.) So I set it to 00:DE:AD:BE:EF:01 using the above technique. This let the system get on the network, and hence let the user get his files backed up before getting a new NIC.