> >> > >> I'm confused, or your using terminology I'm not understanding - by > >> definition, a default gateway is where I send packets that I don't > > know > >> how > >> to route - and therefore there can only be one "default gateway". > > Perhaps > >> you meant multiple routes between networks, which can already be added > >> with > >> ip. > > > > Multiple interfaces => multiple gateways. > > > > You misunderstand (or are using terminology I'm not understanding). > > A default gateway has a very specific meaning in networking terminology: > > Assume a network like this: > > eth0: 192.168.1.0\24 > eth1: 192.168.2.0\24 > > If a packet comes from eth0, addressed to 192.168.20.24, where shall I > send > it, since my routing table has no knowledge of that address? > > The answer is that I need to define an interface (and only one) to which I > should send packets addressed to an "unknown" network. It is assumed that > a > router on this interface will be better placed to handle the request. > > Having multiple *default* gateways makes no sense - if I get a packet that > I do not know how to route, which of the multiple default gateways should > I > send it to? If there is some form of filtering logic I can apply to the > packet to deduce which interface to route it to, then by definition the > packet is no longer unknown, since I have a defined route to send it down > (and static routing of this nature is very common) > > Hope thats clearer - the "default" route is where I send a packet that I > don't otherwise know how to handle. > > Note that I'm not saying multiple routes can't be configured, just that I > would prefer we not say multiple "default" routes, since that has special > meaning as per above. >
"If you have multiple interfaces and you configure a default gateway for each interface, TCP/IP by default automatically calculates an interface metric that is based on the speed of the interface. The interface metric becomes the metric of the default route in the routing table for the configured default gateway. The interface with the highest speed has the lowest metric for its default route. The result is that whenever multiple default gateways are configured on multiple interfaces, the fastest interface will be used to forward traffic to its default gateway. If multiple interfaces of the same speed have the same lowest interface metric, then, based upon the binding order, the default gateway of the first network adapter is used. The default gateway for the second network adapter is used when the first is unavailable." (src : Microsoft TechNet :) Real life example: a router connected with two internet bandwidth providers. One is cheap; the other is expensive but 100% reliable. You're connected to both of them with two interfaces, same subnet, different defaults gateways. You want to use the cheap provider as much as possible. Emmanuel Chriqui. -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page