[buug] gateway

johnd john at jjdev.com
Thu Oct 23 15:19:45 PDT 2003


On Thu, Oct 23, 2003 at 02:23:53PM -0700, Patrick Soltani wrote:
> Ok,
> you have linux box and linux DOES allow multiple interfaces each with a default gateway which is not System V and is really Linux centric.  BSD and Solaris do not allow this for a good reason.  The only other machine I have seen this is on, very logn long time ago, is irix.
> 
> Now if you have a single nic in the Linux box, then the behavior is "undefined" or at least short of looking at the source code is not clear.  My take is that it will "round robin" the default gateway.
> 
> Traceroute will cast some more light on this and will expose more issues ;-).
> 
> Regards,
> Patrick Soltani.
> 
> P.S.  
> "Logically Ended" meant to be "Logically ANDed", somehow my spell checker thinks it's smart than I :-(.
> 
> 
> >-----Original Message-----
> >From: johnd [mailto:john at jjdev.com]
> >Sent: Thursday, October 23, 2003 1:30 PM
> >To: Patrick Soltani
> >Cc: buug at weak.org
> >Subject: Re: [buug] gateway
> >
> >
> >
> >On Thu, Oct 23, 2003 at 01:20:28PM -0700, Patrick Soltani wrote:
> >> Hi,
> >> 
> >> Please post the "netstat -rn" if you think you have 2 
> >default gateway on a single host on a single network with 
> >single subnet mask.
> >> Very likely you have a static route, again "netstat -rn" 
> >will tell you exactly how the machine is working ;-).
> >
> >root at ldev:/home/john# netstat -rn
> >Kernel IP routing table
> >Destination     Gateway         Genmask         Flags   MSS 
> >Window  irtt Iface
> >192.168.164.0   0.0.0.0         255.255.254.0   U         0 0  
> >        0 eth0
> >127.0.0.0       0.0.0.0         255.0.0.0       U         0 0  
> >        0 lo
> >0.0.0.0         192.168.164.63  0.0.0.0         UG        0 0  
> >        0 eth0
> >0.0.0.0         192.168.164.251 0.0.0.0         UG        0 0  
> >        0 eth0
> >0.0.0.0         192.168.164.251 0.0.0.0         UG        0 0  
> >        0 eth0
> >root at ldev:/home/john# 
> >
> >> 
> >> TCP/IP 101 and the way gateway sees it:
> >> the packet's destination address is "logically Ended" with 
> >the subnetmak to determine if the packet belongs to the local 
> >net so it won't touch it, or it doesn't belong to the local 
> >net and forwards it to its next hop/router that it thinks will 
> >have a route.
> >> 
> >> Making the machine "forwarder" means that it now will pass 
> >the packet received on one interface to the other interface 
> >which in effect makes it a simplified form of router. 
> >> 
> >> Again to clarify what "works" for you and what is not 
> >possible by TCP/IP specs, just post the netstat -rn output and 
> >a "traceroute" to a machine outside of your network.  We can 
> >tell you exactly how the machine is routing or not and what 
> >would be the problems with the setup if any ;-).

no need to find more issues...it was a bad idea from the get go...





More information about the buug mailing list