Adding route entry to linux routing table with external gateway
I got a small issue to resolve with the routing table entry of linux.
I have two laptops A and B connected to a local network, both can ping each other successfully. What I want is A->B route should be explicitly taken via a specific router C , which is on a different network. C can be pinged from both A & B
A -> 126.96.36.199
traceroute from A->B/C shows 188.8.131.52 to be the first hop from A
so I tried the following commands to add a route from A ->B setting C as next hop, doesn't seem to work..can somebody help me out?
#route add 10.104.56.17 gw 184.108.40.206
# route add 220.127.116.11 gw 10.104.56.17
SIOCADDRT: No such process