Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-17-2003, 10:17 AM   #1
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 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 netmask 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,
Old 12-17-2003, 12:03 PM   #2
LQ Newbie
Registered: Dec 2003
Posts: 9

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

I could be wrong, but this may help.
Old 12-17-2003, 12:28 PM   #3
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= nemask

Host B
ip= nemask
ip= nemask

Host A's default route would be
route -add net netmask gw
route -add net netmask gw


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:51 AM.

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