mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
Updated default gateway setup to match LFS-bootscripts 2.1
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3497 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
8a240bed17
commit
ba85054d37
@ -20,25 +20,6 @@ case, you must remove the <filename>network</filename> symlinks from all the
|
|||||||
run-level directories
|
run-level directories
|
||||||
(<filename class="directory">/etc/rc.d/rc*.d</filename>)</para>
|
(<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 (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>
|
|
||||||
|
|
||||||
<screen><userinput>cat >> /etc/sysconfig/network << "EOF"</userinput>
|
|
||||||
GATEWAY=192.168.1.2
|
|
||||||
GATEWAY_IF=eth0
|
|
||||||
<userinput>EOF</userinput></screen>
|
|
||||||
|
|
||||||
<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>
|
<sect2>
|
||||||
<title>Creating network interface configuration files</title>
|
<title>Creating network interface configuration files</title>
|
||||||
|
|
||||||
@ -58,6 +39,7 @@ The following command creates a sample ifconfig.eth0 file:</para>
|
|||||||
ONBOOT=yes
|
ONBOOT=yes
|
||||||
SERVICE=static
|
SERVICE=static
|
||||||
IP=192.168.1.1
|
IP=192.168.1.1
|
||||||
|
GATEWAY=192.168.1.2
|
||||||
NETMASK=255.255.255.0
|
NETMASK=255.255.255.0
|
||||||
BROADCAST=192.168.1.255
|
BROADCAST=192.168.1.255
|
||||||
<userinput>EOF</userinput></screen>
|
<userinput>EOF</userinput></screen>
|
||||||
@ -75,6 +57,9 @@ additional files in /etc/sysconfig/network-devices/services, you can allow
|
|||||||
other IP assignment methods. This would commonly be used if you need DHCP,
|
other IP assignment methods. This would commonly be used if you need DHCP,
|
||||||
which is addressed in the BLFS book.</para>
|
which is addressed in the BLFS book.</para>
|
||||||
|
|
||||||
|
<para>Of course, GATEWAY should contain the IP of your default gateway, if you
|
||||||
|
have one. If not, them comment out the variable entirely.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
Loading…
Reference in New Issue
Block a user