Ignore:
Timestamp:
08/02/2011 02:15:42 AM (13 years ago)
Author:
Bruce Dubbs <bdubbs@…>
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
Message:

Rewrite bootscripts and Chaper 7

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9574 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/network.xml

    r75fe599 r0cda898  
    99  <?dbhtml filename="network.html"?>
    1010
    11   <title>Configuring the network Script</title>
     11  <title>General Network Configuration</title>
    1212
    1313  <indexterm zone="ch-scripts-network">
     
    2626  <sect2>
    2727    <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> 
    2833
    2934    <para>With Udev and modular network drivers, the network interface numbering
     
    113118
    114119    <para>Which interfaces are brought up and down by the network script
    115     depends on the files and directories in the <filename
    116     class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
    117     This directory should contain a sub-directory for each interface to be
    118     configured, such as <filename>ifconfig.xyz</filename>, where
    119     <quote>xyz</quote> is a network interface name. Inside this directory
    120     would be files defining the attributes to this interface, such as its IP
    121     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 &gt; ifconfig.eth0/ipv4 &lt;&lt; "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/
     133cat &gt; ifconfig.eth0 &lt;&lt; "EOF"
    129134<literal>ONBOOT=yes
     135IFACE=eth0
    130136SERVICE=ipv4-static
    131137IP=192.168.1.1
     
    136142
    137143    <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>
    143156
    144157    <para>The <envar>SERVICE</envar> variable defines the method used for
    145158    obtaining the IP address. The LFS-Bootscripts package has a modular IP
    146159    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>
    151163
    152164    <para>The <envar>GATEWAY</envar> variable should contain the default
     
    190202EOF</userinput></screen>
    191203
     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
    192208    <para>Replace <replaceable>&lt;IP address of the nameserver&gt;</replaceable>
    193209    with the IP address of the DNS most appropriate for the setup. There will
     
    197213    may also be a router on the local network.</para>
    198214
     215    <note><para>The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4.</para></note>
     216
    199217  </sect2>
    200218
Note: See TracChangeset for help on using the changeset viewer.