Changeset 0cda898 for chapter07/network.xml
- Timestamp:
- 08/02/2011 02:15:42 AM (13 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.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:
- a2e555d
- Parents:
- 75fe599
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/network.xml
r75fe599 r0cda898 9 9 <?dbhtml filename="network.html"?> 10 10 11 <title> Configuring the network Script</title>11 <title>General Network Configuration</title> 12 12 13 13 <indexterm zone="ch-scripts-network"> … … 26 26 <sect2> 27 27 <title>Creating stable names for network interfaces</title> 28 29 <para>If there is only one network interface in the system to be 30 configured, this section is optional, although it will never be wrong to do 31 it. In many cases (e.g. a laptop with a wireless and a wired interface), 32 accomplishing the configuration in this section is necessary.</para> 28 33 29 34 <para>With Udev and modular network drivers, the network interface numbering … … 113 118 114 119 <para>Which interfaces are brought up and down by the network script 115 depends on the files and directories in the<filename116 class="directory">/etc/sysconfig/ network-devices</filename> hierarchy.117 This directory should contain a sub-directory for each interface to be118 configured, such as <filename>ifconfig.xyz</filename>, where119 <quote>xyz</quote> is a network interface name. Inside this directory120 would be files defining the attributes to this interface, such as its IP121 address(es), subnet masks, and so forth. </para>122 123 <para>The following command creates a sample <filename>ipv4</filename> 124 file for the <emphasis>eth0</emphasis> device:</para>125 126 <screen><userinput>cd /etc/sysconfig/network-devices 127 mkdir -v ifconfig.eth0 128 cat > ifconfig.eth0 /ipv4<< "EOF"120 depends on the files in <filename 121 class="directory">/etc/sysconfig/</filename>. This directory should 122 contain a file for each interface to be configured, such as 123 <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is is 124 meaningful to the administrator such as the device name (e.g. eth0). 125 Inside this file are attributes to this interface, such as its IP 126 address(es), subnet masks, and so forth. It is necessary that 127 the stem of the filename be <emphasis>ifconfig</emphasis>.</para> 128 129 <para>The following command creates a sample file for the 130 <emphasis>eth0</emphasis> device with a static IP address:</para> 131 132 <screen><userinput>cd /etc/sysconfig/ 133 cat > ifconfig.eth0 << "EOF" 129 134 <literal>ONBOOT=yes 135 IFACE=eth0 130 136 SERVICE=ipv4-static 131 137 IP=192.168.1.1 … … 136 142 137 143 <para>The values of these variables must be changed in every file to match 138 the proper setup. If the <envar>ONBOOT</envar> variable is set to 139 <quote>yes</quote> the network script will bring up the Network Interface 140 Card (NIC) during booting of the system. If set to anything but 141 <quote>yes</quote> the NIC will be ignored by the network script and not 142 be brought up.</para> 144 the proper setup.</para> 145 146 <para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the 147 network script will bring up the Network Interface Card (NIC) during 148 booting of the system. If set to anything but <quote>yes</quote> the NIC 149 will be ignored by the network script and not be automatically brought up. 150 The interface can be manually started or stopped with the 151 <command>ifup</command> and <command>ifdown</command> commands.</para> 152 153 <para>The <envar>IFACE</envar> variable defines the interface name, 154 for example, eth0. It is required for all network device configuration 155 files. </para> 143 156 144 157 <para>The <envar>SERVICE</envar> variable defines the method used for 145 158 obtaining the IP address. The LFS-Bootscripts package has a modular IP 146 159 assignment format, and creating additional files in the <filename 147 class="directory">/etc/sysconfig/network-devices/services</filename> 148 directory allows other IP assignment methods. This is commonly used for 149 Dynamic Host Configuration Protocol (DHCP), which is addressed in the 150 BLFS book.</para> 160 class="directory">/lib/boot/</filename> directory allows other IP 161 assignment methods. This is commonly used for Dynamic Host Configuration 162 Protocol (DHCP), which is addressed in the BLFS book.</para> 151 163 152 164 <para>The <envar>GATEWAY</envar> variable should contain the default … … 190 202 EOF</userinput></screen> 191 203 204 <para>The <varname>domain</varname> statement can be omitted 205 or replaced with a <varname>search</varname> statement. See the man page for 206 resolv.conf for more details.</para> 207 192 208 <para>Replace <replaceable><IP address of the nameserver></replaceable> 193 209 with the IP address of the DNS most appropriate for the setup. There will … … 197 213 may also be a router on the local network.</para> 198 214 215 <note><para>The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4.</para></note> 216 199 217 </sect2> 200 218
Note:
See TracChangeset
for help on using the changeset viewer.