Changeset 7c56ece for networking/connect


Ignore:
Timestamp:
03/23/2020 09:46:15 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
2aa0f3b
Parents:
bb65a3c
Message:

Finish formatting "networking"

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22877 af4574ff-66df-0310-9fd7-8a98e5e911e0

Location:
networking/connect
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • networking/connect/connect.xml

    rbb65a3c r7c56ece  
    1616  <title>Connecting to a Network</title>
    1717
    18   <para>The LFS book covers setting up networking by connecting to a LAN
     18  <para>
     19    The LFS book covers setting up networking by connecting to a LAN
    1920  with a static IP address. There are other methods used to obtain an IP
    2021  address and connect to a LAN and other networks (such as the Internet).
    2122  The most popular methods (DHCP and PPP) are covered in this chapter.</para>
    2223
    23   <para>DHCP stands for Dynamic Host Configuration Protocol. It is a protocol
    24   used by many sites to automatically provide information such as IP addresses,
    25   subnet masks and routing information to computers.  If your network uses
    26   DHCP, you will need a DHCP client in order to connect to it.</para>
    27 
    28   <para>PPP stands for Point-to-Point Protocol. It is a data link protocol
    29   commonly used for establishing authenticated IP connections over
    30   a phone line with a modem, or over radio waves with a cellular phone. There
    31   is also a variant (PPPoE) that works over Ethernet and is used by cable
    32   providers to authenticate the Internet connections.</para>
    33 
     24  <para>
     25    DHCP stands for Dynamic Host Configuration Protocol. It is a protocol used
     26    by many sites to automatically provide information such as IP addresses,
     27    subnet masks and routing information to computers.  If your network uses
     28    DHCP, you will need a DHCP client in order to connect to it.
     29  </para>
     30<!-- we do not include ppp
     31  <para>
     32    PPP stands for Point-to-Point Protocol. It is a data link protocol
     33    commonly used for establishing authenticated IP connections over
     34    a phone line with a modem, or over radio waves with a cellular phone. There
     35    is also a variant (PPPoE) that works over Ethernet and is used by cable
     36    providers to authenticate the Internet connections.
     37  </para>
     38-->
    3439<!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ppp.xml"/> -->
    3540  <!-- systemd only -->
  • networking/connect/dhcpcd.xml

    rbb65a3c r7c56ece  
    3030    <title>Introduction to dhcpcd</title>
    3131
    32     <para><application>dhcpcd</application> is an implementation of the
    33     DHCP client specified in RFC2131. A DHCP client is useful for connecting
    34     your computer to a network which uses DHCP to assign network
    35     addresses. dhcpcd strives to be a fully featured, yet very lightweight
    36     DHCP client.</para>
     32    <para>
     33      <application>dhcpcd</application> is an implementation of the
     34      DHCP client specified in RFC2131. A DHCP client is useful for connecting
     35      your computer to a network which uses DHCP to assign network
     36      addresses. dhcpcd strives to be a fully featured, yet very lightweight
     37      DHCP client.
     38    </para>
    3739
    3840    &lfs91_checked;
     
    4143    <itemizedlist spacing="compact">
    4244      <listitem>
    43         <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
    44       </listitem>
    45       <listitem>
    46         <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
    47       </listitem>
    48       <listitem>
    49         <para>Download MD5 sum: &dhcpcd-md5sum;</para>
    50       </listitem>
    51       <listitem>
    52         <para>Download size: &dhcpcd-size;</para>
    53       </listitem>
    54       <listitem>
    55         <para>Estimated disk space required: &dhcpcd-buildsize;</para>
    56       </listitem>
    57       <listitem>
    58         <para>Estimated build time: &dhcpcd-time;</para>
     45        <para>
     46          Download (HTTP): <ulink url="&dhcpcd-download-http;"/>
     47        </para>
     48      </listitem>
     49      <listitem>
     50        <para>
     51          Download (FTP): <ulink url="&dhcpcd-download-ftp;"/>
     52        </para>
     53      </listitem>
     54      <listitem>
     55        <para>
     56          Download MD5 sum: &dhcpcd-md5sum;
     57        </para>
     58      </listitem>
     59      <listitem>
     60        <para>
     61          Download size: &dhcpcd-size;
     62        </para>
     63      </listitem>
     64      <listitem>
     65        <para>
     66          Estimated disk space required: &dhcpcd-buildsize;
     67        </para>
     68      </listitem>
     69      <listitem>
     70        <para>
     71          Estimated build time: &dhcpcd-time;
     72        </para>
    5973      </listitem>
    6074    </itemizedlist>
     
    6478    <bridgehead renderas="sect4">Optional</bridgehead>
    6579    <para role="optional">
    66        <xref linkend="llvm"/> (with Clang),
    67        <xref linkend="ntp"/>,
    68        <ulink url="https://chrony.tuxfamily.org/">chronyd</ulink>, and
    69        <ulink url="https://github.com/thkukuk/ypbind-mt/">ypbind</ulink>
     80      <xref linkend="llvm"/> (with Clang),
     81      <xref linkend="ntp"/>,
     82      <ulink url="https://chrony.tuxfamily.org/">chronyd</ulink>, and
     83      <ulink url="https://github.com/thkukuk/ypbind-mt/">ypbind</ulink>
    7084    </para>
    7185
     
    7892    <title>Installation of dhcpcd</title>
    7993
    80     <para>Install <application>dhcpcd</application> by running the following
    81     commands:</para>
     94    <para>
     95      Install <application>dhcpcd</application> by running the following
     96      commands:
     97    </para>
    8298
    8399<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
     
    85101make</userinput></screen>
    86102
    87     <para>To test the results, issue: <command>make test</command>.</para>
    88 
    89     <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
     103    <para>
     104      To test the results, issue: <command>make test</command>.
     105    </para>
     106
     107    <para>
     108      Now, as the <systemitem class="username">root</systemitem> user:
     109    </para>
    90110
    91111<screen role='root'><userinput>make install</userinput></screen>
    92112
    93113<!--
    94     <para>By default, a plain text lease info file isn't created but the
    95     <application>dhcpcd</application> provides a hook which can be used for creating
    96     such a file. Install the hook by running the following
    97     commands as the <systemitem class="username">root</systemitem> user:</para>
     114    <para>
     115      By default, a plain text lease info file isn't created but the
     116      <application>dhcpcd</application> provides a hook which can be used for
     117      creating such a file. Install the hook by running the following commands
     118      as the <systemitem class="username">root</systemitem> user:
     119    </para>
    98120
    99121<screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
     
    133155      <title>Config Files</title>
    134156
    135       <para><filename>/etc/dhcpcd.conf</filename></para>
     157      <para>
     158        <filename>/etc/dhcpcd.conf</filename>
     159      </para>
    136160
    137161      <indexterm zone="dhcpcd dhcpcd-config">
     
    144168      <title>General Configuration Information</title>
    145169
    146       <para>To configure <command>dhcpcd</command>, you need to first install
    147       the network service script,
    148       <filename>/lib/services/dhcpcd</filename>
    149       included in the <xref linkend="bootscripts"/> package
    150       (as user <systemitem class="username">root</systemitem>):</para>
     170      <para>
     171        To configure <command>dhcpcd</command>, you need to first install
     172        the network service script,
     173        <filename>/lib/services/dhcpcd</filename>
     174        included in the <xref linkend="bootscripts"/> package
     175        (as user <systemitem class="username">root</systemitem>):
     176      </para>
    151177
    152178      <indexterm zone="dhcpcd dhcpcd-init">
     
    156182<screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
    157183
    158       <para>Whenever <command>dhcpcd</command> configures or shuts down
    159       a network interface, it executes hook scripts. For more details
    160       about those scripts, see the <command>dhcpcd-run-hooks</command> and
    161       <command>dhcpcd</command> man pages.</para>
    162 
    163       <para id="dhcpcd-config2">Finally, as the <systemitem
    164       class="username">root</systemitem> user create the
    165       <filename>/etc/sysconfig/ifconfig.eth0</filename>
    166       configuration file using the following commands.  Adjust appropriately
    167       for additional interfaces:</para>
     184      <note>
     185        <para id="dhcpcd-config3">
     186          The default for <command>dhcpcd</command> is to set the hostname
     187          and mtu. It also overwrites <filename>/etc/resolv.conf </filename>
     188          and <filename>/etc/ntp.conf</filename>. These
     189          modifications to system files are done by hooks which are stored in
     190          <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
     191          Setup <command>dhcpcd</command> by removing or adding hooks from/to
     192          that directory.  The execution of hooks can be disabled by using
     193          the <option>--nohook</option> (<option>-C</option>) command line
     194          option or by the <option>nohook</option> option in the
     195          <filename>/etc/dhcpcd.conf</filename> file.
     196        </para>
     197      </note>
     198
     199      <para id="dhcpcd-config2">
     200        Finally, as the <systemitem class="username">root</systemitem> user
     201        create the <filename>/etc/sysconfig/ifconfig.eth0</filename>
     202        configuration file using the following commands. Adjust appropriately
     203        for additional interfaces:
     204      </para>
    168205
    169206      <indexterm zone="dhcpcd dhcpcd-config2">
     
    179216EOF</userinput></screen>
    180217
    181       <para>For more information on the appropriate <envar>DHCP_START</envar> and
    182       <envar>DHCP_STOP</envar> values, examine the man page for
    183       <command>dhcpcd</command>.</para>
    184 
    185       <note>
    186 
    187         <para id="dhcpcd-config3">The default behavior of
    188         <command>dhcpcd</command> sets the hostname and mtu settings.  It also
    189         overwrites <filename>/etc/resolv.conf</filename> and
    190         <filename>/etc/ntp.conf</filename>.
    191 
    192         These modifications to system files and settings on system
    193         configuration files are done by hooks which are stored in <filename
    194         class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
    195 
    196         Setup <command>dhcpcd</command> by removing or adding hooks from/to
    197         that directory.  The execution of hooks can be disabled by using the
    198         <option>--nohook</option> (<option>-C</option>) command line option or
    199         by the <option>nohook</option> option in the
    200         <filename>/etc/dhcpcd.conf</filename> file.</para>
    201 
    202         <para>Review the <command>dhcpcd</command> man page for switches to add
    203         to the <envar>DHCP_START</envar> value.</para>
    204 
    205       </note>
     218      <para>
     219        For more information on the appropriate <envar>DHCP_START</envar> and
     220        <envar>DHCP_STOP</envar> values, examine the man page for
     221        <command>dhcpcd</command>.
     222      </para>
    206223
    207224      <indexterm zone="dhcpcd dhcpcd-config3">
     
    213230      <title>Configuration Information: fixed ip</title>
    214231
    215       <para id="dhcpcd-config4">Although not usual, it is possible that you need
     232      <para id="dhcpcd-config4">
     233        Although not usual, it is possible that you need
    216234        to configure <application>dhcpcd</application> to use a fixed ip. Here,
    217235        we give an example. As the
     
    219237        <filename>/etc/sysconfig/ifconfig.eth0</filename> configuration file
    220238        using the following commands.  Adjust appropriately for additional
    221         interfaces and for the actual ip and router you need:</para>
     239        interfaces and for the actual ip and router you need:
     240      </para>
    222241
    223242      <indexterm zone="dhcpcd dhcpcd-config4">
     
    225244      </indexterm>
    226245
    227 <screen role='root'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
     246<screen role='nodump'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
    228247<literal>ONBOOT="yes"
    229248IFACE="eth0"
     
    233252EOF</userinput></screen>
    234253
    235       <para>You can either use DNS servers in
     254      <para>
     255        You can either use DNS servers in
    236256        <filename>/etc/resolv.conf</filename> from another system, your
    237257        preferred servers, or just the example
    238         <filename>/etc/resolv.conf.head</filename> file below as is:</para>
    239 
    240 <screen role='root'><userinput>cat &gt; /etc/resolv.conf.head &lt;&lt; "EOF"
     258        <filename>/etc/resolv.conf.head</filename> file below as is:
     259      </para>
     260
     261<screen role='nodump'><userinput>cat &gt; /etc/resolv.conf.head &lt;&lt; "EOF"
    241262<literal># OpenDNS servers
    242263nameserver 208.67.222.222
     
    263284      </indexterm>
    264285
    265       <para>
    266         Whenever <command>dhcpcd</command> configures or shuts down
    267         a network interface, it executes hook scripts. For more details
    268         about those scripts, see the <command>dhcpcd-run-hooks</command> and
    269         <command>dhcpcd</command> man pages.
    270       </para>
    271 
    272286      <note>
    273         <para id="dhcpcd-config5">The default behavior of
    274         <command>dhcpcd</command> sets the hostname and mtu settings. It also
    275         overwrites <filename>/etc/resolv.conf</filename> and
    276         <filename>/etc/ntp.conf</filename>.
    277 
    278         These modifications to system files and settings on system
    279         configuration files are done by hooks which are stored in <filename
    280         class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
    281 
    282         Setup <command>dhcpcd</command> by removing or adding hooks from/to
    283         that directory.  The execution of hooks can be disabled by using the
    284         <option>--nohook</option> (<option>-C</option>) command line option or
    285         by the <option>nohook</option> option in the
    286         <filename>/etc/dhcpcd.conf</filename> file.</para>
     287        <para id="dhcpcd-config5">
     288          The default behavior of <command>dhcpcd</command> is to set the
     289          hostname and the mtu. It also overwrites <filename>/etc/resolv.conf
     290          </filename> and <filename>/etc/ntp.conf</filename>. These
     291          modifications to system configuration files are done by hooks which
     292          are stored in <filename class="directory">
     293          /lib/dhcpcd/dhcpcd-hooks</filename>. Setup <command>dhcpcd</command>
     294          by removing or adding hooks from/to that directory. The execution
     295          of hooks can be disabled by using the <option>--nohook</option>
     296          (<option>-C</option>) command line option or by the
     297          <option>nohook</option> option in the <filename>/etc/dhcpcd.conf
     298          </filename> file.
     299        </para>
    287300      </note>
    288301
     
    291304      </indexterm>
    292305
    293     <note>
    294       <para>
    295         Make sure that you disable the <command>systemd-networkd</command>
    296         service or configure it not to manage the interfaces you want to manage
    297         with <application>dhcpcd</application>.
    298       </para>
    299     </note>
     306      <note>
     307        <para>
     308          Make sure that you disable the <command>systemd-networkd</command>
     309          service or configure it not to manage the interfaces you want to
     310          manage with <application>dhcpcd</application>.
     311        </para>
     312      </note>
    300313
    301314      <para>
     
    347360        <term><command>dhcpcd</command></term>
    348361        <listitem>
    349           <para>is an implementation of the DHCP client specified
    350           in RFC2131.</para>
     362          <para>
     363            is an implementation of the DHCP client specified in RFC2131.
     364          </para>
    351365          <indexterm zone="dhcpcd dhcpcd-prog">
    352366            <primary sortas="b-dhcpcd">dhcpcd</primary>
Note: See TracChangeset for help on using the changeset viewer.