adding a route entry to linux routing table

Posted by netg on Server Fault See other posts from Server Fault or by netg
Published on 2011-03-09T05:59:58Z Indexed on 2011/03/09 8:12 UTC
Read the original article Hit count: 276

Filed under:
|
|
|

hi, I have two systems with ip address say 64.103.56.1(A)(Dev name -wlan0) and 64.103.225.18(B),now what i want is , everytime I ping B from my system A, it has to be routed via a router say with address 10.0.0.251(C)(I want this to be my next hop to reach B) , but this router is on a different subnetwork than the two systems.How do I do this?

/* Things I tried: I used 'route add -host B gw C wlan0', and got an error saying " no such process exist or no such device found". Tried ping C and traceroute and found the gw addr at my side is some 63.103.236.3(D), so added another entry route add -host C gw D wlan0, I was able to do this without any error! */

© Server Fault or respective owner

Related posts about linux

Related posts about ubuntu