Changeset 966b175 for chapter07/network.xml
- Timestamp:
- 07/12/2006 09:19:33 PM (18 years ago)
- 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:
- 8964be9
- Parents:
- 77e97ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/network.xml
r77e97ae r966b175 38 38 cases, after a reboot the cards get renumbered the other way around. To 39 39 avoid this, create Udev rules that assign stable names to network cards 40 based on their MAC addresses .</para>40 based on their MAC addresses or bus positions.</para> 41 41 42 <para>First, find out the MAC addresses of your network cards:</para> 42 <para>If you are going to use MAC addresses to identify your network 43 cards, find the addresses with the following command:</para> 43 44 44 45 <screen role="nodump"><userinput>grep -H . /sys/class/net/*/address</userinput></screen> … … 49 50 50 51 <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> 52 <literal>ACTION=="add", SUBSYSTEM=="net", DRIVER=="?*", SYSFS{address}=="<replaceable>00:e0:4c:12:34:56</replaceable>", NAME="<replaceable>realtek</replaceable>" 53 ACTION=="add", SUBSYSTEM=="net", DRIVER=="?*", SYSFS{address}=="<replaceable>00:a0:c9:78:9a:bc</replaceable>", NAME="<replaceable>intel</replaceable>"</literal> 54 EOF</userinput></screen> 55 56 <para>The DRIVER=="?*" key prevents Udev from attempting to rename 8021Q 57 VLAN interfaces (not available without the Vlan package from 58 <ulink url="http://www.candelatech.com/~greear/vlan/"/>). 59 This is necessary since VLANs have the same MAC address as 60 the real network card.</para> 61 62 <!-- Yes, I know that VLANs are beyond BLFS. This is not the reason to get them 63 incorrect by default when every distro does this right. --> 64 65 <para>If you are going to use the bus position as a key, create 66 Udev rules similar to the following:</para> 67 68 <screen role="nodump"><userinput>cat > /etc/udev/rules.d/26-network.rules << "EOF" 69 <literal>ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0c.0</replaceable>", NAME="<replaceable>realtek</replaceable>" 70 ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0d.0</replaceable>", NAME="<replaceable>intel</replaceable>"</literal> 53 71 EOF</userinput></screen> 54 72 55 73 <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 74 <quote>realtek</quote> and <quote>intel</quote>, independently 75 of the original numbering provided by the kernel (i.e.: the original 76 <quote>eth0</quote> and <quote>eth1</quote> interfaces will no longer 77 exist, unless you put such <quote>descriptive</quote> names in the NAME 78 key). Use the descriptive names from the Udev rules instead 79 of <quote>eth0</quote> in the network interface configuration files 59 80 below.</para> 60 61 <note>62 <para>Persistent names must be different from the default network63 interface names assigned by the kernel.</para>64 </note>65 81 66 82 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.