Changing your NIC MAC address on Linux.
Leave a commentSeptember 20, 2012 by aubreykloppers
Weird thing happened to me after crashing a ‘bonded’ network. The MAC address on two devices became the same!
root@NAS:/etc/udev# ifconfig -a
eth0 Link encap:Ethernet HWaddr 40:61:86:5c:67:c2
inet addr:129.47.16.11 Bcast:129.47.16.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16102 errors:0 dropped:0 overruns:0 frame:0
TX packets:48143 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2018097 (1.9 MiB) TX bytes:20296511 (19.3 MiB)
Interrupt:27 Base address:0x2000eth1 Link encap:Ethernet HWaddr 40:61:86:5c:67:c2
inet addr:129.47.16.12 Bcast:129.47.16.255 Mask:255.255.255.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:6341 errors:0 dropped:0 overruns:0 frame:0
TX packets:26758 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:774341 (756.1 KiB) TX bytes:11077262 (10.5 MiB)
Interrupt:16 Base address:0x6c00lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5352 errors:0 dropped:0 overruns:0 frame:0
TX packets:5352 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2189399 (2.0 MiB) TX bytes:2189399 (2.0 MiB)root@NAS:/etc/udev# ifconfig eth1 down
root@NAS:/etc/udev# ifconfig eth1 hw ether 40:61:86:5c:67:c3
root@NAS:/etc/udev# ifconfig eth1 up
root@NAS:/etc/udev# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 40:61:86:5c:67:c3
inet addr:129.47.16.12 Bcast:129.47.16.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6341 errors:0 dropped:0 overruns:0 frame:0
TX packets:26760 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:774341 (756.1 KiB) TX bytes:11078395 (10.5 MiB)
Interrupt:16 Base address:0x6c00root@NAS:/etc/udev# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 40:61:86:5c:67:c2
inet addr:129.47.16.11 Bcast:129.47.16.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16938 errors:0 dropped:0 overruns:0 frame:0
TX packets:51635 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2096509 (1.9 MiB) TX bytes:21839230 (20.8 MiB)
Interrupt:27 Base address:0x2000root@NAS:/etc/udev# ifconfig -a
eth0 Link encap:Ethernet HWaddr 40:61:86:5c:67:c2
inet addr:129.47.16.11 Bcast:129.47.16.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16975 errors:0 dropped:0 overruns:0 frame:0
TX packets:51835 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2101014 (2.0 MiB) TX bytes:21855463 (20.8 MiB)
Interrupt:27 Base address:0x2000eth1 Link encap:Ethernet HWaddr 40:61:86:5c:67:c3
inet addr:129.47.16.12 Bcast:129.47.16.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6348 errors:0 dropped:0 overruns:0 frame:0
TX packets:26761 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:774761 (756.6 KiB) TX bytes:11078449 (10.5 MiB)
Interrupt:16 Base address:0x6c00lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5601 errors:0 dropped:0 overruns:0 frame:0
TX packets:5601 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2211743 (2.1 MiB) TX bytes:2211743 (2.1 MiB)