diff options
Diffstat (limited to 'chapter07')
-rw-r--r-- | chapter07/network.xml | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chapter07/network.xml b/chapter07/network.xml index 3f476d550..f5dd1faa8 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -23,7 +23,7 @@ symlinks from all run-level directories (<filename class="directory">/etc/rc.d/rc*.d</filename>).</para> - <sect2> + <sect2 id='stable-net-names'> <title>Creating stable names for network interfaces</title> <para>If there is only one network interface in the system to be @@ -41,18 +41,19 @@ avoid this, Udev comes with a script and some rules to assign stable names to network cards based on their MAC address.</para> - <para>Pre-generate the rules to ensure the same names get assigned to the - same devices at every boot, including the first:</para> - -<screen><userinput>for NIC in /sys/class/net/* ; do - INTERFACE=${NIC##*/} udevadm test --action=add $NIC -done</userinput></screen> - - <para>Now, inspect the <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> - file, to find out which name was assigned to which network device:</para> + <para>The rules were pre-generated in the build instructions for + <application>udev (systemd)</application> in the last chapter. Inspect the + <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> file, to + find out which name was assigned to which network device:</para> <screen role="nodump"><userinput>cat /etc/udev/rules.d/70-persistent-net.rules</userinput></screen> + <note><para>In some cases such as when MAC addresess have been assigned to + a network card manually or in a virtual envirnment such as Xen, + the network rules file may not have been generated because addresses + are not consistently assigned. In these cases, just continue to + the next section.</para></note> + <para>The file begins with a comment block followed by two lines for each NIC. The first line for each NIC is a commented description showing its hardware IDs (e.g. its PCI vendor and device IDs, if it's a PCI card), |