September 22, 2008
Your network card in your linux box just got replaced. Or the onboard one on the mother board went bad and now you need to get it up. But Linux is not automatically recognizing the new card correctly.
Get to a terminal prompt. Type ifconfig to get the current mac address. Keep in mind that you may need to watch the boot up process to find out what your network card’s device name really is. It’s usually eth0, but em0 or even en0 are common. Also it may not be the first or ’0′ device, so eth1 is entirely valid. Out put will look something like this:
inet6 fe80::21f:5bff:fee8:b40d%en0 prefixlen 64 scopeid 0×4
inet 127.1.1.1 netmask 0xfffffc00 broadcast 127.1.1.255
media: autoselect (1000baseT
supported media: autoselect 10baseT/UTP
The MAC address is the 6 hexadecimal numbers on the line that says “ether” so 00:1f:5b:72:b4:aa is the MAC address. This number is also written on a sticker on almost every device with a network device these days. It’s even included on the outside box of many new computers as it’s a very distinctive number.
Next is to edit the file this info is kept in. Go to:
Edit (or totally remove if you’re using DHCP boot) the MAC address line. Save the file and reboot!