From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: Andrew Morton <akpm@linux-foundation.org>, green@msu.ru
Cc: netdev@vger.kernel.org, bugzilla-daemon@bugzilla.kernel.org,
bugme-daemon@bugzilla.kernel.org, yoshfuji@linux-ipv6.org,
Pekka Savola <pekkas@netcore.fi>,
davem@davemloft.net
Subject: Re: [Bugme-new] [Bug 14427] New: ipv6 forward cause strange route
Date: Tue, 03 Nov 2009 20:06:08 +0900 [thread overview]
Message-ID: <4AF00EA0.7030407@linux-ipv6.org> (raw)
In-Reply-To: <20091102223237.c0102f19.akpm@linux-foundation.org>
Hello.
This is not a bug but a feature of IPv6 called "subnet anycast
address." The address is automatically assigned on routers.
References:
RFC 2526: Reserved IPv6 Subnet Anycast Addresses
RFC 3627: Use of /127 Prefix Length Between Routers Considered Harmful
--yoshfuji
Andrew Morton wrote:
> (switched to email. Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
> On Sat, 17 Oct 2009 10:42:01 GMT bugzilla-daemon@bugzilla.kernel.org wrote:
>
>> http://bugzilla.kernel.org/show_bug.cgi?id=14427
>>
>> Summary: ipv6 forward cause strange route
>> Product: Networking
>> Version: 2.5
>> Platform: All
>> OS/Version: Linux
>> Tree: Mainline
>> Status: NEW
>> Severity: normal
>> Priority: P1
>> Component: IPV6
>> AssignedTo: yoshfuji@linux-ipv6.org
>> ReportedBy: green@msu.ru
>> Regression: No
>>
>>
>> When enabling forwarding for IPv6 on interface, in the routing table local
>> appears new route. It like route to local ip but with all host bits set to 0.
>> Example:
>> --------------------------------------------------
>> # cat /proc/sys/net/ipv6/conf/eth0/forwarding
>> 0
>> # ip -6 addr add 2001:db8:1:1::5/64 dev eth0
>> # ip -6 route show table local
>> ...
>> local 2001:db8:1:1::5 via :: dev lo proto none metric 0 mtu 16436 advmss
>> 16376 hoplimit 4294967295
>> ...
>> # echo 1 > /proc/sys/net/ipv6/conf/eth0/forwarding
>> # ip -6 route show table local
>> ...
>> local 2001:db8:1:1:: via :: dev lo proto none metric 0 mtu 16436 advmss
>> 16376 hoplimit 4294967295
>> local 2001:db8:1:1::5 via :: dev lo proto none metric 0 mtu 16436 advmss
>> 16376 hoplimit 4294967295
>> ...
>> --------------------------------------------------
>> After enabling forwarding, route "2001:db8:1:1:: via :: dev lo" is added. No
>> matter, forwarding is enabled before or after adding of address, this route is
>> "on" with forwarding and "off" without it.
>> Such behavior causes problems with /127 network masks. For example:
>> --------------------------------------------------
>> # echo 1 > /proc/sys/net/ipv6/conf/eth0/forwarding
>> # ip -6 addr add 2001:db8:1:1::5/127 dev eth0
>> # ip -6 route add default via 2001:db8:1:1::4
>> RTNETLINK answers: Invalid argument
>> --------------------------------------------------
>> But if we disable forwarding (and strange route) when adding needed route, we
>> will succeed.
>> --------------------------------------------------
>> # echo 0 > /proc/sys/net/ipv6/conf/eth0/forwarding
>> # ip -6 route add default via 2001:db8:1:1::4
>> # echo 1 > /proc/sys/net/ipv6/conf/eth0/forwarding
>> --------------------------------------------------
>> Default route remains in the table after enabling forwarding and it is doing in
>> work. But in this case we still can not access 2001:db8:1:1::4, because it is
>> routed to loopback:
>> --------------------------------------------------
>> # ping6 -c 1 2001:db8:1:1::4
>> PING 2001:db8:1:1::4(2001:db8:1:1::4) 56 data bytes
>> 64 bytes from 2001:db8:1:1::5: icmp_seq=1 ttl=64 time=0.114 ms
>> --------------------------------------------------
>> We get reply from self interface.
>>
>> This was tested on x86 and x86_64 with 2.6.30 kernel and some previous versions
>> on ArchLinux (2.6.30 x86 and x86_64), Ubuntu (2.6.28-15-generic x86_64) and
>> gentoo (2.6.30-gentoo-r5 x86_64).
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-11-03 11:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-14427-10286@http.bugzilla.kernel.org/>
2009-11-03 6:32 ` [Bugme-new] [Bug 14427] New: ipv6 forward cause strange route Andrew Morton
2009-11-03 11:06 ` YOSHIFUJI Hideaki [this message]
2009-11-03 11:19 ` YOSHIFUJI Hideaki
2009-11-04 8:01 ` Pekka Savola
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=4AF00EA0.7030407@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=davem@davemloft.net \
--cc=green@msu.ru \
--cc=netdev@vger.kernel.org \
--cc=pekkas@netcore.fi \
/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.