Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here's my configuration :

IP adress : 192.168.1.4 Netmask : 255.255.255.0 Default gw : 192.168.1.200

Routing table :

    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.1     192.168.1.254   255.255.255.255 UGH   0      0        0 venet0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 venet0
0.0.0.0         192.168.1.200   0.0.0.0         UG    0      0        0 venet0

When I try to add a route via the subnet 192.168.2.0, I get the following RTNETLINK answers: No such process Example :

#ip route add 8.8.8.8/32 via 192.168.2.1 dev venet0:0
#RTNETLINK answers: No such process

Is there a way to accomplish this kind of thing ?

And one more question : I'd like to be able to forward all my incoming trafic to the gateway at 192.168.2.1 ... How Can I do this ? This doesn't work of course :

#ip route add default via 192.168.2.1
#RTNETLINK answers: No such process
share|improve this question

1 Answer 1

up vote 1 down vote accepted

No. Source-based routing has been deprecated manymany years ago.

Some routers accept such a statement (called indirect next-hop), but locally (at your 192.168.1.4) it would result in this - and that's all you can do:

#ip route add 8.8.8.8/32 via 192.168.1.254 dev venet0:0

Anything behind 192.168.1.254 lies only in the responsibility of 192.168.1.254. Do you have access to this device?

To the second question - I do not understand, what you want to do...

share|improve this answer
    
Thank you for your answer. For the second question, what I'd like to do is a backup gateway in case of the main one is failing (which is often)... I know that 192.168.2.1 would route my trafic to the Internet, but the only link I have is 192.168.1.254 which is a "bridge" between our two subnets. And no, I don't have access to this device :( P.S : Oops there was a typo in my second question, I've just edited the IP address –  Velocy Jun 25 '12 at 12:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.