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

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?

share|improve this question

1 Answer 1

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
share|improve this answer

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.