2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2004-01-27 22:29:49 +00:00
|
|
|
<sect1 id="ch-scripts-network">
|
2005-01-30 11:27:57 +00:00
|
|
|
<title>Configuring the network Script</title>
|
2004-05-03 11:59:46 +01:00
|
|
|
<?dbhtml filename="network.html"?>
|
|
|
|
|
2002-01-15 21:51:38 +00:00
|
|
|
|
|
|
|
<sect2>
|
2005-01-30 11:27:57 +00:00
|
|
|
<title>Creating Network Interface Configuration Files</title>
|
2002-01-15 21:51:38 +00:00
|
|
|
|
2004-12-20 19:09:48 +00:00
|
|
|
<para>The following command creates a sample <filename>ipv4</filename> file for the
|
2004-07-14 21:49:05 +01:00
|
|
|
<filename>eth0</filename> device:</para>
|
2002-01-15 21:51:38 +00:00
|
|
|
|
2004-07-14 21:49:05 +01:00
|
|
|
<screen><userinput>cd /etc/sysconfig/network-devices &&
|
|
|
|
mkdir ifconfig.eth0 &&
|
|
|
|
cat > ifconfig.eth0/ipv4 << "EOF"
|
2005-01-30 12:51:22 +00:00
|
|
|
<literal>ONBOOT=yes
|
2004-07-14 21:49:05 +01:00
|
|
|
SERVICE=ipv4-static
|
2002-01-15 21:51:38 +00:00
|
|
|
IP=192.168.1.1
|
2004-05-06 21:18:25 +01:00
|
|
|
GATEWAY=192.168.1.2
|
2004-07-15 20:33:53 +01:00
|
|
|
PREFIX=24
|
2005-01-30 12:51:22 +00:00
|
|
|
BROADCAST=192.168.1.255</literal>
|
2004-06-19 17:54:58 +01:00
|
|
|
EOF</userinput></screen>
|
2002-01-15 21:51:38 +00:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
2004-06-19 17:54:58 +01:00
|
|
|
<sect2 id="resolv.conf">
|
2005-01-30 12:51:22 +00:00
|
|
|
<title>Creating the /etc/resolv.conf File</title>
|
2004-01-10 01:10:21 +00:00
|
|
|
|
2004-12-20 19:09:48 +00:00
|
|
|
<para>Create the file by running the following:</para>
|
2004-01-10 01:10:21 +00:00
|
|
|
|
2004-06-19 17:54:58 +01:00
|
|
|
<screen><userinput>cat > /etc/resolv.conf << "EOF"
|
2005-01-30 12:51:22 +00:00
|
|
|
<literal># Begin /etc/resolv.conf
|
2004-01-10 01:10:21 +00:00
|
|
|
|
2004-07-14 21:49:05 +01:00
|
|
|
domain {<replaceable>[Your Domain Name]</replaceable>}
|
2005-01-30 12:51:22 +00:00
|
|
|
nameserver <replaceable>[IP address of your primary nameserver]</replaceable>
|
|
|
|
nameserver <replaceable>[IP address of your secondary nameserver]</replaceable>
|
2004-01-10 01:10:21 +00:00
|
|
|
|
2005-01-30 12:51:22 +00:00
|
|
|
# End /etc/resolv.conf</literal>
|
2004-06-19 17:54:58 +01:00
|
|
|
EOF</userinput></screen>
|
2004-01-10 01:10:21 +00:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
2002-01-15 21:51:38 +00:00
|
|
|
</sect1>
|