LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-17-2003, 10:17 AM   #1
mikewelter
LQ Newbie
 
Registered: Apr 2003
Location: Evergreen, CO
Distribution: Fedora Core 3
Posts: 12

Rep: Reputation: 0
Gateway on different subnet


Using RH9, I have a network address of x.x.18.26, but the gateway is on a different subnet--x.x.16.1.

I have successfully installed a route to the gateway:
route add -host x.x.16.1 netmask 255.255.255.255 gw x.x.18.26 dev eth1
and I am able to ping the gateway host.

However, I'm unable to enter a default route:
route add -net 0.0.0.0 netmask 0.0.0.0 gw x.x.16.1 dev eth1
it says that the network is unavailable.

Can someone tell me how to properly configure this adapter?

Thank you,
Mike
 
Old 12-17-2003, 12:03 PM   #2
bnutting
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Rep: Reputation: 0
I would guess that your netmask would be 255.255.0.0 and that your subnet would be x.x.0.0

I could be wrong, but this may help.
Bryan
 
Old 12-17-2003, 12:28 PM   #3
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
You don't give an ip addres on a different get work as the gateway address, but the address a the machine on your network that can reach that network.

For example

Host A
ip=10.0.0.1 nemask 255.255.255.0

Host B
ip=10.0.0.2 nemask 255.255.255.0
ip=129.1.1.1 nemask 255.255.255.0

Host A's default route would be
route -add net 0.0.0.0 netmask 0.0.0.0 gw 10.0.0.2
not
route -add net 0.0.0.0 netmask 0.0.0.0 gw 129.1.1.1
 
  


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
another subnet. bruse Linux - Networking 1 07-19-2005 12:35 PM
Odd problem: Gateway unreachable after certain amount of time (Win XP Gateway) SocialEngineer Linux - Networking 2 08-13-2004 12:54 AM
How to connect to a gateway on a different subnet? anGeR Linux - Networking 1 04-09-2004 08:50 AM
a /27 within a /24 subnet arnix Linux - Networking 1 07-16-2003 09:16 PM
Can IP from different subnet be configured on another subnet russell Linux - Networking 1 08-23-2002 01:47 AM

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

All times are GMT -5. The time now is 10:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration