source: BOOK/network/common/static.xml@ 4588a6c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 4588a6c was 572d0a6, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Update text around the configuration of Static and DHCP IPs.

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[0b9e109]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
[3f8be484]5 %general-entities;
6]>
7
[593f554e]8<sect1 id="ch-network-static">
9 <?dbhtml filename="network-static.html"?>
[3f8be484]10
[593f554e]11 <title>Static Networking Configuration</title>
[3f8be484]12
13 <sect2>
[593f554e]14 <title>Creating the Static Network Interface Configuration Files</title>
[3f8be484]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
[c62aadc]22 would be files defining the attributes to this interface, such as its IP
23 address(es), subnet masks, and so forth.</para>
[3f8be484]24
25 <para>The following command creates a sample <filename>ipv4</filename>
[c62aadc]26 file for the <emphasis>eth0</emphasis> device:</para>
[3f8be484]27
28<screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
[661d1a4]29mkdir -v ifconfig.eth0 &amp;&amp;
[3f8be484]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
[572d0a6]39 <para os="var-ob">The values of these variables must be changed in every file to match
[c62aadc]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>
[3f8be484]45
[572d0a6]46 <para os="var-s">The <envar>SERVICE</envar> variable defines the method used for
[fb40919]47 obtaining the IP address. The CLFS-Bootscripts package has a modular IP
[3f8be484]48 assignment format, and creating additional files in the <filename
49 class="directory">/etc/sysconfig/network-devices/services</filename>
[572d0a6]50 directory allows other IP assignment methods.</para>
[3f8be484]51
52 <para>The <envar>GATEWAY</envar> variable should contain the default
53 gateway IP address, if one is present. If not, then comment out the
54 variable entirely.</para>
55
[c62aadc]56 <para>The <envar>PREFIX</envar> variable needs to contain the number of
57 bits used in the subnet. Each octet in an IP address is 8 bits. If the
58 subnet's netmask is 255.255.255.0, then it is using the first three octets
59 (24 bits) to specify the network number. If the netmask is 255.255.255.240,
60 it would be using the first 28 bits. Prefixes longer than 24 bits are
61 commonly used by DSL and cable-based Internet Service Providers (ISPs).
62 In this example (PREFIX=24), the netmask is 255.255.255.0. Adjust the
63 <envar>PREFIX</envar> variable according to your specific subnet.</para>
[3f8be484]64
[593f554e]65 <para>To configure another DHCP Interface, Follow <xref linkend="ch-network-dhcp"/>.</para>
[3f8be484]66
67 </sect2>
68
69</sect1>
Note: See TracBrowser for help on using the repository browser.