Ignore:
Timestamp:
03/07/2006 08:25:40 PM (19 years ago)
Author:
Matthew Burgess <matthew@…>
Children:
2536b38
Parents:
98c3af0
Message:

Udev rules file update and improve the wording for module loading and persistent device naming

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/udev_update/BOOK@7413 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/network.xml

    r98c3af0 r37153e0  
    2424  class="directory">/etc/rc.d/rc*.d</filename>).</para>
    2525
     26  <sect2>
     27    <title>Creating stable names for network interfaces</title>
     28    <para>Instructions in this section are optional if you have only one
     29    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   
     40    <para>First, find out the MAC addresses of your network cards:</para>
     41<screen role="nodump"><userinput>grep -H . /sys/class/net/*/address</userinput></screen>
     42    <para>For each network card (but not for the loopback interface),
     43    invent a descriptive name, such as <quote>realtek</quote>, and create
     44    Udev rules similar to the following:</para>
     45
     46<screen role="nodump"><userinput>
     47cat &gt; /etc/udev/rules.d/26-network.rules &lt;&lt; "EOF"
     48ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>52:54:00:12:34:56</replaceable>", NAME="<replaceable>realtek</replaceable>"
     49ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="<replaceable>00:a0:c9:78:9a:bc</replaceable>", NAME="<replaceable>intel</replaceable>"
     50EOF</userinput></screen>
     51
     52    <para>These rules will always rename the network cards to
     53    <quote>realtek</quote> and <quote>intel</quote>, independently of the
     54    original numbering provided by the kernel. Use these names instead of
     55    <quote>eth0</quote> in the network interface configuration files created
     56    below.</para>
     57
     58    <note><para>Persistent names must be different from the default network
     59    interface names assigned by the kernel.</para></note>
     60  </sect2>
    2661  <sect2>
    2762    <title>Creating Network Interface Configuration Files</title>
Note: See TracChangeset for help on using the changeset viewer.