From: "Bjørn Mork" <bjorn@mork.no>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "François-Xavier Le Bail" <fx.lebail@yahoo.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC] The Linux kernel IPv6 stack don't follow the RFC 4942 recommendation
Date: Fri, 18 Nov 2011 11:15:23 +0100 [thread overview]
Message-ID: <87sjll7n44.fsf@nemi.mork.no> (raw)
In-Reply-To: <1320484852.16908.0.camel@edumazet-laptop> (Eric Dumazet's message of "Sat, 05 Nov 2011 10:20:52 +0100")
Eric Dumazet <eric.dumazet@gmail.com> writes:
> Le samedi 05 novembre 2011 à 01:39 -0700, François-Xavier Le Bail a
> écrit :
>
>> Agreed, but remain the case of ICMPv6 echo request/reply, which I think is in kernel.
>
> Yes, please describe your setup and how to reproduce the problem.
I agree with François-Xavier that the current behaviour is confusing. An
anycast address should really not be treated different from any other
global unicast address by the kernel.
1) The router anycast address does not show up in the list of local
addresses:
router:~$ ip -6 addr show dev br0.666
15: br0.666@br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
inet6 2001:db8:9:29a::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::215:17ff:fe1e:5e35/64 scope link
valid_lft forever preferred_lft forever
2) pinging the anycast address will produce a reply from another
address:
frtest1:~# ping6 -n -c1 2001:db8:9:29a::
PING 2001:db8:9:29a::(2001:db8:9:29a::) 56 data bytes
64 bytes from 2001:db8:9:29a::1: icmp_seq=1 ttl=64 time=0.275 ms
--- 2001:db8:9:29a:: ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.275/0.275/0.275/0.000 ms
frtest1:~# ping6 -n -c1 2001:db8:9:29a::1
PING 2001:db8:9:29a::1(2001:db8:9:29a::1) 56 data bytes
64 bytes from 2001:db8:9:29a::1: icmp_seq=1 ttl=64 time=0.229 ms
--- 2001:db8:9:29a::1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.229/0.229/0.229/0.000 ms
3) the previous issue will become even more obviously buggy if we add a
second address to the router, in the same subnet while pinging the
anycast address. Here I'm doing
router:/tmp# ip addr add 2001:db8:9:29a::5/64 dev br0.666
on the router while I'm pinging the anycast address from a another host:
frtest1:~# ping6 -n 2001:db8:9:29a::
PING 2001:db8:9:29a::(2001:db8:9:29a::) 56 data bytes
64 bytes from 2001:db8:9:29a::1: icmp_seq=1 ttl=64 time=330 ms
64 bytes from 2001:db8:9:29a::1: icmp_seq=2 ttl=64 time=0.268 ms
64 bytes from 2001:db8:9:29a::1: icmp_seq=3 ttl=64 time=0.234 ms
64 bytes from 2001:db8:9:29a::5: icmp_seq=4 ttl=64 time=0.232 ms
64 bytes from 2001:db8:9:29a::5: icmp_seq=5 ttl=64 time=0.298 ms
64 bytes from 2001:db8:9:29a::5: icmp_seq=6 ttl=64 time=0.279 ms
Now, THAT doesn't look good, does it?
4) just to add to issue 2. After adding the second address on the
router, we have 3 global unicast addresses in the same subnet. You would
then expect the kernel to either use the destionation address of the
incoming requests as source, or always select the same address as
source.
It does neither. This is inconsistent, unless you treat the router
anycast address as something special. Which you should not:
frtest1:~# ping-n -c1 2001:db8:9:29a::
PING 2001:db8:9:29a::(2001:db8:9:29a::) 56 data bytes
64 bytes from 2001:db8:9:29a::5: icmp_seq=1 ttl=64 time=337 ms
--- 2001:db8:9:29a:: ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 337.251/337.251/337.251/0.000 ms
frtest1:~# ping6 -n -c1 2001:db8:9:29a::1
PING 2001:db8:9:29a::1(2001:db8:9:29a::1) 56 data bytes
64 bytes from 2001:db8:9:29a::1: icmp_seq=1 ttl=64 time=0.163 ms
--- 2001:db8:9:29a::1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.163/0.163/0.163/0.000 ms
frtest1:~# ping6 -n -c1 2001:db8:9:29a::5
PING 2001:db8:9:29a::5(2001:db8:9:29a::5) 56 data bytes
64 bytes from 2001:db8:9:29a::5: icmp_seq=1 ttl=64 time=3.87 ms
--- 2001:db8:9:29a::5 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.873/3.873/3.873/0.000 ms
Bjørn
next prev parent reply other threads:[~2011-11-18 10:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 14:46 [RFC] The Linux kernel IPv6 stack don't follow the RFC 4942 recommendation François-Xavier Le Bail
2011-11-04 16:24 ` Eric Dumazet
2011-11-05 8:39 ` François-Xavier Le Bail
2011-11-05 9:20 ` Eric Dumazet
2011-11-18 10:15 ` Bjørn Mork [this message]
2011-11-05 9:30 ` Eric Dumazet
2011-11-10 10:58 ` François-Xavier Le Bail
2011-11-10 11:27 ` Eric Dumazet
2011-11-10 12:54 ` François-Xavier Le Bail
2011-11-10 15:23 ` François-Xavier Le Bail
2011-11-10 13:25 ` How to get the port values Naveen B N (nbn)
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=87sjll7n44.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=eric.dumazet@gmail.com \
--cc=fx.lebail@yahoo.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox