source: BOOK/network/common/static.xml @ 5412eda

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 5412eda was 593f554e, checked in by Joe Ciccone <jciccone@…>, 15 years ago

Added DHCPCD depdency information.
Moved DHCPCD from the network section into the final system and updated the note about the optional build.
Updated the network configuration section.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  %general-entities;
6]>
7
8<sect1 id="ch-network-static">
9  <?dbhtml filename="network-static.html"?>
10
11  <title>Static Networking Configuration</title>
12
13  <sect2>
14    <title>Creating the Static Network Interface Configuration Files</title>
15
16    <para>Which interfaces are brought up and down by the network script
17    depends on the files and directories in the <filename
18    class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
19    This directory should contain a sub-directory for each interface to be
20    configured, such as <filename>ifconfig.xyz</filename>, where
21    <quote>xyz</quote> is a network interface name. Inside this directory
22    would be files defining the attributes to this interface, such as its IP
23    address(es), subnet masks, and so forth.</para>
24
25    <para>The following command creates a sample <filename>ipv4</filename>
26    file for the <emphasis>eth0</emphasis> device:</para>
27
28<screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
29mkdir -v ifconfig.eth0 &amp;&amp;
30cat &gt; ifconfig.eth0/ipv4 &lt;&lt; "EOF"
31<literal>ONBOOT=yes
32SERVICE=ipv4-static
33IP=192.168.1.1
34GATEWAY=192.168.1.2
35PREFIX=24
36BROADCAST=192.168.1.255</literal>
37EOF</userinput></screen>
38
39    <para>The values of these variables must be changed in every file to match
40    the proper setup. If the <envar>ONBOOT</envar> variable is set to
41    <quote>yes</quote> the network script will bring up the Network Interface
42    Card (NIC) during booting of the system. If set to anything but
43    <quote>yes</quote> the NIC will be ignored by the network script and not
44    be brought up.</para>
45
46    <para>The <envar>SERVICE</envar> variable defines the method used for
47    obtaining the IP address. The CLFS-Bootscripts package has a modular IP
48    assignment format, and creating additional files in the <filename
49    class="directory">/etc/sysconfig/network-devices/services</filename>
50    directory allows other IP assignment methods. This is commonly used for
51    Dynamic Host Configuration Protocol (DHCP), which is addressed in CBLFS.</para>
52
53    <para>The <envar>GATEWAY</envar> variable should contain the default
54    gateway IP address, if one is present. If not, then comment out the
55    variable entirely.</para>
56
57    <para>The <envar>PREFIX</envar> variable needs to contain the number of
58    bits used in the subnet. Each octet in an IP address is 8 bits. If the
59    subnet's netmask is 255.255.255.0, then it is using the first three octets
60    (24 bits) to specify the network number. If the netmask is 255.255.255.240,
61    it would be using the first 28 bits.  Prefixes longer than 24 bits are
62    commonly used by DSL and cable-based Internet Service Providers (ISPs).
63    In this example (PREFIX=24), the netmask is 255.255.255.0. Adjust the
64    <envar>PREFIX</envar> variable according to your specific subnet.</para>
65
66    <para>To configure another DHCP Interface, Follow <xref linkend="ch-network-dhcp"/>.</para>
67
68  </sect2>
69
70</sect1>
Note: See TracBrowser for help on using the repository browser.