Results 1 to 3 of 3
Thread: Static Routes
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jun 2008
I have 2 machines on 2 different subnets (192.168.1.2) (192.168.2.2)
traffic is passing thru 2 cisco switches
i added the route to the 192.168.2.0 network on machine1
route add -net 192.168.2.0/24 gw 192.168.1.1
now if i added this route to machine1, i should be able to hit whatever is in the 192.168.2.0 network? i wasnt able to so i added the
route add -net 192.168.1.0/24 gw 192.168.2.1 to machine 2 and i was able to finally hit it. i thought by adding a static route on one machine it knows the path to the other network. why did i have to add the route to the incoming network on machine2? hope this makes sense
Do you have default routes setup on your machines?
If so you should not need to add these routes.
What does the following give you;
The adventure of a life time.
Linux User #296285
- Join Date
- Apr 2004
You needed to add the network static route on the first machine so it knew how to find the network of the second machine. In the same way, the second machine needed to know how to send traffic back.
As lazydog says, you may be able to set up the switches so all this is handled transparently.
Let us know how you get on,
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.