Changeset 82fc053 for BOOK/network


Ignore:
Timestamp:
May 14, 2014, 1:21:04 AM (10 years ago)
Author:
Chris Staub <chris@…>
Branches:
clfs-3.0.0-sysvinit, sysvinit
Children:
056e32f4
Parents:
db71344
Message:

Created sysvinit branch

Location:
BOOK/network
Files:
2 deleted
15 edited
1 moved

Legend:

Unmodified
Added
Removed
  • BOOK/network/common/choose.xml

    rdb71344 r82fc053  
    99  <?dbhtml filename="choose.html"?>
    1010
    11   <title>Systemd Networking?</title>
     11  <title>DHCP or Static Networking?</title>
    1212
    1313  <indexterm zone="ch-network-choose">
     
    2020
    2121  <para> There are two different ways you can proceed from this point
    22   to configure your network. You can use systemd, or install the
    23   CLFS-Network-Scripts.</para>
     22  to configure your network. Dynamic will allow you to take advantage of
     23  a DHCP server to get all your configuration information. Static you become
     24  responsible for setting up your options.</para>
    2425
    25   <para>To use systemd to configure a Network Interface, Follow <xref linkend="ch-systemd-network"/>.</para>
     26  <para>To configure a Static Interface, Follow <xref linkend="ch-network-static"/>.</para>
    2627
    27   <para>To use CLFS-network-scripts to configure a Network Interface, Follow <xref linkend="ch-scripts-network-scripts"/>.</para>
     28  <para>To configure a DHCP Interface, Follow <xref linkend="ch-network-dhcpcd"/>.</para>
    2829
    2930</sect1>
  • BOOK/network/common/dhcpcd.xml

    rdb71344 r82fc053  
    4747
    4848  <sect2 id="conf-dhcpcd" role="configuration">
    49     <title>Creating the DHCP Network Interface Configuration File</title>
     49    <title>Creating the DHCP Network Interface Configuration Files</title>
    5050
    51     <para>The following is an example for the eth0 interface. Refer to the
    52     dhcpcd.conf man page for more information. This step may be skipped if
    53     default behavior of dhcpcd is required.</para>
     51    <para>First install the service from the CLFS Bootscripts package:</para>
    5452
    55     <para>Create the <filename>/etc/dhcpcd.conf</filename> configuration file
    56     using the following commands. Adjust appropriately for additional options:</para>
     53<screen><userinput>tar -xvf bootscripts-cross-lfs-&bootscripts-clfs-version;.tar.xz
     54cd bootscripts-cross-lfs-&bootscripts-clfs-version;
     55make install-service-dhcpcd</userinput></screen>
    5756
    58 <screen><userinput>cd /etc &amp;&amp;
    59 cat &gt; dhcpcd.conf &lt;&lt; "EOF"
    60 <literal># dhcpcd configuration eth0 interface
    61 # See dhcpcd.conf(5) for details.
     57    <para>Finally, create the
     58    <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
     59    configuration file using the following commands. Adjust appropriately for
     60    additional interfaces:</para>
    6261
    63 interface eth0
    64 # dhcpcd-run-hooks uses these options.
    65 option subnet_mask, routers, domain_name_servers
     62<screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
     63mkdir -v ifconfig.eth0 &amp;&amp;
     64cat &gt; ifconfig.eth0/dhcpcd &lt;&lt; "EOF"
     65<literal>ONBOOT="yes"
     66SERVICE="dhcpcd"
    6667
    67 # The default timeout for waiting for a DHCP response is 30 seconds
    68 # which may be too long or too short and can be changed here.
    69 timeout 16</literal>
     68# Start Command for DHCPCD
     69DHCP_START="-q"
     70
     71# Stop Command for DHCPCD
     72DHCP_STOP="-k"</literal>
    7073EOF</userinput></screen>
    7174
     75    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     76    href="static.xml"
     77    xpointer="xpointer(//*[@os='var-ob'])"/>
     78
     79    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     80    href="static.xml"
     81    xpointer="xpointer(//*[@os='var-s'])"/>
     82
     83    <para>The <envar>DHCP_START</envar> and <envar>DHCP_STOP</envar> variables
     84    arguments that are passed onto <filename>dhcpcd</filename> when starting
     85    and stoppping the service. More information about what can be passed can
     86    be found in the <filename>dhcpcd(8)</filename> man page.</para>
     87
    7288    <para>To configure another Static Interface, Follow <xref linkend="ch-network-static"/>.</para>
    73 
    74   </sect2>
    75 
    76   <sect2>
    77     <title>Configuring the Network Interface at boot</title>
    78 
    79     <para>Enabling of the Network Interface configuration is
    80     done per interface. To enable Network Interface
    81     configuration at boot, run:</para>
    82 
    83 <screen role="nodump"><userinput>systemctl enable dhcpcd@eth0</userinput></screen>
    84 
    85     <para>To disable previously enabled Network Interface
    86     configuration at boot, run:</para>
    87 
    88 <screen role="nodump"><userinput>systemctl disable dhcpcd@eth0</userinput></screen>
    89 
    90     <para>To manually start the Network Interface configuration,
    91     run:</para>
    92 
    93 <screen role="nodump"><userinput>systemctl start dhcpcd@eth0</userinput></screen>
    94 
    95     <para>Replace eth0 with the correct Network Interface
    96     name as described on the beginning of this page.</para>
    9789
    9890  </sect2>
  • BOOK/network/common/hostname.xml

    rdb71344 r82fc053  
    99  <?dbhtml filename="hostname.html"?>
    1010
    11   <title>Configuring the system hostname</title>
     11  <title>Configuring the localnet Script</title>
    1212
    1313  <indexterm zone="ch-network-hostname">
    14     <primary sortas="d-hostname">hostname</primary>
     14    <primary sortas="d-localnet">localnet</primary>
    1515  <secondary>configuring</secondary></indexterm>
    1616
    17   <para>Systemd reads <filename>/etc/hostname</filename> to determine which
    18   hostname should be set.</para>
     17  <para>Part of the job of the <command>localnet</command> script is
     18  setting the system's hostname. This needs to be configured in the
     19  <filename>/etc/sysconfig/network</filename> file.</para>
    1920
    20   <para>Create the <filename>/etc/hostname</filename> file and enter a hostname
    21   by running:</para>
     21  <para>Create the <filename>/etc/sysconfig/network</filename> file
     22  and enter a hostname by running:</para>
    2223
    23   <screen><userinput>echo "<replaceable>[clfs]</replaceable>" &gt; /etc/hostname</userinput></screen>
     24  <screen><userinput>echo "HOSTNAME=<replaceable>[clfs]</replaceable>" &gt; /etc/sysconfig/network</userinput></screen>
    2425
    2526  <para><replaceable>[clfs]</replaceable> needs to be replaced with the
  • BOOK/network/common/static.xml

    rdb71344 r82fc053  
    1616    <para>Which interfaces are brought up and down by the network script
    1717    depends on the files and directories in the <filename
    18     class="directory">/etc/sysconfig</filename> hierarchy.
     18    class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
    1919    This directory should contain a sub-directory for each interface to be
    2020    configured, such as <filename>ifconfig.xyz</filename>, where
     
    2323    address(es), subnet masks, and so forth.</para>
    2424
    25     <note><para>Udev may assign random Network Card Interface names
    26     for some network cards such as enp2s1. If you are not sure what
    27     your Network Card Interface name is, you can always run
    28     <command>ip l</command> after you have booted your system. Again,
    29     it is important that <filename>ifconfig.xyz</filename> is named
    30     after correct Network Card Interface name (e.g.
    31     <filename>ifconfig.enp2s1</filename> or
    32     <filename>ifconfig.eth0</filename>) or systemd will fail to bring
    33     up your network interface.</para></note>
    34 
    3525    <para>The following command creates a sample <filename>ipv4</filename>
    3626    file for the <emphasis>eth0</emphasis> device:</para>
    3727
    38 <screen><userinput>mkdir -pv /etc/sysconfig &amp;&amp;
    39 cd /etc/sysconfig &amp;&amp;
    40 cat &gt; ifconfig.eth0 &lt;&lt; "EOF"
    41 <literal>IFACE="eth0"
     28<screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
     29mkdir -v ifconfig.eth0 &amp;&amp;
     30cat &gt; ifconfig.eth0/ipv4 &lt;&lt; "EOF"
     31<literal>ONBOOT="yes"
    4232SERVICE="ipv4-static"
    4333IP="192.168.1.1"
     
    4737EOF</userinput></screen>
    4838
    49     <para os="var-ob">The values of these variables must be changed in every
    50     file to match the proper setup.</para>
     39    <para os="var-ob">The values of these variables must be changed in every file to match
     40    the proper setup. If the <envar>ONBOOT</envar> variable is set to
     41    <quote>yes</quote> the network script will bring up the Network Interface
     42    Card (NIC) during booting of the system. If set to anything but
     43    <quote>yes</quote> the NIC will be ignored by the network script and not
     44    be brought up.</para>
    5145
    52     <para os="var-i">The <envar>IFACE</envar> variable defines the interface
    53     name, for example, eth0. It is required for all network device configuration
    54     files.</para>
    55 
    56     <para os="var-s">The <envar>SERVICE</envar> variable defines the method used
    57     for obtaining the IP address. The CLFS-Network-Scripts package has a modular
    58     IP assignment format, and creating additional files in the <filename
    59     class="directory">/lib/services</filename>
     46    <para os="var-s">The <envar>SERVICE</envar> variable defines the method used for
     47    obtaining the IP address. The CLFS-Bootscripts package has a modular IP
     48    assignment format, and creating additional files in the <filename
     49    class="directory">/etc/sysconfig/network-devices/services</filename>
    6050    directory allows other IP assignment methods.</para>
    6151
     
    7363    <envar>PREFIX</envar> variable according to your specific subnet.</para>
    7464
    75     <para>For more information see the <command>ifup</command> man page.</para>
    76 
    77     <para>To configure another DHCP Interface, Follow <xref linkend="ch-network-dhcpcd"/>.</para>
    78 
    79   </sect2>
    80 
    81   <sect2>
    82     <title>Configuring the Network Interface at boot</title>
    83 
    84     <para>Enabling of the Network Interface configuration is
    85     done per interface. To enable Network Interface
    86     configuration at boot, run:</para>
    87 
    88 <screen role="nodump"><userinput>systemctl enable ifupdown@eth0</userinput></screen>
    89 
    90     <para>To disable previously enabled Network Interface
    91     configuration at boot, run:</para>
    92 
    93 <screen role="nodump"><userinput>systemctl disable ifupdown@eth0</userinput></screen>
    94 
    95     <para>To manually start the Network Interface configuration,
    96     run:</para>
    97 
    98 <screen role="nodump"><userinput>systemctl start ifupdown@eth0</userinput></screen>
    99 
    100     <para>Replace eth0 with the correct Network Interface
    101     name as described on the beginning of this page.</para>
     65    <para>To configure another DHCP Interface, Follow <xref linkend="conf-dhcpcd"/>.</para>
    10266
    10367  </sect2>
  • BOOK/network/mips-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/mips64-64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/mips64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="multilib/dhcpcd.xml"/>
    2220
  • BOOK/network/ppc-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/ppc64-64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/ppc64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="multilib/dhcpcd.xml"/>
    2220
  • BOOK/network/sparc-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/sparc64-64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/sparc64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="multilib/dhcpcd.xml"/>
    2220
  • BOOK/network/x86-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/x86_64-64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/dhcpcd.xml"/>
    2220
  • BOOK/network/x86_64-chapter.xml

    rdb71344 r82fc053  
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/resolv.xml"/>
    1717  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/choose.xml"/>
    18   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/systemd-network.xml"/>
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/network-scripts.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/sysconfig-network.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common/static.xml"/>
    2119  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="multilib/dhcpcd.xml"/>
    2220
Note: See TracChangeset for help on using the changeset viewer.