[NTLUG:Discuss] Setting the default GW at boot

Phil Carinhas pac at fortuitous.com
Tue Dec 26 22:32:04 CST 2000


>  >  Remember you can have more than one gateway, but only One default gateway.
>  >  The default GW is where everything goes if all other gateways fail.
> 
> Well, according to RFC 1122, Page 49:
> -------------------------------------------------------------------
> When there is no route cache entry for the destination host address
> (and the destination is not on the connected, the IP layer MUST pick
> a gateway from its list of "default" gateways. The IP layer MUST
> support multiple default gateways.
> -------------------------------------------------------------------
 
> Now mind you, only a few operating systems support this, Solaris being one
> of them.  Since Solaris round-robins at the packet level and not the TCP/UDP
> stream level, in between the default routes many nasty things can happen.
 
  I thought we were talking about Linux, ROUTE(8), and not the RFC's !?
 According to Linux Networking HOWTO - DocBook Rev .02:

=========================================================
It would be a very difficult job to have to add routes to every possible 
destination network, so there is a special trick that is used to simplify 
this task. The trick is called the `default' route. The default route 
matches every possible destination, but poorly, so that if any other entry 
exists that matches the required address it will be used instead of the 
default route. The idea of the default route is simply to enable you to 
say "and everything else should go here". 
In the example I've contrived you would use an entry like:

         root# route add default gw 192.168.1.1 eth0
=========================================================

  -Phil C.
.---------------------------------------------------------
| P. A. Carinhas, Ph.D.        |  pac at fortuitous.com      |
| Fortuitous Technologies Inc. |  http://fortuitous.com   |
 ---------------------------------------------------------



More information about the Discuss mailing list