[buug] gateway

Jon McClintock jammer at weak.org
Wed Oct 22 11:50:21 PDT 2003


On Wed, Oct 22, 2003 at 11:25:12AM -0700, johnd wrote:
> Is it ok to define two default gateways?
> 
> to me be name 'default gateway' implies one, but I have a box that
> has a route to a other lan and needs a route to the internet
> 
> so I just added another default gateway and everything works great
> 
> just want to make sure this is not a problem

While it may work, it doesn't really makes sense. Your default gateway
should be the one that is used to connect to networks that aren't
explicitly specified in your routing table. 

So, in your routing table, you should have two entries, one specifying
the gateway for the local network, and a second specifying the default
route (the gateway to the Internet).

Take a look at:

  http://kernelnewbies.org/documents/ipnetworking/linuxipnetworking.html

Skimming past the bits about the actual Linux implementation, and
focusing on the IP routing bits.

-Jon




More information about the buug mailing list