Hurricane Electric's IPv6 Tunnel Broker Forums

Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: Cached route overrides manually-added one?  (Read 3373 times)

rm

  • Newbie
  • *
  • Posts: 11
    • Russian IPv6 Portal
Cached route overrides manually-added one?
« on: June 07, 2012, 04:01:18 AM »

Hello,

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

Code: [Select]
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: [Select]
root@rin:~# ip -6 route add 2001:470:aaaa::/52 via fd14:8086:1337::100 dev tun-rm
But that has no effect:
Code: [Select]
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: [Select]
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: 48
Re: Cached route overrides manually-added one?
« 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
    • Russian IPv6 Portal
Re: Cached route overrides manually-added one?
« 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: [Select]
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: 48
Re: Cached route overrides manually-added one?
« 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
    • Russian IPv6 Portal
Re: Cached route overrides manually-added one?
« 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