Re: default GW 2 hops away?

Tim Fletcher (tim@night-shade.demon.co.uk)
Fri, 12 Mar 1999 01:36:33 +0000 (GMT)


> > Should it be possible to set a default gateway that is 2 hops away?
> > I have a router on my local subnet that can route to another
> > network in which there is a desired default gateway that will route
> > to the rest of the world. I get a "SIOCADDRT: Network is unreachable"
> > error when I try to set the default gateway though...
>
> Maybe I'm missing something but why do you want to do this? The default
> gateway in this case ought to be the router on your subnet, which should
> forward the packets in turn to _its_ default router, which would be the
> one to the outside world. Gateway routers should always be on the same
> subnet as you since the basic definition of a gateway is "a router on the
> local subnet that can get my packets to one or more other subnets." A
> gateway two hops away is something of an oxymoron. :)

Can you not use "funny" netmasks, here at uni we have three subnets
(xxx.xxx.224.xxx, xxx.xxx.225.xxx, xxx.xxx.226.xxx) all share the route
xxx.xxx.224.199. My netmask is set to 255.255.240.0 and I can talk to a
225 host (I am a 224 host) without talking to the router.

This depends if the router is 2 physical hops away or 2 logical hops away
(ie on the same broadcast ether)

Tim Fletcher .~.
/V\ L I N U X
tjdf@st-andrews.ac.uk // \\ >Don't fear the penguin<
tim@night-shade.demon.co.uk /( )\
^^-^^
"Courage will take you to the most dangerous places on Earth.
Overwhelming firepower will see you safely through them."
-Syndicate Wars

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu