Ignore:
Timestamp:
12/21/2013 07:46:16 PM (10 years ago)
Author:
Krejzi <krejzi@…>
Branches:
7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
Children:
a90dd60
Parents:
c158fe6
Message:

Misc updates.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/network.xml

    rc158fe6 r94f4fb86  
    2323    <para>Which interfaces are brought up and down by the network script
    2424    depends on the files in <filename
    25     class="directory">/etc/sysconfig/</filename>.  This directory should
     25    class="directory">/etc/sysconfig/</filename>. This directory should
    2626    contain a file for each interface to be configured, such as
    2727    <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is
    28     meaningful to the administrator such as the device name (e.g. eth0).
     28    required to be a Network Card Interface name (e.g. eth0).
    2929    Inside this file are attributes to this interface, such as its IP
    3030    address(es), subnet masks, and so forth.  It is necessary that
    3131    the stem of the filename be <emphasis>ifconfig</emphasis>.</para>
     32
     33    <note><para>Udev may assign random Network Card Interface names
     34    for some network cards such as enp2s1. If you are not sure what
     35    your Network Card Interface name is, you can always run
     36    <command>ip l</command> after you have booted your system. Again,
     37    it is important that <filename>ifconfig.xyz</filename> is named
     38    after correct Network Card Interface name (e.g.
     39    <filename>ifconfig.enp2s1</filename> or
     40    <filename>ifconfig.eth0</filename>) or Systemd will fail to bring
     41    up your network interface.</para></note>
    3242
    3343    <para>The following command creates a sample file for the
     
    3646<screen><userinput>cd /etc/sysconfig/
    3747cat &gt; ifconfig.eth0 &lt;&lt; "EOF"
    38 <literal>ONBOOT=yes
    39 IFACE=eth0
     48<literal>IFACE=eth0
    4049SERVICE=ipv4-static
    4150IP=192.168.1.1
     
    4857    the proper setup.</para>
    4958
    50     <para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the
    51     network script will bring up the Network Interface Card (NIC) during
    52     booting of the system. If set to anything but <quote>yes</quote> the NIC
    53     will be ignored by the network script and not be automatically brought up.
    54     The interface can be manually started or stopped with the
    55     <command>ifup</command> and <command>ifdown</command> commands.</para>
    56 
    5759    <para>The <envar>IFACE</envar> variable defines the interface name,
    58     for example, eth0.  It is required for all network device configuration
    59     files. </para>
     60    for example, eth0. It is required for all network device configuration
     61    files.</para>
    6062
    6163    <para>The <envar>SERVICE</envar> variable defines the method used for
    62     obtaining the IP address. The LFS-Bootscripts package has a modular IP
    63     assignment format, and creating additional files in the <filename
     64    obtaining the IP address. The LFS-Network-Scripts package has a modular
     65    IP assignment format, and creating additional files in the <filename
    6466    class="directory">/lib/services/</filename> directory allows other IP
    6567    assignment methods. This is commonly used for Dynamic Host Configuration
     
    8183
    8284    <para>For more information see the <command>ifup</command> man page.</para>
     85
     86  </sect2>
     87
     88  <sect2>
     89    <title>Configuring the Network Interface Card at boot</title>
     90
     91    <para>Enabling of the Network Interface Card configuration is
     92    done per interface. To enable Network Interface Card
     93    configuration at boot, run:</para>
     94
     95<screen><userinput>systemctl enable ifupdown@eth0</userinput></screen>
     96
     97    <para>To disable previously enabled Network Interface
     98    Card configuration at boot, run:</para>
     99
     100<screen><userinput>systemctl disable ifupdown@eth0</userinput></screen>
     101
     102    <para>To manually start the Network Interface Card configuration,
     103    run:</para>
     104
     105<screen><userinput>systemctl start ifupdown@eth0</userinput></screen>
     106
     107    <para>Replace eth0 with the correct Network Interface Card
     108    name as described on the beginning of this page.</para>
    83109
    84110  </sect2>
Note: See TracChangeset for help on using the changeset viewer.