LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-30-2002, 10:02 AM   #1
PMcQueen
LQ Newbie
 
Registered: Jan 2002
Posts: 1

Rep: Reputation: 0
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?
 
Old 01-30-2002, 10:30 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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
 
Old 01-30-2002, 02:27 PM   #3
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default gateway dooda5555 Linux - Networking 1 06-17-2005 11:43 AM
HELP default gateway MrSavage Linux - Newbie 2 01-10-2005 07:46 AM
Default Gateway rrosenkoetter Linux - Networking 3 08-27-2004 08:41 AM
default gateway avikosan Linux - Networking 3 12-09-2003 05:47 PM
What's a default gateway and do I need one? Travis86 Linux - Newbie 8 05-25-2003 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration