-   Linux - Networking (
-   -   routing from one subnet to another (

NetAX 06-10-2004 07:53 AM

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.

chort 06-10-2004 06:28 PM

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.

NetAX 06-16-2004 09:10 AM

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?

All times are GMT -5. The time now is 11:27 AM.