- Timestamp:
- 10/24/2006 01:41:23 AM (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:
- e88ab625
- Parents:
- dbfd971
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/network.xml
rdbfd971 ra804834 72 72 </note> 73 73 74 <para>If you are going to use the bus position as a key, create 75 Udev rules similar to the following:</para> 74 <para>If you are going to use the bus position as the key, find the 75 position of each card with the following commands:</para> 76 77 <screen role="nodump"><userinput>for dir in /sys/class/net/* ; do 78 [ -e $dir/device ] && { 79 basename $dir ; readlink -f $dir/device 80 } 81 done</userinput></screen> 82 83 <para>This will yield output similar to:</para> 84 85 <screen role="nodump"><userinput><replaceable>eth0</replaceable> 86 /sys/devices/pci0000:00/<replaceable>0000:00:0c.0</replaceable> 87 <replaceable>eth1</replaceable> 88 /sys/devices/pci0000:00/<replaceable>0000:00:0d.0</replaceable></userinput></screen> 89 90 <para>In this example, <replaceable>eth0</replaceable> has PCI bus position 91 <replaceable>0000:00:0c.0</replaceable> (domain 0000, bus 00, device 0c, 92 function 0), and <replaceable>eth1</replaceable> has PCI bus position 93 <replaceable>0000:00:0d.0</replaceable> (domain 0000, bus 00, device 0d, 94 function 0).</para> 95 96 <para>Now create Udev rules similar to the following:</para> 76 97 77 98 <screen role="nodump"><userinput>cat > /etc/udev/rules.d/26-network.rules << EOF 78 <literal>ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0c.0</replaceable>", \99 <literal>ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", KERNELS=="<replaceable>0000:00:0c.0</replaceable>", \ 79 100 NAME="<replaceable>realtek</replaceable>" 80 ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", ID=="<replaceable>0000:00:0d.0</replaceable>", \101 ACTION=="add", SUBSYSTEM=="net", BUS=="<replaceable>pci</replaceable>", KERNELS=="<replaceable>0000:00:0d.0</replaceable>", \ 81 102 NAME="<replaceable>intel</replaceable>"</literal> 82 103 EOF</userinput></screen> 83 104 84 <para> These rules will always rename the network cards to85 <quote>realtek</quote> and <quote>intel</quote>, independently86 of the original numbering provided by the kernel (i.e.: the original87 <quote>eth0</quote> and <quote>eth1</quote> interfaces will no longer88 exist, unless you put such <quote>descriptive</quote> names in the NAME89 key). Use the descriptive names from the Udev rules instead90 of<quote>eth0</quote> in the network interface configuration files105 <para>Regardless of which method you use, these rules will always rename 106 the network cards to <quote>realtek</quote> and <quote>intel</quote>, 107 independently of the original numbering provided by the kernel (i.e.: the 108 original <quote>eth0</quote> and <quote>eth1</quote> interfaces will no 109 longer exist, unless you put such <quote>descriptive</quote> names in the 110 NAME key). Use the descriptive names from the Udev rules instead of 111 <quote>eth0</quote> in the network interface configuration files 91 112 below.</para> 92 113
Note:
See TracChangeset
for help on using the changeset viewer.