aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/network.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2002-01-15 21:51:38 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2002-01-15 21:51:38 +0000
commit00a2bd121df643e2a082e9e4aa6547c6f532c32a (patch)
tree9d9427a5cca7dc03a1d7edca5ae4193e1988f50d /chapter07/network.xml
parenta3be86d6288bc86d6aa202aabec30e526cc4e7d2 (diff)
last changes
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1445 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/network.xml')
-rw-r--r--chapter07/network.xml60
1 files changed, 60 insertions, 0 deletions
diff --git a/chapter07/network.xml b/chapter07/network.xml
new file mode 100644
index 000000000..67278f919
--- /dev/null
+++ b/chapter07/network.xml
@@ -0,0 +1,60 @@
+<sect1 id="ch07-network">
+<title>Configuring the network script</title>
+<?dbhtml filename="network.html" dir="chapter07"?>
+
+<para>This section only applies if you're going to configure a network
+card.</para>
+
+<sect2>
+<title>Configuring default gateway</title>
+
+<para>If you're on a network you may need to setup the default gateway for
+this machine. This is done by adding the proper values to the
+/etc/sysconfig/network file by running the following:</para>
+
+<para><screen><userinput>cat &gt;&gt; /etc/sysconfig/network &lt;&lt; "EOF"</userinput>
+GATEWAY=192.168.1.2
+GATEWAY_IF=eth0
+<userinput>EOF</userinput></screen></para>
+
+<para>The values for GATEWAY and GATEWAY_IF need to be changed to match
+your network setup. GATEWAY contains the IP address of the default
+gateway, and GATEWAY_IF contains the network interface through which the
+default gateway can be reached.</para>
+
+</sect2>
+
+<sect2>
+<title>Creating network interface configuration files</title>
+
+<para>Which interfaces are brought up and down by the network script depends on
+the files in the /etc/sysconfig/network-devices directory. This
+directory should contain files in the form of ifconfig.xyz, where xyz is a
+network interface name (such as eth0 or eth0:1)</para>
+
+<para>First let's create this directory by running:</para>
+
+<para><screen><userinput>mkdir /etc/sysconfig/nic-config</userinput></screen></para>
+
+<para>Now, new files are created in that directory containing the following.
+The following command creates a sample ifconfig.eth0 file:</para>
+
+<para><screen><userinput>cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0 &lt;&lt; "EOF"</userinput>
+ONBOOT=yes
+DEVICE=eth0
+IP=192.168.1.1
+NETMASK=255.255.255.0
+BROADCAST=192.168.1.255
+<userinput>EOF</userinput></screen></para>
+
+<para>Of course, the values of those variables have to be changed
+in every file to match the proper setup. Usually NETMASK and BROADCAST
+will remain the same, just the DEVICE and IP variables will change per
+network interface. If the ONBOOT variable is set to yes, the network script
+will bring it up during boot up of the system. If set to anything else but
+yes it will be ignored by the network script and thus not brought up.</para>
+
+</sect2>
+
+</sect1>
+