Default Route question when there are two nic cards

John Austin ja at jaa.org.uk
Thu Oct 12 08:40:13 UTC 2006


Hi Dave

On Wed, 2006-10-11 at 21:04 -0600, David G. Miller wrote:
> Jeff Vian <jvian10 at charter.net> wrote:
> 
> >If your system is acting as a gateway router for other systems on your
> >local network there are different issues involving static routes.  For a
> >workstation on 2 different networks, only one default gateway can be
> >used.
> >
> This system is also my router.  eth0 (as per the annotations) has my 
> public IP address and is my gateway to my ISP.  eth1 is the gateway for 
> systems on my LAN.  That is, all of the systems on my LAN show a routing 
> table that looks something like:
> 
> [dave at bend ~]# netstat -n -r
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt 
> Iface
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 
> eth1
> 192.168.0.0     0.0.0.0         255.255.0.0     U         0 0          0 
> eth1
> 0.0.0.0         192.168.255.254 0.0.0.0         UG        0 0          0 
> eth1

That is fine

> 
> I point people in this direction because their next question is usually, 
> "How do I get the "other system" onto the internet?"  Also, only one 
> default gateway ends up defined in the routing table.  The system does 
> the right thing and uses the the default gateway specified for eth0 even 
> though the gateway specified by eth1 comes "later:"
> 
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt 
> Iface
> 72.19.169.0     0.0.0.0         255.255.255.0   U         0 0          0 
> eth0
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 
> eth1
> 192.168.0.0     0.0.0.0         255.255.0.0     U         0 0          0 
> eth1
> 0.0.0.0         72.19.169.1     0.0.0.0         UG        0 0          0 
> eth0

There is no gateway shown associated with eth1 !?

So no notice has been taken of the GATEWAY=72.19.169.230
in /etc/sysconfig/network-scripts/ifcfg-eth1

I cannot see that this entry achieves anything

John








More information about the fedora-list mailing list