Route problem
Hello,
The following error occur when I type route add -net 10.0.0.0 netmask 255.255.255.0 gw 192.16.0.2 SIOCADDRT: Network is unreachable OS: Centos 5 Thx |
"gw 192.16.0.2", is this accurate or meant to be "gw 192.168.0.2".
In my experiences it'll need to be done one of a couple ways depending on scenario and versions. first, make sure that your host (i'll call it 192.168.0.3) can route to your default gw (192.168.0.1) to the world. now, assuming that 192.168.0.2 is a system that has connection to 10.0.0/24 we'll want to use it as a gw for all of that traffic so you'll want to tell 0.3 host how to send 10. traffic with something like... Code:
route add -net 10.0.0.0/24 gw 192.168.0.2 dev eth0 /etc/sysconfig/network-scripts/route-eth0: Code:
10.0.0.0/24 via 192.168.0.2 dev eth0 hope this helps. If I'm not even close, please provide more details about your network configuration to better understand your situation and see if we are not able to identify a better solution for you. ;-) |
you can do this as well route is depreciated.
Code:
ip route add 10.0.0.0/24 via 192.168.0.2 |
Quote:
1. is it 192.16.0.2 or 192.168.0.2? 2. can you ping 192.168 segment from you 10.0.0 segment? if yes you need 10.0.0.0/24 or /125 /26 or whatever you prefer on your route command |
All times are GMT -5. The time now is 08:18 PM. |