Ignore:
Timestamp:
04/13/2006 06:45:33 PM (18 years ago)
Author:
Archaic <archaic@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
a0d96d25
Parents:
dd7ed7b
Message:

Merged the udev_update branch to trunk.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/network.xml

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