SUMMARY
Modifying NIC Settings for Motherboard Replacement to address network connection issues
ISSUE
After a motherboard replacement, eth0 and eth1 have disappeared with eth2 and eth3 are present.
RESOLUTION
1. Run ifconfig to show current NIC's being used.
eth2 Link encap:Ethernet HWaddr 00:BB:1A:2B:C3:D4
inet addr:172.100.1.0 Bcast:172.100.1.255 Mask:255.255.255.0
inet6 addr: fe80::225:90ff:fe9a:cdcc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9444387435 errors:0 dropped:132 overruns:0 frame:0
TX packets:1314219125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13805476062408 (12.5 TiB) TX bytes:390710362058 (363.8 GiB)
Interrupt:169 Memory:fb4e0000-fb500000
eth3 Link encap:Ethernet HWaddr 00:CC:1A:2B:C3:D4
inet addr:172.100.1.1 Bcast:172.100.1.255 Mask:255.255.255.0
inet6 addr: fe80::225:90ff:fe9a:dcdd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9444387435 errors:0 dropped:132 overruns:0 frame:0
TX packets:1314219125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13805476062408 (12.5 TiB) TX bytes:390710362058 (363.8 GiB)
Interrupt:169 Memory:fb4e0000-fb500000
2. Verify the following file by running the command to see what the system has as the NIC's:
vi /etc/udev/rules.d/70-persistent-net.rules (file name varies, try this 1st)
Output below:
# PCI device 0x8086:0x10d3 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:ea:39:80", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x10d3 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:ea:39:81", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x10d3 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:bb:1a:2b:c3:d4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x8086:0x10d3 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:cc:1a:2b:c3:d4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
3. Remove or Comment out the eth0 and eth1 lines from the file and rename eth2 and eth3 to eth0 and eth1.
4. From command line type the following:
cd /etc/sysconfig/network-scripts/
ls
Output below:
ifcfg-eth2 ifdown ifdown-ippp ifdown-isdn ifdown-routes ifdown-tunnel ifup-bnep ifup-ippp ifup-ipx ifup-plusb ifup-routes ifup-tunnel net.hotplug route-eth2
ifcfg-eth3 ifdown-bnep ifdown-ipsec ifdown-post ifdown-sit ifup ifup-eth ifup-ipsec ifup-isdn ifup-post ifup-sit ifup-wireless network-functions
ifcfg-lo ifdown-eth ifdown-ipv6 ifdown-ppp ifdown-sl ifup-aliases ifup-ib ifup-ipv6 ifup-plip ifup-ppp ifup-sl init.ipv6-global network-functions-ipv6
5. vi both "ifcfg-eth2" and "ifcfg-eth3":
Output below:
# Intel Corporation 82574L Gigabit Network Connection
DEVICE=eth2
BOOTPROTO=none
HWADDR=00:BB:1A:2B:C3:D4
ONBOOT=yes
IPADDR=172.100.1.0
NETMASK=255.255.255.0
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
DHCP_HOSTNAME=Recovery-***
GATEWAY=172.100.1.1
METRIC=0
6. Copy "ifcfg-eth2" and "ifcfg-eth3" to "ifcfg-eth0" and "ifcfg-eth1"
7. Change the file by using "vi" to meet the specifications of "ifcfg-eth0" and "ifcfg-eth1"
8. Remove "ifcfg-eth2" and "ifcfg-eth3":
rm -rf ifcfg-eth2
rm -rf ifcfg-eth3
9. View the "route-eth2" file and validate that the routing information is correct for the system:
cat route-eth2
Output below:
172.100.1.0/24 via 172.100.1.1 dev eth2 table eth2
default via 172.100.1.1 dev eth0 table eth2
10. Change the name of the "route-eth2" file to "route-eth0" with the below command and then "vi" the file to change all "eth2" entries to "eth0":
mv route-eth2 route-eth0
11. Reboot the system
12. Once the system is back up, run ifconfig, and validate that the NIC's show "eth0" and "eth1"
eth0 Link encap:Ethernet HWaddr 00:BB:1A:2B:C3:D4
inet addr:172.100.1.0 Bcast:172.100.1.255 Mask:255.255.255.0
inet6 addr: fe80::225:90ff:fe9a:cdcc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9444387435 errors:0 dropped:132 overruns:0 frame:0
TX packets:1314219125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13805476062408 (12.5 TiB) TX bytes:390710362058 (363.8 GiB)
Interrupt:169 Memory:fb4e0000-fb500000
eth1 Link encap:Ethernet HWaddr 00:CC:1A:2B:C3:D4
inet addr:172.100.1.1 Bcast:172.100.1.255 Mask:255.255.255.0
inet6 addr: fe80::225:90ff:fe9a:dcdd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9444387435 errors:0 dropped:132 overruns:0 frame:0
TX packets:1314219125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13805476062408 (12.5 TiB) TX bytes:390710362058 (363.8 GiB)
Interrupt:169 Memory:fb4e0000-fb500000
NOTES
Additional Resources:
/etc/udev/rules.d/70-persistent-net.rules -
http://www.linuxquestions.org/questions/linux-networking-3/overriding-etc-udev-rules-d-70-persistent-net-rules-903234/
http://unix.stackexchange.com/questions/110496/cloned-linux-system-and-etc-udev-rules-d-70-persistent-net-rules
udev -
http://linux.die.net/man/8/udev
http://linux.die.net/man/7/udev