Ignore:
Timestamp:
04/03/2014 09:52:09 PM (10 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.6, 7.7, 7.8, 7.9, 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:
9839808
Parents:
008436e
Message:

Added systemd and dbus to the book.
Set up systemd and System V side-by-side with the
ability to reboot to either system.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/network.xml

    r008436e rcba2d4e  
    4343    to network cards based on their MAC address.</para>
    4444
    45     <para>The rules were pre-generated in the build instructions for
    46     <application>udev (systemd)</application> in the last chapter.  Inspect the
     45    <para>If using the traditional network interface names such as eth0 is desired,
     46    generate a custom Udev rule:</para>
     47
     48<screen><userinput>bash /lib/udev/init-net-rules.sh</userinput></screen>   
     49
     50    <para> Now, inspect the
    4751    <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> file, to
    4852    find out which name was assigned to which network device:</para>
     
    123127    class="directory">/etc/sysconfig/</filename>.  This directory should
    124128    contain a file for each interface to be configured, such as
    125     <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is
    126     meaningful to the administrator such as the device name (e.g. eth0).
    127     Inside this file are attributes to this interface, such as its IP
    128     address(es), subnet masks, and so forth.  It is necessary that
    129     the stem of the filename be <emphasis>ifconfig</emphasis>.</para>
     129    <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is required to
     130    be a Network Card Interface name (e.g. eth0).  Inside this file are
     131    attributes to this interface, such as its IP address(es), subnet masks, and
     132    so forth.  It is necessary that the stem of the filename be
     133    <emphasis>ifconfig</emphasis>.</para>
     134
     135    <note><para>If the procedure in the previous section was not used, Udev
     136    will assign network card interface names based on system physical
     137    characteristics such as enp2s1. If you are not sure what your interface
     138    name is, you can always run <command>ip link</command>  after you have
     139    booted your system.  Again, it is important that ifconfig.xyz is named
     140    after correct network card interface name (e.g. ifconfig.enp2s1 or
     141    ifconfig.eth0) or your network interface will not be initialized during
     142    the boot process.</para></note>
    130143
    131144    <para>The following command creates a sample file for the
     
    137150IFACE=eth0
    138151SERVICE=ipv4-static
    139 IP=192.168.1.1
    140 GATEWAY=192.168.1.2
     152IP=192.168.1.2
     153GATEWAY=192.168.1.1
    141154PREFIX=24
    142155BROADCAST=192.168.1.255</literal>
     
    147160
    148161    <para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the
    149     network script will bring up the Network Interface Card (NIC) during
     162    System V network script will bring up the Network Interface Card (NIC) during
    150163    booting of the system. If set to anything but <quote>yes</quote> the NIC
    151164    will be ignored by the network script and not be automatically brought up.
     
    182195  </sect2>
    183196
     197  <sect2 id="systemd-net-enable">
     198    <title>Configuring the Network Interface Card at boot (systemd)</title>
     199
     200    <para>Enabling of the network interface card configuration
     201    in systemd is done per interface. To enable network interface card
     202    configuration at boot, run:</para>
     203
     204<screen><userinput>systemctl enable ifupdown@eth0</userinput></screen>
     205
     206    <para>To disable a previously enabled network interface
     207    card configuration at boot, run:</para>
     208
     209<screen><userinput>systemctl disable ifupdown@eth0</userinput></screen>
     210
     211    <para>To manually start the network interface card configuration,
     212    run:</para>
     213
     214<screen><userinput>systemctl start ifupdown@eth0</userinput></screen>
     215
     216    <para>Replace eth0 with the correct network interface card
     217    name as described on the beginning of this page.</para>
     218
     219    <note><para>The network card can also be started or stopped
     220    with the traditional <command>ifup &lt;device&gt;</command> or
     221    <command>ifdown &lt;device&gt;</command> commands.</para></note>
     222
     223  </sect2>
     224
    184225  <sect2 id="resolv.conf">
    185226    <title>Creating the /etc/resolv.conf File</title>
Note: See TracChangeset for help on using the changeset viewer.