From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ying Xu Subject: Re: [PATCH net] net: bridge: remove ipv6 zero address check in mcast queries Date: Fri, 14 Dec 2018 10:32:16 +0800 Message-ID: References: <90c5f2fe-1743-6b17-2e44-eba58cdbbb35@cumulusnetworks.com> <20181027090747.22104-1-nikolay@cumulusnetworks.com> <20181029013316.GK24677@leo.usersys.redhat.com> <20181213161027.GC1713@otheros> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000002a11d057cf23e60" Cc: nikolay@cumulusnetworks.com, netdev@vger.kernel.org, roopa@cumulusnetworks.com, bridge@lists.linux-foundation.org, liuhangbin@gmail.com, davem@davemloft.net To: linus.luessing@c0d3.blue Return-path: In-Reply-To: <20181213161027.GC1713@otheros> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org --00000000000002a11d057cf23e60 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think the scenario mentioned above is abnormal. According to rfc 4541, multicast router port means this port is attached to a real router. The source of query indicats that is a real router or only a switch.(0.0.0.0 means switch,non-zero means router). In the scenario above,the switch A was selected to be a querier that means A performs as a router, so switch A should config its query source address to non-zero,and then Host A can recieve the traffic from B. On Fri, Dec 14, 2018 at 12:10 AM Linus L=C3=BCssing wrote: > Even though RFC4541 recommends this, I'm not quite sure whether > this works... even for IGMP. > > I think this would lead to multicast packet loss in a scenario > like this: > > ---------- > > [Switch A] -------------- [Switch B] > / / > / / > / / > (Host A) (Host B) > > > - Snooping Switches: Switch A + Switch B > - Selected Querier: Switch A, with 0.0.0.0 query source > - Multicast Listener: Host A > - Multicast Data Sender: Host B > > 1) Host A sends IGMP report to Switch A > 2) Switch A refrains from forwarding it to Switch B > (reports are only forwarded to multicast routers according to > RFC4541) > =3D> Switch B does not learn about listeners on Host A > > Now, with this patch and recommendation in RFC4541 to not add queries > with a 0.0.0.0 source address to the multicast router port list: > > 3) Host B sends multicast data to Switch B > =3D> Switch B does not forward it to Switch A as it neither > detected a multicast listener nor multicast router on > the according port. > =3D> Host A does not receive the multicast data it signed up for > > (Or with colors: > > https://metameute.de/~tux/linux/bridge/query-zero-source-no-mcrouter-port= .png > ) > > ---------- > > Alternatively we would need to ignore 0.0.0.0 for the querier > election and "querier present" detection. And by that disable > multicast snooping if there are no queries from a non-zero source > address. > > But I'm a little hesitant whether ignoring is a reliable way as > IGMPv3 (RFC3376) and IGMPv2 (RFC2236) make no such restrictions > regarding the query source address. > > With no such restrictions according to RFC3376/RFC2236 a 0.0.0.0 > would always win the querier election. Meaning any potential > querier with a non-zero source address would remain silent. > Meaning we would always disable multicast snooping then? > > > Adding queriers with a 0.0.0.0 source address to the multicast > router list, too, seems like a less harmful way then disabling multicast > snooping completely? > > ---------- > > However, one of the two options seems to be necessary. Either > reverting the patch for the IGMP part, too. Or Ignoring 0.0.0.0 > sources for querier eletcion and presence detection. > > The current state seems broken to me unless I'm missing something. > --00000000000002a11d057cf23e60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=C2=A0I think the scenario mentioned abov= e is abnormal.
According to rfc 4541, multicast router port means this p= ort is attached to a real router.

The source of query indicats that= is a real router or only a switch.(0.0.0.0 means switch,non-zero means rou= ter).
In the scenario above,the switch A was selected to be a querier th= at means A performs as a router,
so switch A should config its query sou= rce address to non-zero,and then Host A can recieve the traffic from B.
=

On Fri, Dec 14,= 2018 at 12:10 AM Linus L=C3=BCssing <linus.luessing@c0d3.blue> wrote= :
Even though RFC4541 recommends th= is, I'm not quite sure whether
this works... even for IGMP.

I think this would lead to multicast packet loss in a scenario
like this:

----------

=C2=A0 =C2=A0 =C2=A0[Switch A] -------------- [Switch B]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /
=C2=A0 =C2=A0 =C2=A0 =C2=A0/=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /
=C2=A0 =C2=A0 =C2=A0 /=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /
=C2=A0(Host A)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(Host B)


- Snooping Switches: Switch A + Switch B
- Selected Querier: Switch A, with 0.0.0.0 query source
- Multicast Listener: Host A
- Multicast Data Sender: Host B

1) Host A sends IGMP report to Switch A
2) Switch A refrains from forwarding it to Switch B
=C2=A0 =C2=A0(reports are only forwarded to multicast routers according to<= br> =C2=A0 =C2=A0 RFC4541)
=C2=A0 =C2=A0=3D> Switch B does not learn about listeners on Host A

Now, with this patch and recommendation in RFC4541 to not add queries
with a 0.0.0.0 source address to the multicast router port list:

3) Host B sends multicast data to Switch B
=C2=A0 =C2=A0=3D> Switch B does not forward it to Switch A as it neither=
=C2=A0 =C2=A0 =C2=A0 detected a multicast listener nor multicast router on<= br> =C2=A0 =C2=A0 =C2=A0 the according port.
=C2=A0 =C2=A0=3D> Host A does not receive the multicast data it signed u= p for

(Or with colors:
https://metameute.de/~t= ux/linux/bridge/query-zero-source-no-mcrouter-port.png)

----------

Alternatively we would need to ignore 0.0.0.0 for the querier
election and "querier present" detection. And by that disable
multicast snooping if there are no queries from a non-zero source
address.

But I'm a little hesitant whether ignoring is a reliable way as
IGMPv3 (RFC3376) and IGMPv2 (RFC2236) make no such restrictions
regarding the query source address.

With no such restrictions according to RFC3376/RFC2236 a 0.0.0.0
would always win the querier election. Meaning any potential
querier with a non-zero source address would remain silent.
Meaning we would always disable multicast snooping then?


Adding queriers with a 0.0.0.0 source address to the multicast
router list, too, seems like a less harmful way then disabling multicast snooping completely?

----------

However, one of the two options seems to be necessary. Either
reverting the patch for the IGMP part, too. Or Ignoring 0.0.0.0
sources for querier eletcion and presence detection.

The current state seems broken to me unless I'm missing something.
--00000000000002a11d057cf23e60--