Changeset 138bdf6 for networking/connect


Ignore:
Timestamp:
06/09/2016 05:34:10 AM (8 years ago)
Author:
DJ Lucas <dj@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, nosym, perl-modules, 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:
2bbb3379
Parents:
0098ace6
Message:

[Systemd merge] - Chapter 14

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

Location:
networking/connect
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • networking/connect/dhcp.xml

    r0098ace6 r138bdf6  
    3131
    3232    <para>
    33       The <application>ISC DHCP</application> package contains both the client and
    34       server programs for DHCP. <command>dhclient</command> (the client) is
     33      The <application>ISC DHCP</application> package contains both the client
     34      and server programs for DHCP. <command>dhclient</command> (the client) is
    3535      used for connecting to a network which uses DHCP to assign network
    3636      addresses. <command>dhcpd</command> (the server) is used for assigning
     
    186186
    187187    <para>
    188       Skip to <xref linkend="dhclient-config" revision="sysv"/>
    189       <xref linkend="dhclient-config-systemd" revision="systemd"/>
    190       in order to configure the client
     188      Skip to <xref linkend="dhclient-config"/> in order to configure the
     189      client
    191190    </para>
    192191
     
    237236    </sect3>
    238237
    239     <sect3 id="dhclient-config" revision="sysv">
     238    <sect3 id="dhclient-config">
    240239      <title>Client Configuration</title>
    241240
     
    278277<screen role="root"><userinput>install -v -dm 755 /var/lib/dhclient</userinput></screen>
    279278
     279      <para id="dhclient-service-sysd" revision="systemd">
     280        If you want to configure network interfaces at boot using
     281        <command>dhclient</command>, you need to install the
     282        <filename>dhclient@.service</filename> unit included in the
     283        <xref linkend="systemd-units"/> package by running the following
     284        command as the <systemitem class="username">root</systemitem> user:
     285      </para>
     286
     287      <indexterm zone="dhcp dhclient-service-sysd" revision="systemd">
     288        <primary sortas="f-dhclient">dhclient@.service</primary>
     289      </indexterm>
     290
     291<screen role="root" revision="systemd"><userinput>make install-dhclient</userinput></screen>
     292
     293      <note revision="systemd">
     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
     297          manage with <command>dhclient</command>.
     298        </para>
     299      </note>
     300
    280301      <para>
    281302        At this point you can test if <command>dhclient</command> is
     
    284305      </para>
    285306
    286 <screen role="root"><userinput>dhclient <replaceable>&lt;eth0&gt;</replaceable></userinput></screen>
    287 
    288       <para>
     307<screen role="root" revision="sysv"><userinput>dhclient <replaceable>&lt;eth0&gt;</replaceable></userinput></screen>
     308
     309<screen role="root" revision="systemd"><userinput>systemctl start dhclient@<replaceable>eth0</replaceable></userinput></screen>
     310
     311      <para revision="sysv">
    289312        Replace <replaceable>&lt;eth0&gt;</replaceable> with your
    290313        desired interface. If you want more verbose output, add the
     
    292315      </para>
    293316
    294       <para id="dhclient-service">
     317      <para id="dhclient-service" revision="sysv">
    295318        If you want to configure network interfaces at boot using
    296319        <command>dhclient</command>, you need to install the
     
    299322      </para>
    300323
    301 <screen role="root"><userinput>make install-service-dhclient</userinput></screen>
    302 
    303       <indexterm zone="dhcp dhclient-service">
     324<screen role="root" revision="sysv"><userinput>make install-service-dhclient</userinput></screen>
     325
     326      <indexterm zone="dhcp dhclient-service" revision="sysv">
    304327        <primary sortas="f-dhclient">dhclient (service script)</primary>
    305328      </indexterm>
    306329
    307       <para id="dhclient-ifconfig">
     330      <para id="dhclient-ifconfig" revision="sysv">
    308331        Next, create the <filename>/etc/sysconfig/ifconfig.eth0</filename>
    309332        configuration file with the following commands as the
     
    311334      </para>
    312335
    313 <screen role="root"><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
     336<screen role="root" revision="sysv"><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
    314337<literal>ONBOOT="yes"
    315338IFACE="eth0"
     
    327350EOF</userinput></screen>
    328351
    329       <indexterm zone="dhcp dhclient-ifconfig">
     352      <indexterm zone="dhcp dhclient-ifconfig" revision="sysv">
    330353        <primary sortas="e-etc-sysconfig-...-dhclient">/etc/sysconfig/ifconfig.eth0</primary>
    331354      </indexterm>
    332355
    333       <para>
     356      <para revision="sysv">
    334357        Adjust the file to suit your needs.
    335358      </para>
    336359
    337       <para>
     360      <para revision="sysv">
    338361        For more information on the appropriate <envar>DHCP_START</envar>
    339362        and <envar>DHCP_STOP</envar> values see
     
    341364      </para>
    342365
    343     </sect3>
    344 
    345     <sect3 id="dhclient-config-systemd" revision="systemd">
    346       <title>Client Configuration</title>
    347 
    348       <para>TBA</para>
     366      <para revision="systemd">
     367        To start <command>dhclient</command> on a specific interface
     368        at boot, enable the previously installed systemd unit by
     369        running the following command as the
     370        <systemitem class="username">root</systemitem> user:
     371      </para>
     372
     373<screen role="root" revision="systemd"><userinput>systemctl enable dhclient@<replaceable>eth0</replaceable></userinput></screen>
     374
     375      <para revision="systemd">
     376        Replace <replaceable>eth0</replaceable> with the actual interface name.
     377      </para>
     378
    349379    </sect3>
    350380
     
    402432
    403433       <para>
    404         If you want to start the DHCP Server at boot, install
    405         the <filename revision="sysv">/etc/rc.d/init.d/dhcpd</filename>
    406         <filename revision="systemd">dhcpd.service</filename>
    407         init script included in the
     434        If you want to start the DHCP Server at boot, install the
     435        <phrase revision="sysv"><filename>/etc/rc.d/init.d/dhcpd</filename>
     436        inti script</phrase>
     437        <phrase revision="systemd"><filename>dhcpd.service</filename>
     438        unit</phrase> included in the
    408439        <xref linkend="bootscripts" revision="sysv"/>
    409440        <xref linkend="systemd-units" revision="systemd"/>
     
    419450      <para>
    420451        You will need to edit the
    421         <filename>/etc/sysconfig/dhcpd</filename> in order
    422         to set the interface on which <command>dhcpd</command>
     452        <phrase revision="sysv"><filename>/etc/sysconfig/dhcpd</filename></phrase>
     453        <phrase revision="systemd"><filename>/etc/default/dhcpd</filename></phrase>
     454        in order to set the interface on which <command>dhcpd</command>
    423455        will serve the DHCP requests.
    424456      </para>
  • networking/connect/dhcpcd.xml

    r0098ace6 r138bdf6  
    240240nameserver 208.67.220.220</literal>
    241241EOF</userinput></screen>
     242
     243    </sect3>
     244
     245   <sect3 id="dhcpcd-init3" revision="systemd">
     246      <title>General Configuration Information</title>
     247
     248      <para>
     249        If you want to configure network interfaces at boot using
     250        <command>dhcpcd</command>, you need to install the
     251        systemd unit included in <xref linkend="systemd-units"/>
     252        package by running the following command as the
     253        <systemitem class="username">root</systemitem> user:
     254      </para>
     255
     256<screen role="root"><userinput>make install-dhcpcd</userinput></screen>
     257
     258      <indexterm zone="dhcpcd dhcpcd-init3">
     259        <primary sortas="f-dhcpcd">dhcpcd</primary>
     260      </indexterm>
     261
     262      <para>
     263        Whenever <command>dhcpcd</command> configures or shuts down
     264        a network interface, it executes hook scripts. For more details
     265        about those scripts, see the <command>dhcpcd-run-hooks</command> and
     266        <command>dhcpcd</command> man pages.
     267      </para>
     268
     269      <note>
     270        <para id="dhcpcd-config5">The default behavior of
     271        <command>dhcpcd</command> sets the hostname and mtu settings. It also
     272        overwrites <filename>/etc/resolv.conf</filename> and
     273        <filename>/etc/ntp.conf</filename>.
     274
     275        These modifications to system files and settings on system
     276        configuration files are done by hooks which are stored in <filename
     277        class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
     278
     279        Setup <command>dhcpcd</command> by removing or adding hooks from/to
     280        that directory.  The execution of hooks can be disabled by using the
     281        <option>--nohook</option> (<option>-C</option>) command line option or
     282        by the <option>nohook</option> option in the
     283        <filename>/etc/dhcpcd.conf</filename> file.</para>
     284      </note>
     285
     286      <indexterm zone="dhcpcd dhcpcd-config5">
     287        <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
     288      </indexterm>
     289
     290    <note>
     291      <para>
     292        Make sure that you disable the <command>systemd-networkd</command>
     293        service or configure it not to manage the interfaces you want to manage
     294        with <application>dhcpcd</application>.
     295      </para>
     296    </note>
     297
     298      <para>
     299        At this point you can test if <command>dhcpcd</command> is
     300        behaving as expected by running the following command as the
     301        <systemitem class="username">root</systemitem> user:
     302      </para>
     303
     304<screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
     305
     306      <para>
     307        To start <command>dhcpcd</command> on a specific interface
     308        at boot, enable the previously installed systemd unit by
     309        running the following command as the
     310        <systemitem class="username">root</systemitem> user:
     311      </para>
     312
     313<screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
     314
     315      <para>
     316        Replace <replaceable>eth0</replaceable> with the actual interface name.
     317      </para>
    242318
    243319    </sect3>
Note: See TracChangeset for help on using the changeset viewer.