Changes in chapter09/networkd.xml [ce779ec:ba40e32]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter09/networkd.xml
rce779ec rba40e32 317 317 range 0-255.</para> 318 318 319 <para>A valid private IP address could be 192.168.1.1. A valid FQDN for 320 this IP could be lfs.example.org.</para> 321 322 <para>Even if not using a network card, a valid FQDN is still required. 323 This is necessary for certain programs, such as MTAs, to operate properly.</para> 324 325 <!-- 326 <para>Create the /etc/hosts file using the following command:</para> 327 328 <screen role="nodump"><userinput>cat > /etc/hosts << "EOF" 319 <para>A valid private IP address could be 192.168.1.1.</para> 320 321 <para>If the computer is to be visible to the Internet, a valid FQDN 322 can be the domain name itself, or a string resulted by concatenating a 323 prefix (often the hostname) and the domain name with a <quote>.</quote> 324 character. And, you need to contact the domain provider to resolve the 325 FQDN to your public IP address.</para> 326 327 <para>Even if the computer is not visible to the Internet, a FQDN is 328 still needed for certain programs, such as MTAs, to operate properly. 329 A special FQDN, <literal>localhost.localdomain</literal>, can be used 330 for this purpose.</para> 331 332 <para>Create the <filename>/etc/hosts</filename> file using the following 333 command:</para> 334 335 <screen><userinput>cat > /etc/hosts << "EOF" 329 336 <literal># Begin /etc/hosts 330 337 331 127.0.0.1 localhost.localdomain localhost 332 127.0.1.1 <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> 333 ::1 localhost ip6-localhost ip6-loopback 338 <replaceable><192.168.0.2></replaceable> <replaceable><FQDN></replaceable> <replaceable>[alias1] [alias2] ...</replaceable> 339 ::1 ip6-localhost ip6-loopback 334 340 ff02::1 ip6-allnodes 335 341 ff02::2 ip6-allrouters … … 337 343 # End /etc/hosts</literal> 338 344 EOF</userinput></screen> 339 --> 340 341 <para>Create the <filename>/etc/hosts</filename> file using the following 342 command:</para> 343 344 <screen><userinput>cat > /etc/hosts << "EOF" 345 <literal># Begin /etc/hosts 346 347 127.0.0.1 localhost.localdomain localhost 348 127.0.1.1 <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> 349 <replaceable><192.168.0.2></replaceable> <replaceable><FQDN></replaceable> <replaceable><HOSTNAME></replaceable> <replaceable>[alias1] [alias2] ...</replaceable> 350 ::1 localhost ip6-localhost ip6-loopback 351 ff02::1 ip6-allnodes 352 ff02::2 ip6-allrouters 353 354 # End /etc/hosts</literal> 355 EOF</userinput></screen> 356 357 <para>The <replaceable><192.168.0.2></replaceable>, 358 <replaceable><FQDN></replaceable>, and 359 <replaceable><HOSTNAME></replaceable> values need to be 345 346 <para>The <replaceable><192.168.0.2></replaceable> and 347 <replaceable><FQDN></replaceable> values need to be 360 348 changed for specific uses or requirements (if assigned an IP address by a 361 349 network/system administrator and the machine will be connected to an 362 350 existing network). The optional alias name(s) can be omitted, and the 363 351 <replaceable><192.168.0.2></replaceable> line can be omitted if you 364 are using a connection configured with DHCP or IPv6 Autoconfiguration.</para> 352 are using a connection configured with DHCP or IPv6 Autoconfiguration, 353 or using <literal>localhost.localdomain</literal> as the FQDN.</para> 354 355 <para>The <filename>/etc/hostname</filename> does not contain entries 356 for <literal>localhost</literal>, 357 <literal>localhost.localdomain</literal>, or the hostname (without a 358 domain) because they are handled by the 359 <systemitem class='library'>myhostname</systemitem> NSS module, read 360 the man page <filename>nss-myhostname(8)</filename> for details.</para> 365 361 366 362 <para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents 367 the IPv6 loopback interface. 127.0.1.1 is a loopback entry reserved 368 specifically for the FQDN.</para> 363 the IPv6 loopback interface.</para> 369 364 370 365 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.