Services · Topic 4 of 5
Multicast Services: PIM, IGMP and MLD
Implement multicast with PIM sparse mode, PIM SSM and PIM BIDIR, and host group membership with IGMP versions 1, 2 and 3 and MLD, using XR and XE commands.
- 5 min
- Includes a diagram
- IGMPv2 adds leave messages. IGMPv3 adds source filtering.
- SSM needs IGMPv3 or MLDv2, and the default IPv4 range is 232.0.0.0/8.
- MLDv1 matches IGMPv2, and MLDv2 matches IGMPv3.
What it is
Multicast sends one stream from a source to many receivers, and the network copies it only where it must.
Two protocol groups work together. IGMP, for IPv4, and MLD, for IPv6, tell the last router which hosts want a group. PIM builds the delivery trees between routers, using the unicast routing table.
How it works
Hosts signal interest, and routers build a loop free tree back towards the source or the RP.
IGMP and MLD
IGMP lets hosts join groups. A router on the segment, the querier, sends queries, and hosts answer with reports.
| Version | Main change |
|---|---|
| IGMPv1 | Queries and reports only. There is no leave message, so groups time out. |
| IGMPv2 | Adds a leave message and group specific queries, and the lowest IP address wins the querier election. |
| IGMPv3 | Adds source filtering, with include and exclude lists. It is the usual requirement for SSM. |
General queries go to 224.0.0.1. IGMPv2 hosts send leaves to 224.0.0.2. IGMPv3 reports go to 224.0.0.22.
MLD is the IPv6 equivalent and runs on ICMPv6. MLDv1 matches IGMPv2, and MLDv2 matches IGMPv3.
Router(config-if)# ip igmp version 3
On IOS XR the version is set under router igmp, on each interface.
PIM sparse mode
PIM-SM assumes receivers are few, so traffic is sent only where it is asked for. It uses a rendezvous point (RP) as a meeting place.
Receivers join a shared tree rooted at the RP, written as (*,G). A source registers with the RP, and traffic then flows down the shared tree. The last hop router can switch to a shortest path tree to the source, written as (S,G).
The RP can be set statically, or learned with Auto-RP or BSR. Each router checks the reverse path of every multicast packet against the unicast table, and drops it if it arrives on the wrong interface. This is the RPF check.
Router(config)# ip multicast-routing
Router(config)# ip pim rp-address 10.0.0.1
Router(config)# interface GigabitEthernet0/0/0
Router(config-if)# ip pim sparse-mode
The IOS XR version enables multicast on interfaces and sets the RP under PIM:
RP/0/RP0/CPU0:R1(config)# multicast-routing
RP/0/RP0/CPU0:R1(config-mcast)# address-family ipv4
RP/0/RP0/CPU0:R1(config-mcast-default-ipv4)# interface all enable
RP/0/RP0/CPU0:R1(config)# router pim
RP/0/RP0/CPU0:R1(config-pim)# address-family ipv4
RP/0/RP0/CPU0:R1(config-pim-default-ipv4)# rp-address 10.0.0.1
PIM SSM
Source specific multicast has no RP. The receiver names the source and the group, a channel (S,G), and the network builds the shortest path tree directly.
IGMPv3, or MLDv2 for IPv6, is needed, so that hosts can ask for a source. The default SSM range is 232.0.0.0/8 for IPv4. SSM removes the need for RP management and avoids the shared tree.
Router(config)# ip pim ssm default
PIM BIDIR
Bidirectional PIM uses only a shared tree. Traffic from any source goes up the tree to the RP and down to the receivers, in both directions. There is no register process and no switch to a shortest path tree.
Because only (*,G) state exists, BIDIR scales well when there are many sources, as in many to many applications. On each link, a designated forwarder is elected to send traffic towards the RP.
Router(config)# ip pim rp-address 10.0.0.1 BIDIR_GROUPS bidir
That is IOS XE, and the access list BIDIR_GROUPS names the groups that use BIDIR. Some releases also need ip pim bidir-enable first.
Comparing the modes
| Mode | RP | Trees | Best for |
|---|---|---|---|
| PIM-SM | Yes | Shared, then shortest path | General use |
| PIM-SSM | No | Shortest path only | One to many, like video |
| PIM-BIDIR | Yes | Shared only, both ways | Many to many |
Verification
RP/0/RP0/CPU0:R1# show pim neighbor
RP/0/RP0/CPU0:R1# show mrib route
RP/0/RP0/CPU0:R1# show igmp groups
Router# show ip mroute
What to remember for the exam
Eight facts cover most questions on this topic.
- IGMPv2 adds leave messages. IGMPv3 adds source filtering.
- SSM needs IGMPv3 or MLDv2, and the default IPv4 range is 232.0.0.0/8.
- MLDv1 matches IGMPv2, and MLDv2 matches IGMPv3.
- PIM-SM uses an RP and (*,G) shared trees, then can switch to (S,G).
- SSM has no RP and builds only (S,G) trees.
- BIDIR uses only (*,G) state and a designated forwarder on each link.
- The RPF check compares the incoming interface with the unicast route to the source.
ip pim sparse-modeenables PIM on an IOS XE interface.
If the receivers name the source, it is SSM and IGMPv3 is needed.
Common mistakes
These four mistakes appear often.
Using SSM with IGMPv2 hosts. Those hosts cannot name a source.
Forgetting to enable PIM on an interface in the path. The tree breaks at that hop.
Ignoring the RPF check. Traffic that arrives on a different interface from the unicast path to the source is dropped.
Using different RP addresses on different routers. The routers build trees to different places.
A route to the source or RP that points the wrong way will fail the RPF check and stop the stream, even if PIM looks healthy.
Check yourself
Work through these three questions.
Which IGMP version does SSM need?
IGMPv3, because hosts must name a source, and MLDv2 is the IPv6 equivalent.
What does the RPF check do?
It drops a multicast packet that arrives on an interface that is not the one the unicast table uses to reach the source.
When is PIM BIDIR a good fit?
When there are many sources and receivers, because it keeps only (*,G) state.
Topic 4 of 5 in Services
Test yourself on Services
The full Cisco CCNP 350-501 SPCOR question bank has 738 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.