Hurricane Electric's IPv6 Tunnel Broker Forums
May 18, 2013, 07:01:59 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Hurricane Electric's Tunnelbroker.net forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Cached route overrides manually-added one?  (Read 1025 times)
rm
Newbie
*
Posts: 11


View Profile WWW
« on: June 07, 2012, 04:01:18 am »

Hello,

I'm having a strange routing problem, hope someone can help.

Code:
root@rin:~# ip route get 2001:470:aaaa::100
2001:470:aaaa::100 via 2001:470:aaaa::100 dev henet  src 2001:470:24:bbb::1  metric 0
    cache  mtu 1480 advmss 1420 hoplimit 0

Now I need to add a route so that this IP and some subnet including it is accessed not via the default route, but over a VPN interface (and a ULA-addressed router inside the VPN):
Code:
root@rin:~# ip -6 route add 2001:470:aaaa::/52 via fd14:8086:1337::100 dev tun-rm

But that has no effect:
Code:
root@rin:~# ip route get 2001:470:aaaa::100
2001:470:aaaa::100 via 2001:470:aaaa::100 dev henet  src 2001:470:24:bbb::1  metric 0
    cache  mtu 1480 advmss 1420 hoplimit 0
Why it is completely ignored, and the cached route continues to be used?

The complete routing table:
Code:
root@rin:~# ip -6 route
2001:470:24:bbb::/64 dev henet  metric 256  expires 21262229sec mtu 1480 advmss 1420 hoplimit 0
2001:470:aaaa::/52 via fd14:8086:1337::100 dev tun-rm  metric 1024  expires 21334303sec mtu 1500 advmss 1440 hoplimit 0
fd14:8086:1337::/64 dev tun-rm  metric 256  expires 21262224sec mtu 1500 advmss 1420 hoplimit 0
fe80::/64 dev tun-rm  metric 256  expires 21262224sec mtu 1500 advmss 1420 hoplimit 0
fe80::/64 dev henet  metric 256  expires 21262229sec mtu 1480 advmss 1420 hoplimit 0
default dev henet  metric 1024  expires 21262229sec mtu 1480 advmss 1420 hoplimit 0
(why they even have these "expires" values??)

So if I will do "ip -6 route flush cache" at this point, the cached route will go away, and everything will work as I want it to (routing over the VPN).
The problem is, the cached route as shown above will "return" on itself after several days of operation, breaking the routing again in the same manner.
Any idea what is going on here?
Logged
jtcloe
Newbie
*
Posts: 46


View Profile
« Reply #1 on: June 07, 2012, 04:14:29 am »

Try specifying a lower metric of zero on the manually added route.
Logged
rm
Newbie
*
Posts: 11


View Profile WWW
« Reply #2 on: June 07, 2012, 04:20:42 am »

Hello,
Quote
Try specifying a lower metric of zero on the manually added route.
The lowest metric that can be manually specified is 1, when using metric 0 the route gets added with a metric of 1024. E.g.
Code:
rm@rm:~$ sudo ip -6 route add 2001:db8::/32 dev eth0 metric 0
rm@rm:~$ sudo ip -6 route | grep db8
2001:db8::/32 dev eth0  metric 1024
Logged
jtcloe
Newbie
*
Posts: 46


View Profile
« Reply #3 on: June 07, 2012, 08:48:44 pm »

Oh yeah...  OK, try one then.

The point is that the cached entries have metric's much higher, and the lower one wins.
Logged
rm
Newbie
*
Posts: 11


View Profile WWW
« Reply #4 on: June 07, 2012, 09:25:18 pm »

I have tried 1 in the past, and it didn't help. Besides, the cached route still has a higher metric of 0.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!