--- Jim Cunning
Tuesday 3 June 2003 at 11:56am, Martin wrote:
Linux WILL allow you to configure multiple
default
routes, but this generally makes sense only if you have multiple interfaces, or you are running a routing protocol. On your end host, which appears from your
I don't think this is true either. It makes sense to have multiple default gateways even with one interface as you may want to do load balancing via 2 or more next hops or for redundancy purpose and has nothing to do with routing protocol as static default route is mostly being used for end nodes not running any routing protocols. I disagree. An end host with a single interface, as in this situation, has no business trying to make load-balancing decisions that would be best made by the router owning the multiple interfaces with the information about the state of those interfaces as well as the knowledge about traffic on them from other end hosts. Moreover, router redundancy is handled by routers, not hosts, as it is very undesirable that hosts actually have to make decisions about what router to attempt to reach. VRRP, for example, makes it simple to hosts not to need to worry about what router to contact.
Agreed, but VRRP/HSRP was not subject here ... there are still some routers which don't support that, subject was whether it makes sense :) and to me it does if you don't have any other options. Not that I would ever do that but I've seen folks doing it this way for redundancy or just for heck of it they could.
The other thing is that doing routing the way the default gateway is on the different IP subnet then host even being on the same physical 'cable' impose significant performance degradation as for each packet there has to be done recursive route lookup plus arp-ing, so even Anders showed it's possible to make it work it's not the best practice.
I don't understand what recursion you're talking about. There is a single
RT is not that simple to me, say you have RT below Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 99.99.99.99 * 255.255.255.255 UH 0 0 0 eth1 10.6.141.0 * 255.255.255.0 U 0 0 0 eth1 loopback * 255.0.0.0 U 0 0 0 lo default 99.99.99.99 0.0.0.0 UG 0 0 0 eth1 and there is packet with DIP 100.100.100.100 to be send, so you try to find the match from top to the bottom where you get last default route match pointing to 99.99.99.99 but then you have to search through same RT one more time to find out how to get to 99.99.99.99 as it's not on your directly connected subnet. In such case the performance degradation won't be most likely so impacting for small data transfer but for big data transfer you'd see the difference.
route table in the end host that is searched using longest prefix match until (in this case) the default route entry is found and the packet sent to the next hop gateway.
ARP-ing should not be a factor whether the gateway host is on the same subnet or not. ARP is done once for each IP address on the wire, and the MAC address received cached in the ARP table until it expires. I've not tested the performance of this type of configuration, but I would be surprised if it were different at all, let alone significantly different.
Ok, I must take this back, as I've tried both and Linux builds the arp cache and re-arps every ~60 seconds regardless so most likely 60 seconds is arp aging time. If that's the case is it configurable? Martin
I do agree that this type of configuration is not the best practice.
Regards, Jim
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com