Gateway problem

inode0 inode0 at gmail.com
Wed Feb 22 01:06:07 UTC 2006


On 2/21/06, Rick Stevens <rstevens at vitalstream.com> wrote:
> On Mon, 2006-02-20 at 02:06 -0600, inode0 wrote:
> > I guess. There can be multiple default gateways although only one
> > active at a time. My preference is that each interface have an
> > appropriate gateway set for it and which is used as the default
> > network gateway is controlled by setting GATEWAYDEV in
> > /etc/sysconfig/network rather than by setting the default gateway
> > directly there.
>
> No, there is only ONE default gateway.  The rest are network- or device-
> specific gateways.  GATEWAYDEV simply forces the default gateway to use
> a specific device, but the source address of the packets so routed will
> still have the original address.

Serious question:

How do the following two arrangements differ in practice?

(1) Set GATEWAY=10.10.1.254 in /etc/sysconfig/network

(2) Set GATEWAY=10.10.1.254 in the eth0 profile and set
GATEWAYDEV=eth0 in /etc/sysconfig/network

I wasn't really thinking about the gateway being defined by DHCP but
if it is isn't it put in the interface profile anyway?

I'm sitting at a box with three NICs, each connecting to a different
network. The gateway I use as the default seems tied to the interface
anyway. So it seems that controlling the default via GATEWAYDEV makes
good sense (until you help me understand why it doesn't at least).

Less seriously:

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.10.0.0       *                     255.255.255.0    U       0      
0        0   eth0
10.10.1.0       *                      255.255.255.0   U        0     
 0        0  eth1
0.0.0.0          10.10.1.254       0.0.0.0             UG     0      
0        0   eth0
0.0.0.0          10.10.0.254       0.0.0.0             UG     0      
0        0   eth1

What would you call those last two things? *** picture John ducking
*** When I said you could have multiple default gateways this is what
I had in mind when I said it.

John




More information about the Redhat-install-list mailing list