Help - Search - Members - Calendar
Full Version: Why Can't I Add This Route?
Linuxhelp > Support > Technical Support
bigfoot
Why can't I add this route? I know it's on another subnet and all, but I do have a route to that subnet, and I can reach the host in question.



CODE
tarzan root # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.3.0.2        *               255.255.255.255 UH    0      0        0 tun1
0-1pool152-19.n catmsm6.cnt.com 255.255.255.255 UGH   0      0        0 eth0
10.0.0.0        10.3.0.2        255.255.255.0   UG    0      0        0 tun1
139.93.6.0      *               255.255.255.0   U     0      0        0 eth0
139.93.0.0      catmsm6.cnt.com 255.255.0.0     UG    0      0        0 eth0
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         10.3.0.2        0.0.0.0         UG    0      0        0 tun1
tarzan root # route delete default
tarzan root # route add default gw 10.0.0.200
SIOCADDRT: Network is unreachable
tarzan root # ping 10.0.0.200
PING 10.0.0.200 (10.0.0.200) 56(84) bytes of data.
64 bytes from 10.0.0.200: icmp_seq=1 ttl=64 time=86.2 ms

--- 10.0.0.200 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 86.214/86.214/86.214/0.000 ms
hughesjr
I'm trying to see if I have this straight ... your PC is:

IP 10.3.0.2, subnet 255.255.255.0 and you want to set your default gateway as 10.0.0.200.

It won't work unless you make your subnet mask 255.0.0.0 for the IP_address 10.3.0.2.

If you use the 255.255.255.0 subnet mask, then the PC 10.3.0.2 can only talk to IP's 10.3.0.1 to 10.3.0.254 without a router .... if you make the subnet mask 255.0.0.0, the PC can talk to 10.0.0.1 to 10.254.254.254 without a router.

This would require that no router is between 10.3.0.2 and 10.0.0.200 ... if they are on the same physical nework segment with no router in between then after you change your subnet mask to 255.0.0.0 on 10.3.0.2 you will be able to do what you want...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.