In the last tip of this series, I outlined the different distribution trees used in multicast networks. We examined...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
source based and shared multicast trees and detailed the creation of two key entries in the multicast forwarding table, the S,G and the *,G. This week I'll introduce you to the multicast routing protocol PIM and show you some basic configurations.
Protocol Independent Multicast (PIM) is responsible for the accurate and timely delivery of multicast data to various receivers throughout a network. The PIM architecture is actually split into two different revisions: PIM sparse mode (PIM-SM), detailed in RFC 2362, and PIM dense mode outlined in RFC 3973. I will focus mostly on the functions and configurations of PIM-SM in this series. Like its name suggests, PIM is not dependant on any particular routing protocol, which allows it to be implemented across various network architectures using a range of different routing protocols. PIM uses the unicast forwarding table to build the multicast forwarding table. This is a key feature which allows PIM to scale better than most dependent protocols like MOSPF.
Join and Prune
What makes PIM efficient is its ability to respond to explicit join and prune requests. The concept surrounding these requests is the same for both PIM-SM and PIM-DM although the implementation is a little different. A join request is initiated by a receiver using IGMP and this request is forwarded on by the next-hop router to the root (RP, in the case of an RPT) of the multicast. Once the receiver is finished with the multicast, or no longer wants to be a part of that particular group, the next-hop router sends a prune message upstream, notifying the other routers of the change and informing them to remove the *,G from their forwarding table. This PIM mechanism helps keep multicast trees manageable and assures that the multicast streams are effectively routed throughout the network.
Recall from the first article in this series (Introduction to IP Multicast) the concept surrounding dense topologies. PIM-DM was developed to support densely populated multicast networks by "pushing" the multicast everywhere within a network. And you thought that multicast routing protocols were supposed to cut down on the amount of unnecessary traffic. Such is not the case with dense protocols like PIM-DM. Once PIM-DM floods the network with multicast traffic, it's up to the edge routers to prune back the unwanted data. Like I noted before, the concept of joining and pruning are the same, but the implantation is different. Below is a picture which outlines PIM-DM:
Figure 1 – PIM-DM
The figure shows the source sending data to members of group 1. Notice the Prune messages send from the edge routers back upstream towards the source, leaving the shortest path between the source and receivers. This again is referred to as an SPT – and this means that each router has an S,G for the multicast data of each source. PIM-DM does not support Shared Trees.
In contrast to PIM-DM, PIM-SM uses a configured Rendezvous Point (RP) for source registration and join/prune messages. Each source registers with the RP and it initially forwards the multicast data to the receivers throughout the network. PIM-SM uses a combination of either a shared or source based trees as shown in the figure below (Unidirectional).
Figure 2 – PIM-SM
As shown in the figure, the source registers with the RP using an S,G and the RP forwards the multicast downstream to the receivers using a *,G. There can be a case when using the shared path is not desired and PIM itself will readjust to use the source based model. One note can be made about the RP – it's generally best practice to locate your RP as close to the source as possible.
PIM Configuration Example
PIM is actually quite simple to configure. The following example is how to configure PIM on Cisco devices:
- Turn on multicast routing
- Enable PIM-SM on EACH interface, both upstream and downstream
R1(config)#ip pim rp-address 10.1.1.1 R1(config)#interface e0 R1(config-if)#ip pim sparse-mode R1(config)#interface e1 R1(config-if)#ip pim sparse-mode
Remember that in order for PIM-SM to work properly, the configured RP must be reachable and every interface which will be involved in the multicast routing tree must be configured for PIM-SM. Note that this configuration is used with PIM-SM and a static RP. For PIM-DM:
- Turn on multicast routing
- Enable PIM-DM on EACH interface, both upstream and downstream
R1(config)#interface e0 R1(config-if)#ip pim dense-mode R1(config)#interface e1 R1(config-if)#ip pim dense-mode
Another command is available for this configuration as well: ip pim sparse-dense-mode. This command is commonly used for the configuration of Auto-RP, which I'll save for another discussion. Also note that when using this command, if there is no RP configured, PIM will default to using dense mode. Now that you have a basic understanding of PIM and how to configure it, next weeks's grand finale I'll show you how to use PIM-SM with various RP configurations and filters – and we'll examine some multicast forwarding tables.
Doug Downer (CCIE #9848) is a Sr. Consultant with Callisma, INC, a wholly owned subsidiary of SBC Communications. Doug has over 7 years in the industry and currently provides high level business and technology consulting for various federal clients in the Washington D.C. area. He can be reached at email@example.com.