On 24 Nov 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>,
(E-Mail Removed) wrote:
>Yes, you might need to get to other networks via a gateway, but
>you still can't have multiple gateways. Even if you have multiple
>interfaces.
[conover ~]$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 89948 eth0
192.168.2.0 192.168.1.6 255.255.255.0 UG 0 0 32165 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 388 lo
0.0.0.0 192.168.1.248 0.0.0.0 UG 0 0 2673 eth0
[conover ~]$
And why not?
>Suppose I had two interfaces, 1.x.x.x and 2.x.x.x and I want to
>get to 3.x.x.x, and I have two "gateways", how would IP know
>which gateway to forward the datagram to?
Nomenclature problems - but that would depend on what your routing code is
doing. For an ordinary workstation, you can only have one _usable_ gateway
to a given address. In Linux, if you have two (or more) gateways leading to
the same address, then the last one defined (OR the one with the lowest
metric) wins. But a router with multiple routes to a destination _CAN_ use
any of them - perhaps depending on [perceived] traffic levels.
>The only benefit to having multiple GATEWAYs is in case one
>interface is down (the script checks this).
You mean routing daemons like gated or routed?
Old guy