MAC address

From LQWiki
Jump to navigation Jump to search

A MAC address (Media Access Control) is a physical address used to identify every network card or interface on a network uniquely. This means that the MAC address is statically assigned by the manufacturer and cannot be changed by the user. This ensures that no 2 network cards share the same MAC address.

The MAC address number registration is handled by the IEEE and can be found on their website.

Discovering your MAC address

You can find your MAC address with ifconfig:

# /sbin/ifconfig eth0

There should be an entry "HWaddr" on the first line that tells the hardware address for your network card.

Changing the address

In Linux the MAC address can be changed with most network card drivers. This can be useful in cases where there is security based on MAC addresses and you get a new network card. Example to change it:

# ifconfig eth0 hw ether 00:00:00:00:00:00

This just changes it in the software drivers, not the actual MAC address on the hardware (so it has to be done after every boot). Some on-board network cards allow the address to be changed in the BIOS.