Re: How to set default gw not by route command in linux?



steve_schefter@xxxxxxxxxxx wrote:
Floyd L. Davidson wrote:
Suppose I had two interfaces, 1.x.x.x and 2.x.x.x and I want to
get to 3.x.x.x, and I have two "gateways", how would IP know
which gateway to forward the datagram to?

There is no problem at all with multiple gateways. You could
feasibly have a gateway assigned to virtually *every* route in
the table.

<snip example>

Sure, there can only be one *default*, but his mistake was
saying "Gateways are for default routes.", which is not true.

Your mistake is confusing "gateway" with "default".

This is all well and good, but as I said the GATEWAYs listed in the
ifcfg-ethN (what the OP was asking about) are default gateways.
The scripts use these values and do a "route add default..."

You did *not* say that, and neither you nor Bill Unruh tied the
one gateway to being one gateway, to be specified in that
particular configuration file, for the default route. He flat
said one gateway in the route table, period. So did you.

Other uses of "gateway" are possible, but as Unruh said and
I supported, having multiple of them in the ifcfg-ethN files is
not useful.

Yes, and you *should* have explained *correctly* why that is true.

Saying that gateways are *only* for the default route, and that
there can only be one in the entire route table, is not correct.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx
.



Relevant Pages

  • Re: 2003 - multiple nics multiple subnets
    ... has either a direct route out of the private system or the route to some ... Default Gateways are only for "unspecified routes",.... ... All other destinations are "specified routes" and use Routing ... > We have currently a windows 2000 advanced server with 4 NICs each having ...
    (microsoft.public.windows.server.networking)
  • Re: adsl + cable multiple connection problem
    ... >> But when the ADSL connection fails, ... the whole multipath route. ... probably alive gateways). ... The benefit is only the proper routing for NAT connections over ...
    (comp.os.linux.networking)
  • Re: 2003 - multiple nics multiple subnets
    ... Brian ... > has either a direct route out of the private system or the route to some ... > places you don't own and don't have defined in a Routing Table,...such as ... > Table entries and don't use Default Gateways. ...
    (microsoft.public.windows.server.networking)
  • Re: SBS Firewall
    ... > gateways be 10.0.0.1, the hard firewall. ... > SO change routes in DHCP or manually GateWay the workstations? ... So I usually do the "single NIC, hardware firewall appliance" route ...
    (microsoft.public.windows.server.sbs)
  • Re: Configure 1 adapter with 2 Gateways
    ... Using Route to add Multiple Gateways, ... console are you supplying an machine IP address and ...
    (microsoft.public.windows.server.networking)