Topic: problem with route command

I have a working vpn connection between openWRT (10.7.7.0/255.255.255.0) and a commercial vpn router (10.11.12.0/255.255.255.0). Behind this other router are other routers connected. I need to reach these other routers. My idea was to enter a second route to this other net (10.11.16.0/255.255.255.0). But when I enter

root@openWRT:/# route add 10.11.16.0 netmask 255.255.255.0 gw 10.11.12.200

I get the error

route: netmask 000000ff and host route conflict

my route output is:

Kernel IP routing table
Destination      Gateway           Genmask            Flags Metric Ref    Use Iface
217.0.116.103  *                     255.255.255.255  UH    0      0        0      ppp0
217.0.116.103  *                     255.255.255.255  UH    0      0        0      ipsec0
10.11.12.0       217.0.116.103   255.255.255.0     UG    0      0        0      ipsec0
10.7.7.0           *                     255.255.255.0     U       0      0        0      br0
default             217.0.116.103   0.0.0.0               UG    0      0        0      ppp0

What do I wrong? Or is there a way to tell ipsec to route this net via the vpn connection?

Thanks

Andreas

Re: problem with route command

route add -net ...

Re: problem with route command

Ok, with

route add -net 10.11.16.0 netmask 255.255.255.0 gw 10.11.12.200

I get:

route: SIOC[ADD|DEL]RT: Network is unreachable

It's really funny: the network IS unreachable, because I can't add a route to it...

Re: problem with route command

I played with the route command and found that

root@OpenWrt:/# route add -net 10.11.16.0 netmask 255.255.255.0 dev ipsec0

does put an entry in the route table:

root@OpenWrt:/etc/init.d# route
Kernel IP routing table
Destination       Gateway          Genmask             Flags Metric Ref    Use Iface
217.0.116.103   *                     255.255.255.255 UH    0      0        0 ppp0
217.0.116.103   *                     255.255.255.255 UH    0      0        0 ipsec0
10.11.12.0        217.0.116.103   255.255.255.0    UG    0      0        0 ipsec0
10.7.7.0            *                     255.255.255.0    U      0      0        0 br0
10.11.16.0        *                     255.255.255.0    U      0      0        0 ipsec0
default             217.0.116.103   0.0.0.0              UG    0      0        0 ppp0

How do I enter the correct gateway for route 10.11.16.0? I tried with route add -net ..... gw 10.11.12.200 but then I get again "network unreachable"

Andreas