diff options
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> |