Changeset 1d67150 in clfs-embedded for BOOK/bootscripts/common/network.xml


Ignore:
Timestamp:
Nov 14, 2006, 10:11:07 PM (18 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
master
Children:
334e4cf
Parents:
ae024d6
Message:

Removed udev
Added the use of mdev
Removed udev rules
Added bootscripts configuration information

File:
1 edited

Legend:

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

    rae024d6 r1d67150  
    1515  <secondary>configuring</secondary></indexterm>
    1616
    17   <para>This section only applies if a network card is to be
    18   configured.</para>
    19 
    20   <para>If a network card will not be used, there is likely no need to
    21   create any configuration files relating to network cards. If that is
    22   the case, remove the <filename class="symlink">network</filename>
    23   symlinks from all run-level directories (<filename
    24   class="directory">/etc/rc.d/rc*.d</filename>).</para>
    25 
    2617  <sect2>
    2718    <title>Creating Network Interface Configuration Files</title>
     
    2920    <para>Which interfaces are brought up and down by the network script
    3021    depends on the files and directories in the <filename
    31     class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
    32     This directory should contain a sub-directory for each interface to be
    33     configured, such as <filename>ifconfig.xyz</filename>, where
    34     <quote>xyz</quote> is a network interface name. Inside this directory
    35     would be files defining the attributes to this interface, such as its IP
     22    class="directory">/etc/network.d</filename> hierarchy.
     23    This directory should contain a file for each interface to be
     24    configured, such as <filename>interface.xyz</filename>, where
     25    <quote>xyz</quote> is a network interface name. Inside this file we
     26    would be defining the attributes to this interface, such as its IP
    3627    address(es), subnet masks, and so forth.</para>
    3728
    38     <para>The following command creates a sample <filename>ipv4</filename>
    39     file for the <emphasis>eth0</emphasis> device:</para>
     29    <para>The following command creates the <filename>network.conf</filename>
     30    file for use by the entire system:</para>
    4031
    41 <screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
    42 mkdir -v ifconfig.eth0 &amp;&amp;
    43 cat &gt; ifconfig.eth0/ipv4 &lt;&lt; "EOF"
    44 <literal>ONBOOT=yes
    45 SERVICE=ipv4-static
    46 IP=192.168.1.1
    47 GATEWAY=192.168.1.2
    48 PREFIX=24
    49 BROADCAST=192.168.1.255</literal>
     32<screen><userinput>cd /etc/network.d &amp;&amp;
     33cat &gt; /etc/network.d/interface.eth0 &lt;&lt; "EOF"
     34<literal># /etc/network.conf
     35# Global Networking Configuration
     36# interface configuration is in /etc/network.d/
     37
     38# set to yes to enable networking
     39NETWORKING=yes
     40
     41# set to yes to set default route to gateway
     42USE_GATEWAY=no
     43
     44# set to gateway IP address
     45GATEWAY=192.168.0.1</literal>
    5046EOF</userinput></screen>
    51 
    52     <para>The values of these variables must be changed in every file to match
    53     the proper setup. If the <envar>ONBOOT</envar> variable is set to
    54     <quote>yes</quote> the network script will bring up the Network Interface
    55     Card (NIC) during booting of the system. If set to anything but
    56     <quote>yes</quote> the NIC will be ignored by the network script and not
    57     be brought up.</para>
    58 
    59     <para>The <envar>SERVICE</envar> variable defines the method used for
    60     obtaining the IP address. The CLFS-Bootscripts package has a modular IP
    61     assignment format, and creating additional files in the <filename
    62     class="directory">/etc/sysconfig/network-devices/services</filename>
    63     directory allows other IP assignment methods. This is commonly used for
    64     Dynamic Host Configuration Protocol (DHCP), which is addressed in the
    65     BLFS book.</para>
    6647
    6748    <para>The <envar>GATEWAY</envar> variable should contain the default
     
    6950    variable entirely.</para>
    7051
    71     <para>The <envar>PREFIX</envar> variable needs to contain the number of
    72     bits used in the subnet. Each octet in an IP address is 8 bits. If the
    73     subnet's netmask is 255.255.255.0, then it is using the first three octets
    74     (24 bits) to specify the network number. If the netmask is 255.255.255.240,
    75     it would be using the first 28 bits.  Prefixes longer than 24 bits are
    76     commonly used by DSL and cable-based Internet Service Providers (ISPs).
    77     In this example (PREFIX=24), the netmask is 255.255.255.0. Adjust the
    78     <envar>PREFIX</envar> variable according to your specific subnet.</para>
     52    <para>The following command creates a sample <filename>interface.eth0</filename>
     53    file for the <emphasis>eth0</emphasis> device:</para>
     54
     55<screen><userinput>cd /etc/network.d &amp;&amp;
     56cat &gt; /etc/network.d/interface.eth0 &lt;&lt; "EOF"
     57<literal># Network Interface Configuration
     58
     59# network device name
     60INTERFACE=eth0
     61
     62# set to yes to use DHCP instead of the settings below
     63DHCP=no
     64
     65# IP address
     66IPADDRESS=192.168.1.2
     67
     68# netmask
     69NETMASK=255.255.255.0
     70
     71# broadcast address
     72BROADCAST=192.168.1.255</literal>
     73EOF</userinput></screen>
     74
     75    <para>The <envar>INTERFACE</envar> variable should contain the name of
     76    the interface interface.</para>
     77
     78    <para>The <envar>DHCP</envar> variable if set to yes will allow you to
     79    use dhcp. If set to no, you will need to configure the rest of the options.</para>
     80
     81    <para>The <envar>IPADDRESS</envar> variable should contain the default
     82    IP address for this interface.</para>
     83
     84    <para>The <envar>NETMASK</envar> variable should contain the default
     85    Subnet Mask for the IP address for this interface.</para>
     86
     87    <para>The <envar>BROADCAST</envar> variable should contain the default
     88    Broadcast Address for the Subnet Mask of the IP Range being used on
     89    this interface.</para>
    7990
    8091  </sect2>
Note: See TracChangeset for help on using the changeset viewer.