Register a domain and help support LQ
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 06-10-2004, 06:53 AM   #1
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147

Rep: Reputation: 17
routing from one subnet to another

Hi , I know that this may have been asked before several times. But I could not find a definite answer.

First of all, I recently divided my network with two subnets from my DHCP server.

eth0 eth1

I want to be able to give internet access to the subnet

I have a crossover connected. to my subnet interface such as this:

COMP<-CROSSOVER-- subnet-eth1--><SERVER--><->outsideworld/external router.

Both subnets work as there supposed to .(assigning IP's, etc.)
My subnet can fully access the internet through another router, so that doesnt have to be configured for routing.

I have tried using the command "route add" but i cant seem to get it to work properly.

#route -n
Kernel IP routing table
Destination Gateway Genmask Flags Use Iface UGH 0 eth0 UGH 0 eth1 UGH 0 eth1 UGH 0 lo UG 0 eth0 UG 0 eth1 UG 0 eth1 UG 0 eth0 UG 0 eth0

Any help would be greatly appreciated.
Old 06-10-2004, 05:28 PM   #2
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
You need to enable IP forwarding on the box that is in the middle. On the machine labeled COMP in your diagram, you need to add a route to (you don't mention what bitmask/netmask you're using) with the gateway being the IP of eth1 on SERVER.

Which ever machine is doing the NAT to the outside world needs a route to (again, bitmask/netmask???) and gateway will be the IP of eth0 on your SERVER machine.

Without all three of those things, it won't work.
Old 06-16-2004, 08:10 AM   #3
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147

Original Poster
Rep: Reputation: 17
I did enable IP forwarding with YaST(I'm using SuSE pro 9.0).

Using the route command I am not able to add bitmask, I am only able to add the netmask (which is by the way).

The only route that is working is the default route which i set to point to

On the subnet I tried doing an NSLOOKUP and was able to receive the IP addresses of in my test.



Non-authoritative answer:

But when i do ping it comes up as:

ping [] <--It somehow knows what IP address to ping.

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Doing this on the other subnet gives no problems. Maybe my routing table is wrong? Any help?


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
routing http traffic to the correct box on subnet nodine Linux - Security 1 07-15-2004 09:51 AM
Help with Subnet Routing xatmes Linux - Networking 6 04-26-2004 11:52 PM
Aargh!!! Not routing to local subnet sancho5 Linux - Networking 5 02-10-2004 02:11 AM
routing problem with the same subnet nobody Linux - Newbie 1 10-03-2003 02:23 PM
NAT'd subnet routing question ealpert1 Linux - Networking 10 05-19-2003 02:07 PM

All times are GMT -5. The time now is 10:31 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