diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2004-05-03 10:59:46 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2004-05-03 10:59:46 +0000 |
commit | 673b0d84ba9591e07c0bdf0ee49d92eba10f502c (patch) | |
tree | 129e27a1450727b440da4378e0117a468eb9c25e /chapter07/network.xml | |
parent | 287ea55da70ceb1f0990554b7db921d525fef816 (diff) |
* Merged newxml into HEAD
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3435 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/network.xml')
-rw-r--r-- | chapter07/network.xml | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/chapter07/network.xml b/chapter07/network.xml index f8a1f3e58..18b44411f 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -1,6 +1,15 @@ +<?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; +]> <sect1 id="ch-scripts-network"> <title>Configuring the network script</title> -<?dbhtml filename="network.html" dir="chapter07"?> +<?dbhtml filename="network.html"?> + +<indexterm zone="ch-scripts-network"> +<primary sortas="d-network">network</primary> +<secondary>configuring</secondary></indexterm> <para>This section only applies if you're going to configure a network card.</para> @@ -8,13 +17,13 @@ card.</para> <para>If you don't have any network cards, you are most likely not going to create any configuration files relating to network cards. If that is the case, you must remove the <filename>network</filename> symlinks from all the -runlevel directories +run-level directories (<filename class="directory">/etc/rc.d/rc*.d</filename>)</para> <sect2> <title>Configuring default gateway</title> -<para>If you're on a network you may need to set up the default gateway for +<para>If you're on a network you may need to set up the default gateway (a node on your network that provides access to other networks) for this machine. This is done by adding the proper values to the /etc/sysconfig/network file by running the following:</para> @@ -42,11 +51,12 @@ network interface name (such as eth0 or eth0:1)</para> directory, make sure you update the /etc/sysconfig/rc file as well and update the network_devices by providing it with the new path.</para> -<para>Now, new files are created in that directory containing the following. +<para>Now, new files are created in that directory. The following command creates a sample ifconfig.eth0 file:</para> <screen><userinput>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"</userinput> ONBOOT=yes +SERVICE=static IP=192.168.1.1 NETMASK=255.255.255.0 BROADCAST=192.168.1.255 @@ -54,18 +64,25 @@ BROADCAST=192.168.1.255 <para>Of course, the values of those variables have to be changed in every file to match the proper setup. If the ONBOOT variable is set -to yes, the network script will bring it up during the booting of the system. -If set to anything else but yes, it will be ignored by the network script -and thus not brought up.</para> +to yes, the network script will bring up the equivalent NIC (Network Interface Card) + during the booting of the system. +If set to anything but yes, the equivalent NIC will be ignored by the network script +and not brought up.</para> + +<para>The SERVICE entry defines the method of obtaining the IP address. +The LFS bootscripts have a modular IP assignment format, and by creating +additional files in /etc/sysconfig/network-devices/services, you can allow +other IP assignment methods. This would commonly be used if you need DHCP, +which is addressed in the BLFS book.</para> </sect2> <sect2> <title>Creating the /etc/resolv.conf file</title> -<para>If you're going to be connected to the internet then most likely you'll -need some means of DNS name resolution to resolve internet domain names to IP -addresses. This is best achieved by placing the IP address of a DNS server +<para>If you're going to be connected to the Internet then most likely you'll +need some means of DNS name resolution to resolve Internet domain names to IP +addresses. This is best achieved by placing the IP address of your DNS, available from your ISP (Internet Service Provider) or network administrator, into <filename>/etc/resolv.conf</filename>. Create the file by running the following:</para> @@ -78,10 +95,9 @@ nameserver <IP address of your nameserver> <userinput>EOF</userinput></screen> <para>Of course, replace <IP address of your nameserver> with the IP -address of the DNS server most appropriate for your setup. This will often be -provided by your ISP or it may even be a router on your local network.</para> +address of the DNS most appropriate for your setup. There will often be +more than one entry (requirements demand secondary servers for fallback capability). The IP address may even be a router on your local network.</para> </sect2> </sect1> - |