Changeset cba2d4e for chapter07/network.xml
- Timestamp:
- 04/03/2014 09:52:09 PM (10 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, 7.6, 7.7, 7.8, 7.9, 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:
- 9839808
- Parents:
- 008436e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/network.xml
r008436e rcba2d4e 43 43 to network cards based on their MAC address.</para> 44 44 45 <para>The rules were pre-generated in the build instructions for 46 <application>udev (systemd)</application> in the last chapter. Inspect the 45 <para>If using the traditional network interface names such as eth0 is desired, 46 generate a custom Udev rule:</para> 47 48 <screen><userinput>bash /lib/udev/init-net-rules.sh</userinput></screen> 49 50 <para> Now, inspect the 47 51 <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> file, to 48 52 find out which name was assigned to which network device:</para> … … 123 127 class="directory">/etc/sysconfig/</filename>. This directory should 124 128 contain a file for each interface to be configured, such as 125 <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is 126 meaningful to the administrator such as the device name (e.g. eth0). 127 Inside this file are attributes to this interface, such as its IP 128 address(es), subnet masks, and so forth. It is necessary that 129 the stem of the filename be <emphasis>ifconfig</emphasis>.</para> 129 <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is required to 130 be a Network Card Interface name (e.g. eth0). Inside this file are 131 attributes to this interface, such as its IP address(es), subnet masks, and 132 so forth. It is necessary that the stem of the filename be 133 <emphasis>ifconfig</emphasis>.</para> 134 135 <note><para>If the procedure in the previous section was not used, Udev 136 will assign network card interface names based on system physical 137 characteristics such as enp2s1. If you are not sure what your interface 138 name is, you can always run <command>ip link</command> after you have 139 booted your system. Again, it is important that ifconfig.xyz is named 140 after correct network card interface name (e.g. ifconfig.enp2s1 or 141 ifconfig.eth0) or your network interface will not be initialized during 142 the boot process.</para></note> 130 143 131 144 <para>The following command creates a sample file for the … … 137 150 IFACE=eth0 138 151 SERVICE=ipv4-static 139 IP=192.168.1. 1140 GATEWAY=192.168.1. 2152 IP=192.168.1.2 153 GATEWAY=192.168.1.1 141 154 PREFIX=24 142 155 BROADCAST=192.168.1.255</literal> … … 147 160 148 161 <para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the 149 network script will bring up the Network Interface Card (NIC) during162 System V network script will bring up the Network Interface Card (NIC) during 150 163 booting of the system. If set to anything but <quote>yes</quote> the NIC 151 164 will be ignored by the network script and not be automatically brought up. … … 182 195 </sect2> 183 196 197 <sect2 id="systemd-net-enable"> 198 <title>Configuring the Network Interface Card at boot (systemd)</title> 199 200 <para>Enabling of the network interface card configuration 201 in systemd is done per interface. To enable network interface card 202 configuration at boot, run:</para> 203 204 <screen><userinput>systemctl enable ifupdown@eth0</userinput></screen> 205 206 <para>To disable a previously enabled network interface 207 card configuration at boot, run:</para> 208 209 <screen><userinput>systemctl disable ifupdown@eth0</userinput></screen> 210 211 <para>To manually start the network interface card configuration, 212 run:</para> 213 214 <screen><userinput>systemctl start ifupdown@eth0</userinput></screen> 215 216 <para>Replace eth0 with the correct network interface card 217 name as described on the beginning of this page.</para> 218 219 <note><para>The network card can also be started or stopped 220 with the traditional <command>ifup <device></command> or 221 <command>ifdown <device></command> commands.</para></note> 222 223 </sect2> 224 184 225 <sect2 id="resolv.conf"> 185 226 <title>Creating the /etc/resolv.conf File</title>
Note:
See TracChangeset
for help on using the changeset viewer.