Multicast groups: addressing, IGMPv2/v3 and snooping

Multicast sends one stream to only the hosts that want it. Group addresses are 224.0.0.0/4, with 224.0.0.0/24 kept local and 239.0.0.0/8 administratively scoped. Each group maps to a MAC address starting 01:00:5E with the low 23 bits copied, so 32 groups share each MAC. Hosts ask with IGMP, and IGMP snooping keeps switches from flooding.

In Daveth Pro (Network)10 min video

By , founder of Daveth · Updated

Opening frame of the video walkthrough of Multicast groups: addressing, IGMPv2/v3 and snooping

Watch this lesson

10 min · Video walkthrough

In Daveth Pro (Network)

The full 10 min walkthrough is in Daveth Pro (Network). See what the plan opens

What this page answers

What are the multicast address ranges?

224.0.0.0/4, 224.0.0.0 to 239.255.255.255. 224.0.0.0/24 is local network control that never leaves the broadcast domain, 224.0.1.0/24 is internetwork control, 232.0.0.0/8 is source-specific multicast, and 239.0.0.0/8 is administratively scoped. Read it in “4.1 One stream, many receivers”

How does a multicast IP address map to a MAC address?

The MAC starts 01:00:5E, its 25th bit is always 0, and the low 23 bits are copied from the group address: 239.255.1.1 becomes 01:00:5E:7F:01:01. Five bits are lost, so 32 groups share each MAC. Read it in “4.1 One stream, many receivers”

What is IGMP snooping?

A switch feature that listens to hosts' IGMP messages so the switch sends a group's frames only out the ports where receivers asked, instead of flooding them to every host. Read it in the lesson

4.1 One stream, many receivers

There are three ways to send one thing to many hosts: unicast (one-to-one), broadcast (one-to-all) and multicast (one-to-many). Multicast leans on two protocols: IGMP between the receivers and their local router, and PIM between routers (Figure 13-1). PIM is 03-6; this lesson is the receivers' side.

The guide's video example makes the case in numbers. Sent as unicast, every receiver gets its own 10 Mbps copy, so the R1-R2 link carries 50 Mbps for five viewers, R2-R4 carries 30 and R2-R5 20, and the server keeps a session for each one (Figure 13-2). Broadcast needs one copy and one session, but IP directed broadcast is off by default on Cisco routers (turning it on invites DDoS attacks), and every uninterested host's NIC still hands the packets to its CPU, Workstation F included (Figure 13-3), which is why the guide doesn't recommend broadcast for this. It's a bit like a newsletter: posting a copy to each subscriber is unicast, pushing one through every letterbox on the street is broadcast.

Broadcast video is shouting the film's soundtrack down every corridor: the people who wanted it hear it, and so do all the CPUs that then have to throw it away.

Multicast sends one packet on each link, and copies it only where the path to the receivers splits, along a multicast distribution tree (03-6); the stream goes to a group address, the server keeps one session, and devices ask for the stream if they want it. The guide's list of uses includes TelePresence, IPTV, stock tickers and music on hold. In Figure 13-4 every link carries 10 Mbps, and Workstation F, which didn't ask, drops the frames at the NIC, so its CPU never sees them; with IGMP snooping on its switch, F wouldn't even receive them (section 4.6). If you've ever had a radio tuned to one station, you'll know the other stations are all in the air around you; the radio simply ignores them.

IANA assigned the old Class D space to multicast: 224.0.0.0/4, 224.0.0.0 to 239.255.255.255, every address starting with the bits 1110. The blocks worth knowing:

BlockRangeWhat it's for
local network control224.0.0.0/24protocol control that never leaves the broadcast domain: 224.0.0.1 all hosts, 224.0.0.2 all routers, 224.0.0.13 all PIM routers
internetwork control224.0.1.0/24control traffic that may be forwarded: NTP 224.0.1.1, Cisco-RP-Announce 224.0.1.39, Cisco-RP-Discovery 224.0.1.40 (RPs: 03-7)
Source Specific Multicast232.0.0.0/8SSM's default range (RFC 4607): traffic only from sources the receiver asked for (03-7)
GLOP233.0.0.0 to 233.251.255.255statically assigned: a 16-bit AS number X.Y gets 233.X.Y.0/24 (RFC 3180); 32-bit AS numbers apply in ad hoc block III (233.252.0.0 to 233.255.255.255) or use IPv6. The text calls it 233.0.0.0/8; Table 13-2 ends it at 233.251
administratively scoped239.0.0.0/8RFC 2365: local to an organisation, like RFC 1918's private unicast ranges, and IANA won't assign them to anyone else; SSM is often deployed here in private networks

Table 13-2 has thirteen rows; the rest are ad hoc blocks I and II, the SDP/SAP block (224.2.0.0 to 224.2.255.255) and reserved ranges, and the guide's own list singles out the five above.

Consider it your building's noticeboard rules: some notices must stay inside (224.0.0.x), some may travel across town (224.0.1.x), and one block (239) is yours to number however you like. Quiz Q3 asks for the administratively scoped block: 239.0.0.0/8, 239.0.0.0 to 239.255.255.255.

224.0.0.0/24 is the multicast world's "staff only" door: routers never let it out of the room.

Some groups belong to protocols you've met, and some to ones still ahead (Table 13-3): 224.0.0.5 and .6 (OSPF all routers and DRs), 224.0.0.10 (EIGRP), 224.0.0.18 (VRRP) and 224.0.0.102 (HSRPv2 and GLBP) you've seen; 224.0.0.13 (PIM) is 03-6's, 224.0.0.22 (IGMPv3) comes in section 4.5, and 224.0.0.9 (RIPv2) isn't in this course. That's roughly equivalent to the internal phone list at work: the numbers are fixed, and every department knows its own.

A NIC used to accept only frames for its own burned-in MAC and the broadcast MAC, which would force routers to copy packets for each receiver; so multicast got destination MACs of its own that many NICs can accept at once. Every group address maps to one: the first 24 bits are 01:00:5E, the low-order bit of the first byte (the I/G bit) is 1 for multicast, the 25th bit is always 0, and the low 23 bits are copied from the group address (Figure 13-5: 239.255.1.1 becomes 01:00:5E:7F:01:01).

That arithmetic loses something. A group address has 28 variable bits (the first four are always 1110), and only 23 are copied, so 5 are lost and 32 group addresses share every multicast MAC. Figure 13-6's pair, 239.255.1.1 and 239.127.1.1, both map to 01:00:5E:7F:01:01. Imagine if flats were numbered by just the last few digits of each resident's phone number: several would share a door, and each would have to open the post to see whose it was.

When a host joins 239.255.1.1 it reprograms its NIC to accept 01:00:5E:7F:01:01; an OSPF hello to 224.0.0.5 (01:00:5E:00:00:05) doesn't match, so the NIC drops it without bothering the CPU. The overlap leaks, though: that NIC also accepts frames for 239.127.1.1 or 224.127.1.1, and the host's IP layer has to discard them. It's like a coat check that only keeps the last digits of the ticket: usually fine, occasionally someone else's coat.

32 group addresses share every multicast MAC, which is how a NIC can do everything right and still hand its host somebody else's video.

IPv6 does it differently: the MAC is 33:33 followed by the last four octets (32 bits) of the group address, so ff02::1 becomes 33:33:00:00:00:01. Expand the group first: ff02::1:ff00:1 is ff02:0000:0000:0000:0000:0001:ff00:0001, whose last four octets are ff:00:00:01, so its MAC is 33:33:ff:00:00:01. D1 shows both mappings.

D1

Multicast IP-to-MAC mapping for 239.255.1.1: the first four bits fixed at 1110, the next five dropped, the last 23 copied behind 01:00:5E.
239.255.1.1: the first four bits are always 1110, the next five (red) are thrown away, and the last 23 (green) are copied behind 01:00:5E and a 0 bit, giving 01:00:5e:7f:01:01. Because five bits are lost, 32 groups land on the same MAC, and a NIC that joins 239.255.1.1 accepts all of their frames (p334; that last point is the course’s inference).

Receivers use IGMP to join groups; it has to run on the receivers and on the router interfaces facing them, and a join arriving on an interface without IGMP is ignored. There are three versions: IGMPv1 (RFC 1112, rarely used), IGMPv2 (RFC 2236, the common one) and IGMPv3 (RFC 3376, used by SSM). IGMPv2 messages are IP protocol 2, sent with the router alert option and a TTL of 1, so no router forwards them. The format is Type, Max Response Time, Checksum and Group Address (Figure 13-7), and the types are:

TypeMessage
0x16version 2 membership report, the "join"
0x12version 1 membership report, for IGMPv1 compatibility
0x17leave group
0x11membership query: a general query (group field 0.0.0.0, to 224.0.0.1) or a group-specific query (group field and destination set to the group)

The Max Response Time is set only in queries, in tenths of a second, and is 0 in every other message. The checksum is the usual 16-bit one's complement, and the Group Address is 0.0.0.0 in a general query and the group itself everywhere else: the group being queried, reported or left.

IGMP messages carry a TTL of 1, so they die at the first router they meet: IGMP never leaves the room it was born in, by design.

Joining. A host that wants a stream sends an unsolicited membership report for the group, the "IGMP join" (a field term, not an RFC one); the router then joins upstream with PIM and forwards the stream onto the subnet. Mind the quiz: Q5 offers both "Send an IGMP join" and "Send an unsolicited membership report", and only the second is marked right, because the RFCs have no message called a join.

Staying. The router sends general queries to 224.0.0.1, with a Max Response Time of 10 seconds by default. Each member starts a random timer up to that limit, and reports when it fires, but a member that hears another member's report for the same group first cancels its own: report suppression. A v2 report is sent to the group address itself, which is why the other members can hear it. Picture yourself as a teacher asking "who still wants the field-trip bus?": one raised hand is enough, and everyone else keeps theirs down.

Leaving. A host that was the last to answer a query for the group sends a leave to 224.0.0.2 (all routers); one that wasn't can leave quietly, since another member is known to be there. (RFC 2236 says "SHOULD" for the leave and "MAY send nothing" otherwise, and a host that can't remember MAY always send one.) The router answers a leave with a group-specific query to the group, and if nobody replies, it deletes the group. If you've ever called out "anyone still in here?" before switching off the lights, you've done what the router does: it asks before it deletes.

The querier. With several routers on the segment, one does the querying: the one with the lowest interface address. Each router compares the source address of the queries it hears with its own. Cisco points out that this isn't the PIM DR, which by default is the highest address (03-6 adds the DR priority). The others restart a timer on every query, and if it runs out they elect a new querier. Cisco's 17.9 default query interval is 60 seconds, against RFC 2236's 125; how long the others wait is stated three different ways by the guide, Cisco and the RFC, so it stays unconfirmed here. The memory hook: join, answer, leave; the switch listens in.

An IGMPv2 report names a group, not a source. IGMPv3 adds source filtering, so a receiver can say which sources it wants. It coexists with IGMPv1 and v2, keeps their message types, adds fields to the query and adds a version 3 membership report. A report is in one of two modes:

  • Include: the group, and a list of sources to receive from.
  • Exclude: the group, and a list of sources not to receive from; an empty exclude list means "any source", which is IGMPv2's behaviour.

IGMPv3 is what SSM uses (03-7). You can think of it as a news app where you follow a topic (the group) and then pick writers (the sources): "only these two" (include) or "everyone except this one" (exclude). Leaving is a mode change too: a v3 host leaves by reporting INCLUDE with an empty list, and the router checks with a group-specific query, as in v2.

Two practical differences from v2. Version 3 reports go to 224.0.0.22, which all IGMPv3 routers listen to, and hosts don't suppress reports any more: "there is no membership report suppression because IGMPv3 hosts do not listen to the reports sent by other hosts". And if some hosts include a source that others exclude, the router sends it: "inclusion trumps exclusion". It's a bit like muting someone in a group chat on a tablet the whole family shares: if anyone else on it still follows them, their messages keep arriving. On the LAN, your host receives that source's frames anyway and throws them away.

IGMPv3 ends report suppression, so every member speaks up: good news for accuracy, bad news for anyone hoping for a quiet LAN.

A switch learns unicast MACs from source addresses, and floods a frame for an unknown destination out of every port in the VLAN except the one it came in on (Figures 13-8, 13-9). A multicast MAC is never a source address, so the switch never learns it, treats multicast frames as unknown, and floods them everywhere. The cures are IGMP snooping and static MAC entries. Think about the last time you got a circular addressed "to the occupier": the switch sends every multicast frame the same way.

IGMP snooping (RFC 4541) reads the IGMP reports hosts send, keeps a table of which ports want which group, and forwards a group's traffic only out of those ports: in Figures 13-10 and 13-11, Workstations A and C join 239.255.1.1 and the stream leaves only by g0/0 and g0/2. Some groups, such as 224.0.0.0/24, are still flooded, and static entries are possible but don't react to change, so they're not recommended. RFC 4541 adds two rules the figures don't show: group traffic also goes out of the ports where multicast routers are, and reports should be forwarded only towards router ports. It acts kind of like an office receptionist who notes which rooms signed up for the lunch order and walks it only to those rooms, and always a copy to the kitchen.

Without snooping, a switch reads every multicast frame as "to whom it may concern", and concerns everybody.

Before reading on, predict: hosts A and C are members; a v2 query arrives. With snooping on, how many reports do the hosts send, and how many reach the router? D2 lets you check.

That second rule is deliberate, and it changes section 4.4's report suppression. A v2 host that heard another member's report would suppress its own, and "if a switch does not receive a membership report from the host it will not forward multicast data to it". So a snooping switch keeps reports away from the other hosts, which RFC 3376 says switches do "in order to prevent membership report suppression", and every member reports. The router only needs one, so Cisco's report suppression (on by default) forwards "only one IGMP report per multicast router query". Leaving changes too: a host that never hears the others' reports always thinks it was the last, so it sends a leave, and the switch checks that port with a group-specific query of its own before dropping it.