LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Default Gateway Question? (https://www.linuxquestions.org/questions/linux-networking-3/default-gateway-question-13082/)

PMcQueen 01-30-2002 10:02 AM

Default Gateway Question?
 
Does the default gateway have to be on the same subnet as the linux box.

Linux box is on subnet A. Cisco switch between A and B. The gateway to the internet is on subnet B. I have put a route in to subnet B and can ping machines on subnet B from the linux box.
I try to "route add default gw xxx.xxx.xxx.1". This returns an errror message "SIOCADDRT: Network is unreachable"

Is it possible to have your default gateway on a different subnet?

acid_kewpie 01-30-2002 10:30 AM

well, no, if it's on a different subnet that naturaly it's unreachable on that subnet. there should be a gateway on your own subnet which can route traffic to the external gateway

finegan 01-30-2002 02:27 PM

Actually, I'm pretty sure you can, with ethernet bridging as long as one machine has a connection to both subnets, but that's a friggin headache to set-up.

Lemme figure this out, You want:

Subnet A (machine 1, machine 2)
Subnet B (machine 2, machine 3)

And you want 1 to use 3 as a gateway?

Bridging should pull it off... I think...

Cheers,

Finegan


All times are GMT -5. The time now is 05:35 PM.