If you move your hard drive(s) around to other computers/servers, you'll find that your eth0 keeps getting higher, the first time it will become eth1 and then eth2 etc and even higher if your server has dual or quad NICs. The reason is that udevd basically assigns eth0 tot he first NIC it finds and remembers it, if it encounters a NIC with a different MAC, it assigns it one higher (eg. eth1).
See the example below, I have eth2 now so how do I fix it?
ifconfig
eth2 Link encap:Ethernet HWaddr 90:e6:ba:30:fb:0c
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::92e6:baff:fe30:fb0c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:62000457 errors:0 dropped:0 overruns:0 frame:0
TX packets:25890816 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3247729393 (3.2 GB) TX bytes:1775390659 (1.7 GB)
Interrupt:253 Base address:0xa000
vi /etc/udev/rules.d/70-persistent-net.rules
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.
# PCI device 0x10de:0x03ef (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:19:66:51:42:83", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="20:cf:30:79:a4:95", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e6:ba:30:fb:0c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
Remove the two entries at the top and then change the last entry where it says "eth2" to "eth0" and reboot your computer.
I thought restarting udevd and network/networking would enable it on the fly but it doesn't, I believe this is because Linux assigns a static device name at boot time only.
eth, itif, servers, ll, etc, server, dual, quad, nics, udevd, assigns, tot, nic, encounters, eg, ifconfig, encap, ethernet, hwaddr, fb, inet, addr, bcast, fe, baff, scope, broadcast, multicast, mtu, metric, rx, packets, errors, overruns, tx, carrier, collisions, txqueuelen, bytes, gb, xa, vi, udev, persistent, maintains, interfaces, syntax, entries, automatically, generator, pci, ef, forcedeth, subsystem, quot, drivers, attr, kernel, ec, cf, entry, reboot, restarting, networking, enable, doesn, linux, static,