User`s manual

TC-6110 Linux User's Manual Managing Communications
3-2
Configuring Network Interfaces
Configuring a Persistent Network Interface Naming Order
Debian Linux systems use the udev daemon to detect and enable new network interfaces and to manage the
device files that are created for them. Udev must be configured with rules that enforce a persistent interface
naming order. A persistent network interface naming order allows devices to be consistently named with the
same device node every time the machine is rebooted. This is important because settings are configured with
reference to a device name (e.g, eth1) associated with a particular device (e.g., your Broadcom gigabit
Ethernet card). If every time the system is rebooted the system randomly rearranges the naming of your
cardsfor instance, assigning your gigabit Ethernet card to eth2 and your 10/100 Ethernet card to eth1then
there will be no way to maintain a consistent configuration across restarts.
The rule for setting up network interfaces with a persistent naming order is found here:
/lib/udev/rules.d/75-persistent-net-generator.rules
and it looks like this:
# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:90:e8:00:de:a9", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth1"
#PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:90:e8:00:de:a8", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth0"
The above example indicates that the system has detected two Ethernet interfaces, and assigned them the
names eth0 (which is associated with the MAC address
00:90:e8:00:de:a8) and eth1 (associated with the
MAC address
00:90:e8:00:de:a9).
ATTENTION
When replacing or connecting a
network interface, the system may fail to remove the old record from
/etc/udev/rules.d/70
-persistent-net.rules. This could cause network interfaces to be detected
abnormally. To
avoid this problem, simply delete the 70-persistent-net.rules file and reboot the system.
ATTENTION
It may also be necessary to configure a persistent naming order for other system peripherals (e.g., storage
drives); to find out more, you may start with the Writing Udev Rules tutorial, found at Rac
tivated.Net:
http://www.reactivated.net/writing_udev_rules.html
Symantec also offers an effective tutorial,
Setting Persistent SCSI Device Names On Linux Using UDEV
,
found here:
http://www.symantec.com/business/support/index?page=content&id=TECH71007
To get an idea of what Udev can do for you, check out this Linux For You article from 2012, Some Nifty udev
R
ules and Examples:
http://www.linuxforu.com/2012/06/some
-nifty-udev-rules-and-examples/