I have 3 networks:

192.168.1.0/24
192.168.11.0/24
192.168.50.0/24

192.168.1.0/24 and 192.168.11.0/24 are connected to each other through an IPSec tunnel, and 192.168.11.0/24 and 192.168.50.0/24 are connected to each other in the same way.

[ 192.168.1.0/24 ] <--------> [ 192.168.11.0/24 ] <--------> [ 192.168.50.0/24 ]

I am on my local machine on the 1.0/24 subnet, and I am trying to set-up routing for the 50.0/24 subnet, using the router at 11.0/24 as the next-hop address. Routing is set-up as follows:

ip route add 192.168.11.0/24 via 192.168.1.1
    (this route is unnecessary as the router handles this implicitly)
ip route add 192.168.50.0/25 via 192.168.11.254
    (At this point, I get: RTNETLINK answers: No such process)

Am I doing some command incorrectly, or do I have a fundamental misunderstanding of the way this routing works?

link|improve this question
feedback

1 Answer

The gateway address MUST be on the local network. That is, your system must be able to directly communicate with any gateway you specify.

What you probably want/need is this.

ip route add 192.168.50.0/25 via 192.168.1.1
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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