0

I have CONFIG_IP_MULTICAST=y and currently learning about IP multicast and found out that there're 2 common multicast protocols for IP networks: PIM SS and PIM DS. Querying my wifi adapter info I found out that multicast is supported:

$ ip link show dev wlp2s0 
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000

The question is what multicast protocol the device uses?

2 Answers 2

2

PIM SS and PIM DS are multicast routing protocols. They apply only to multicast-capable routers, which need to decide when/if a particular multicast stream needs to be passed from one network segment to another. If you are not setting up your Linux system as a router that also needs to be able to route multicasts to other routers, you won't need to care about them.

As Marcus Müller said, a typical NIC only cares about IEEE 802.3 (Ethernet) / 802.11 (WiFi) addresses. It may or may not have a hardware multicast filter that can be configured to receive multicast packets with specific multicast Ethernet addresses only. But because some NICs don't have that feature, and also because the mapping between IP multicast addresses and Ethernet multicast addresses is not perfect, the operating system needs to be prepared to filter received multicast packets by multicast IP address anyway.

There are basically three hardware implementation levels for Ethernet NICs regarding multicast handling:

  • a multicast filter that can be automatically configured by the driver/OS according to which multicast addresses the OS and/or apps wish to listen for
  • a simpler all-or-nothing multicast filter (old/cheap 10/100M NICs): the hardware can be configured to either receive any and all multicast packets that arrive on the wire, or to not receive any multicasts at all.
  • or no multicast support at all (basically very old slow 10M Ethernet NICs); with these cards, the driver needs to put the card into promiscuous mode (= disable all hardware-level receive filtering) to receive any multicasts at all.

At the operating system level, IGMP is the important multicast management protocol for IPv4 hosts; for IPv6, multicast management all part of ICMPv6. That's all regular (= non-router) hosts need to care about.

On WiFi interfaces, the encryption typically uses pairwise keys for unicasts, and group keys for multicasts and broadcasts. Most WiFi interfaces include at least some support for encryption and key management in the NIC hardware/firmware. Only the WiFi AP will be able to send multicast messages directly to hosts: if a host wants to send a multicast message, it will first send it to the AP, which will broadcast/multicast it to the group. The group keys are created and managed by the AP, which will use the pairwise keys to distribute the group keys securely as required.

5
  • Thinking about it, not sure how multicast should work in an encrypted network. Every station link has its own keys. That's where 802.11 differs from 802.3. Commented Oct 4, 2023 at 9:07
  • You're correct, but I think there are group keys for broadcast/multicast traffic too. Commented Oct 4, 2023 at 13:04
  • oooh fancy, need to research that when I have time Commented Oct 4, 2023 at 13:07
  • Nice addition to your answer :) like it a lot. Really will have to research more on it – modern IEEE802.11's physical layer is tricky; a station (an AP, in this case) often (APs: usually) has multiple antennas, and it will use them for beamforming / MIMO precoding "towards" the intended receiver. Now, linearity of the medium says that, yes, you can beamform towards multiple stations at once, BUT you will share one and the same power – you can't have two full-power beams in two directions. Now, that means that your multicast packet, unlike in ethernet, has lower quality of signalling at the 1/2 Commented Oct 4, 2023 at 13:31
  • …receivers. Meaning that it will necessarily have to carry less information (MCS will be reduced to fit the worst-reception station's S(I)NR scenario). So, you might better off not multicasting, but just sending a shorter (because higher-rate) packet to all N stations that should get it, separately. And that might very well mean that multicasting is not going to be very popular for streaming data (like you'd assume you'd want for scenarios like a lecture hall streaming full of laptops hoping to get the same audio stream) in the general case, but more so for limited latency,short, control msgs Commented Oct 4, 2023 at 13:35
1

IP is one level above what your network card cares about. So, the answer is: neither.

Both protocols are irrelevant to the card. The IP stack on the device doing multicast must know how to use the underlying IEEE 802.11 addressing to deliver packets to the correct station

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.