From: David Ahern <dsahern@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: IPv6 multicast with VRF
Date: Wed, 20 Apr 2022 12:59:45 -0600 [thread overview]
Message-ID: <97eaffb8-2125-834e-641f-c99c097b6ee2@gmail.com> (raw)
In-Reply-To: <20220420165457.kd5yz6a6itqfcysj@skbuf>
On 4/20/22 10:54 AM, Vladimir Oltean wrote:
> Hi,
>
> I don't have experience with either IPv6 multicast or VRF, yet I need to
> send some IPv6 multicast packets from a device enslaved to a VRF, and I
> don't really know what's wrong with the routing table setup.
>
> The system is configured in the following way:
>
> ip link set dev eth0 up
>
> # The kernel kindly creates a ff00::/8 route for IPv6 multicast traffic
> # in the local table, and I think this is what makes multicast route
> # lookups find the egress device.
> ip -6 route show table local
> local ::1 dev lo proto kernel metric 0 pref medium
> local fe80::204:9fff:fe05:f4ab dev eth0 proto kernel metric 0 pref medium
> multicast ff00::/8 dev eth0 proto kernel metric 256 pref medium
>
> ip -6 route get ff02::1
> multicast ff02::1 dev eth0 table local proto kernel src fe80::204:9fff:fe05:f4ab metric 256 pref medium
>
> ip link add dev vrf0 type vrf table 3 && ip link set dev vrf0 up
>
> ip -4 route add table 3 unreachable default metric 4278198272
>
> ip -6 route add table 3 unreachable default metric 4278198272
>
> ip link set dev eth0 master vrf0
>
> The problem seems to be that, although the "ff00::/8 dev eth0" route
> migrates from table 255 to table 3, route lookups after this point fail
> to find it and return -ENETUNREACH (ip6_null_entry).
>
> ip -6 route show table local
> local ::1 dev lo proto kernel metric 0 pref medium
>
> ip -6 route show table main
> ::1 dev lo proto kernel metric 256 pref medium
>
> ip -6 route show table 3
> local fe80::204:9fff:fe05:f4ab dev eth0 proto kernel metric 0 pref medium
> fe80::/64 dev eth0 proto kernel metric 256 pref medium
> multicast ff00::/8 dev eth0 proto kernel metric 256 pref medium
> unreachable default dev lo metric 4278198272 pref medium
>
> ip -6 route get ff02::1
> RTNETLINK answers: Network is unreachable
>
> ip -6 route get vrf vrf0 ff02::1
> RTNETLINK answers: Network is unreachable
>
> I'm not exactly sure what is missing?
Did you adjust the FIB rules? See the documentation in the kernel repo.
And add a device scope to the `get`. e.g.,
ip -6 route get ff02::1%eth0
next prev parent reply other threads:[~2022-04-20 18:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 16:54 IPv6 multicast with VRF Vladimir Oltean
2022-04-20 18:59 ` David Ahern [this message]
2022-04-20 19:18 ` Vladimir Oltean
2022-04-20 20:40 ` David Ahern
2022-04-21 9:24 ` Vladimir Oltean
2022-04-21 23:44 ` David Ahern
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=97eaffb8-2125-834e-641f-c99c097b6ee2@gmail.com \
--to=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).