All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.ru>
To: <netdev@vger.kernel.org>
Subject: Problem with IPv6 Route Cache
Date: Fri, 11 Jan 2013 18:51:26 +0600	[thread overview]
Message-ID: <20130111185126.56cababe@natsu> (raw)

[-- Attachment #1: Type: text/plain, Size: 3004 bytes --]

Hello,

I am trying to set up a VPN (tinc) connection and add a route to an ULA subnet
via another host on it.

My VPN setup script basically does:

  ip addr add fd39:20::3/64 dev tun-rm
  ip route add fd39::/64 via fd39:20::39 dev tun-rm
  ip link set tun-rm up

And then I have:

root@neru:~# ip -6 route
2a02:e00:ffff:56::/64 dev eth0  proto kernel  metric 256 
fd39::/64 via fd39:20::39 dev tun-rm  metric 1024 
fd39:20::/64 dev tun-rm  proto kernel  metric 256 
fe80::/64 dev eth0  proto kernel  metric 256 
fe80::/64 dev tun-rm  proto kernel  metric 256 
default via 2a02:e00:ffff:56::1 dev eth0  metric 1 

root@neru:~# ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2a02:e00:ffff:56:ffff:ffff:xxxx:xxxx/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe17:4a21/64 scope link 
       valid_lft forever preferred_lft forever
26: tun-rm: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 500
    inet6 fd39:20::3/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::40f7:7eff:fe6a:3901/64 scope link 
       valid_lft forever preferred_lft forever

The problem is, at some point presumably while the VPN interface is being and
at the same time the destination ULA subnet is being actively communicated
with, a wrong route entry (over the main default g/w) gets into the routing
cache, so despite the above table, I have for example:

# ip -6 route get fd39::100
fd39::100 from :: via 2a02:e00:ffff:56::1 dev eth0  src 2a02:e00:ffff:56:ffff:ffff:xxxx:xxxx  metric 0 
    cache


And even flushing the route cache does not help to get rid of it:

root@neru:~# ip -6 route get fd39::100
fd39::100 from :: via 2a02:e00:ffff:56::1 dev eth0  src 2a02:e00:ffff:56:ffff:ffff:xxxx:xxxx  metric 0 
    cache 
root@neru:~# ip -6 route flush cache
root@neru:~# ip -6 route get fd39::100
fd39::100 from :: via 2a02:e00:ffff:56::1 dev eth0  src 2a02:e00:ffff:56:ffff:ffff:xxxx:xxxx  metric 0 
    cache


This is on kernel version 3.7.1 inside a Xen VPS (if this matters).

Can anyone advice how to deal with this problem?
Can I disable/remove the IPv6 route cache?
I know the IPv4 route cache was recently removed from the kernel.

Things I tried so far to mitigate this:

1) ip6tables -I OUTPUT -d fc00::/7 -o eth0 -j REJECT --reject-with icmp6-no-route
2)  ip -6 route add unreachable fc00::/7 dev eth0

=> but both simply make the desired subnet completely unreachable in their own ways,
rather than solving the issue.

3) adding my route to "fd39::/64 via fd39:20::39" with metric 1 (can't add with
metric 0, it changes to 1024)

=> no effect.

-- 
With respect,
Roman

~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Stallman had a printer,
with code he could not see.
So he began to tinker,
and set the software free."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2013-01-11 13:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 12:51 Roman Mamedov [this message]
2013-01-11 12:58 ` Problem with IPv6 Route Cache Roman Mamedov
2013-01-11 15:06 ` Hannes Frederic Sowa
2013-01-11 16:37 ` Roman Mamedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130111185126.56cababe@natsu \
    --to=rm@romanrm.ru \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.