Overview

While PIM-DM supports only source based trees, PIM-SM supports both shared and source based tress. It is the multicast routing protocol of choice in today’s network. PIM-SM uses 7 PIMv2 messages.

  • Hello
  • Bootstrap
  • Candidate-RP-Advertisement
  • Join/Prune
  • Assert
  • Register
  • Register-Stop

That leaves Graft and Graft-Ack messages as unique to PIM-DM while Bootstrap, Candidate-RP-Advertisement, Register, and Register-Stop are unique to PIM-SM. Hello, Join/Prune, and Assert are used by both protocols.

Several functions we have already covered are common to both PIM-DM and PIM-SM.

  • Neighbor Discovery through Hello messages
  • Recalculation of the RPF interface when the unicast routing table changes
  • Election of a DR on multiaccess networks
  • Use of Prune Overrides on multiaccess networks
  • Use of Assert messages to elect a designated forwarder on multiaccess networks

A shared tree is rooted somewhere other than the source. In PIM-SM this root is called the Rendezvous Point (RP). Before a shared tree can be established, the joining routers must know how to find the RP. The router can learn the unicast IPv4 address of the RP in three ways:

  • The RP address can be statically configured on all routers. (rarely feasible)
  • An open-standard bootstrap protocol can designate and advertise the RP.
  • The Cisco-proprietary Auto-RP protocol can designate and advertise the RP. Note that Auto-RP supports only IPv4 multicast; IPv6 multicast is not supported.

Auto-RP and Bootstrap are covered in later topics.

A shared tree is not source specific, as indicated by its (*, G) designation. You can have multiple source addresses sending to the Group G.

Operation

When a PIM-SM DR receives an IGMP Membership Report from a host requesting a join to a multicast group, it first checks to see if there is an entry in the multicast table for the group. If there is an entry for the group, the interface on which the IGMP message was received is added to the table as an outgoing interface for the multicast group. No other action is needed.

If no entry exists, a (*,G) entry is created for the group and the outgoing interface is added. The router then looks up the group-to-RP mapping for this group. The unicast routing table is consulted for the route to the specified RP, and the upstream interface to the RP is added to the incoming (RPF) interface.

The router then sends a Join/Prune message out the upstream interface to 224.0.0.13. The message includes the address of the group to be joined and the address of the RP. The prune section of the message is empty. There are also two flags that are set, the wildcard bit (WC-bit) and the RP-tree bit (RPT-bit).

  • the WC-bit = 1 indicates that the join address is an RP address rather than a source address.
  • the RPT-bit = 1 indicates that the message is propagated along a shared tree to the RP

When the upstream router receives the Join/Prunce from the sending PIM router, one of four situations and associated actions holds true.

  • The router is not the RP and is on the shared tree. The router adds the interface on which it received the Join/Prune to the outgoing interface list for the group.
  • The router is not the RP and is not on the tree. The router creates a (*,G) entry and sends its own Join/Prune upstream toward the RP.
  • The router is the RP and has an entry for the group. The router adds the interface on which it received the Join/Prune to the outgoing interface list for the group.
  • The router is the RP and has no entry for the group. The router creates a (*,G) entry and adds the receiving interface to the outgoing interface list for the group.

After the shared tree is established, routers periodically send Join/Prune messages to upstream neighbors as a keepalive. The Join/Prune lists all route entries for which the destination neighbor is the previous-hop router. The default period is 60 seconds and can be changed with the Cisco IOS Software command ip pim message-interval. The hold time is three times the Join/Prune interval, or 3 minutes by default, and is advertised in the Join/ Prune message. If a PIM-SM router does not hear a Join/Prune for a known group from a downstream neighbor within the hold time, it prunes the downstream router from the outgoing interface list of the group entry.

Pruning

Pruning occurs in the same manner. When a router wants to prune itself from a shared tree, because it no longer has any directly connected group members or downstream neighbors, it sends a Join/Prune message out the RPF interface to the upstream neighbor. The group and RP address are listed in the Prune section, and the WC-bit and RPT-bit are set. The upstream router then removes the receiving interface from the outgoing interface list for the group. If that router has no more downstream neighbors and no connected group members, it also prunes itself.

Source Registration

Source registration is handled by the PIM-SM router that is directly connected to the source. When a PIM-SM router first receives a multicast packet from a directly connected source, it looks in its group-to-RP mappings to find the correct RP for the destination group. After the group’s RP is determined, the router encapsulates the multicast packet in a PIM Register message and sends the message to the RP. Rather than multicasting, the Register message is unicast to the RP address.

When the RP receives the Register message, the multicast packet is decapsulated. If the multicast routing table already has an entry for the group, copies of the multicast packet are forwarded out all interfaces on the outgoing interface list.

If there is a significant amount of multicast traffic to be sent to the RP, it is inefficient to continue encapsulating the packets in Register messages to get them to the RP. Therefore, the RP creates a (S,G) entry in its multicast table and initiates a shortest- path tree (SPT) to the source DR by multicasting a Join/Prune message. In this message the source address is included, WC-bit = 0, and RPT-bit = 0 to indicate that the path is a source-based SPT rather than a shared RPT.

After the SPT is established and the RP receives the group traffic over that tree, it sends a Register Stop message to the source’s DR to tell the router to stop sending the multicast packets in Register messages.

If there are no group members when the source begins sending multicast traffic to the RP, the RP does not build an SPT. Instead, it simply sends a Register Stop to the source’s DR telling it to stop sending the encapsulated multicast packets in Register messages. The RP has a (*,G) entry for the group, and when a member joins, the RP can then initiate the SPT.

A mechanism known as Register Suppression helps to protect against the DR continuing to send packets to a failed RP. When a DR receives a Register Stop, it starts a 60-second Register-Suppression timer. When the timer expires, the router again sends its multicast packets to the RP in Register messages. However, 5 seconds before this occurs, the DR sends a Register message with a flag set, called the Null-Register bit, and with no encapsulated packets. If this message triggers a Register Stop from the RP, the Register-Suppression timer is reset.

PIM-SM and Shortest Path Trees

We have already seen how PIM-SM can build a SPT between the RP and the Source DR. The protocol also allows SPTs to be built all the way from a router with attached group members to the source DR to alleviate inefficiencies in topologies.

When does Cisco switch from the RPT to a SPT? Cisco routers join the SPT immediately after receiving the first packet on the shared tree for a given (S, G). This default can be changed with the command ip pim spt-threshold, in which the threshold for switching to the SPT is specified in kilobits per second.