- Timestamp:
- 03/25/2006 12:40:41 PM (19 years ago)
- Children:
- c0d9af5
- Parents:
- e44b6e36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/network.xml
re44b6e36 r6d8d38c 26 26 <sect2> 27 27 <title>Creating stable names for network interfaces</title> 28 28 29 <para>Instructions in this section are optional if you have only one 29 30 network card.</para> 30 31 <para>With Udev and modular network drivers, the network interface 32 numbering is not persistent across reboots by default, because the 33 drivers are loaded in parallel and, thus, in random order. 34 For example, on a computer having two network cards made by Intel and 35 Realtek, the network card manufactured by Intel may become eth0 and the 36 Realtek card becomes eth1. In some cases, after a reboot the cards get 37 renumbered the other way around. To avoid this, create Udev rules that 38 assign stable names to network cards based on their MAC addresses.</para> 39 31 32 <para>With Udev and modular network drivers, the network interface numbering 33 is not persistent across reboots by default, because the drivers are loaded 34 in parallel and, thus, in random order. For example, on a computer having 35 two network cards made by Intel and Realtek, the network card manufactured 36 by Intel may become <filename class="devicefile">eth0</filename> and the 37 Realtek card becomes <filename class="devicefile">eth1</filename>. In some 38 cases, after a reboot the cards get renumbered the other way around. To 39 avoid this, create Udev rules that assign stable names to network cards 40 based on their MAC addresses.</para> 41 40 42 <para>First, find out the MAC addresses of your network cards:</para> 43 41 44 <screen role="nodump"><userinput>grep -H . /sys/class/net/*/address</userinput></screen> 45 42 46 <para>For each network card (but not for the loopback interface), 43 47 invent a descriptive name, such as <quote>realtek</quote>, and create 44 48 Udev rules similar to the following:</para> 45 49 46 <screen role="nodump"><userinput> 47 cat > /etc/udev/rules.d/26-network.rules << "EOF" 48 ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>52:54:00:12:34:56</replaceable>", NAME="<replaceable>realtek</replaceable>" 49 ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>00:a0:c9:78:9a:bc</replaceable>", NAME="<replaceable>intel</replaceable>" 50 <screen role="nodump"><userinput>cat > /etc/udev/rules.d/26-network.rules << "EOF" 51 <literal>ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>52:54:00:12:34:56</replaceable>", NAME="<replaceable>realtek</replaceable>" 52 ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>00:a0:c9:78:9a:bc</replaceable>", NAME="<replaceable>intel</replaceable>"</literal> 50 53 EOF</userinput></screen> 51 54 … … 56 59 below.</para> 57 60 58 <note><para>Persistent names must be different from the default network 59 interface names assigned by the kernel.</para></note> 61 <note> 62 <para>Persistent names must be different from the default network 63 interface names assigned by the kernel.</para> 64 </note> 65 60 66 </sect2> 67 61 68 <sect2> 62 69 <title>Creating Network Interface Configuration Files</title>
Note:
See TracChangeset
for help on using the changeset viewer.