If you have multiple interfaces installed in the CDRouter Linux host you may see that the interface names are occasionally juggled. This can be frustrating, especially if you have a known set of configurations and want to avoid checking and editing the interface names each time you run a test. We recommend assigning persistent names to each interface to avoid this problem.
On Debian-based systems, persistent names can be created by adding specific entries for each interface in the /etc/iftab file. This file can be edited manually using your favorite editor:
# vi /etc/iftab
Simple entries can be made for each interface as follows. Refer to the iftab man pages for more information.
eth0 mac 00:11:22:33:44:55 arp 1 eth1 mac aa:bb:cc:dd:ee:ff arp 1
Note for Ubuntu 7.10 and later users: Starting with Ubuntu 7.10, you must now define persistent names for interfaces in the /etc/udev/rules.d/70-persistent-net.rules file. To assign persistent names, edit this file with your favorite text editor and assign interface names to each of the MAC addresses that appears in this file.
# vi /etc/udev/rules.d/70-persistent-net.rules
Red Hat-based distributions handle this a little differently. You can simply modify the DEVICE and HWADDR variables for each interface in the /etc/sysconfig/network-scripts/ directory. To create persistent names for each interface, simply edit the associated file for each interface and modify these two variables accordingly. Following a reboot your network interfaces names should be persistent across reboots.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
For example, to create a persistent name of eth0 for the interface with a MAC address of 00:11:22:33:44:55, the ifcfg-eth0 file would be modified as follows.
DEVICE=eth0 HWADDR=00:11:22:33:44:55 . . .