diff options
author | Gerard Beekmans <gerard@linuxfromscratch.org> | 2001-04-29 19:49:07 +0000 |
---|---|---|
committer | Gerard Beekmans <gerard@linuxfromscratch.org> | 2001-04-29 19:49:07 +0000 |
commit | 9b3c02cac1ed3b2ce2bdd13d5135aefa0d55e588 (patch) | |
tree | 26ef9ed54d3c63898201835088a7ad7198289373 /chapter07/ethnet.xml | |
parent | 30e84b015e2ba9dac080903c8c8d76fda8669ce7 (diff) |
Added option to select the network interface through which the default
gateway can be reached
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@554 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/ethnet.xml')
-rw-r--r-- | chapter07/ethnet.xml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/chapter07/ethnet.xml b/chapter07/ethnet.xml index ac1cca09d..e42e5e868 100644 --- a/chapter07/ethnet.xml +++ b/chapter07/ethnet.xml @@ -18,6 +18,8 @@ following: # # Main script by Gerard Beekmans - gerard@linuxfromscratch.org # GATEWAY check by Jean-François Le Ray - jfleray@club-internet.fr +# "Specify which IF to use to reach default GATEWAY" by +# Graham Cantin - gcantin@pacbell.net # # @@ -59,12 +61,14 @@ case "$1" in # # If the /etc/sysconfig/network file contains a GATEWAY variable, set -# the gateway. +# the default gateway and the interface through which the default +# gateway can be reached. # if [ "$GATEWAY" != "" ]; then echo -n "Setting up routing for eth0 interface..." - /sbin/route add default gw $GATEWAY metric 1 + /sbin/route add default gateway $GATEWAY \ + metric 1 dev $GATEWAY_IF evaluate_retval fi ;; @@ -122,11 +126,15 @@ If a default gateway is required to be setup, the following command does that: <literallayout> <userinput>cat >> /etc/sysconfig/network << "EOF"</userinput> GATEWAY=192.168.1.2 +GATEWAY_IF=eth0 <userinput>EOF</userinput> </literallayout> <para> -GATEWAY needs to be changed to match the network setup. +GATEWAY and GATEWAY_IF need to be changed to match the network setup. +GATEWAY contains the address of the default gateway, and GATEWAY_IF +contains the network interface through which that default gateway can +be reached. </para> </sect2> |