Configuring Bidirectional PIM
This chapter describes how to configure the Bidirectional PIM (bidir-PIM) feature. Bidir-PIM is a variant of the Protocol Independent Multicast (PIM) suite of routing protocols for IP multicast and is an extension of the existing PIM sparse mode (PIM-SM) feature. Bidir-PIM resolves some limitations of PIM-SM for groups with a large number of sources.
Bidir-PIM is based on the draft-kouvelas-pim-bidir-new-00.txt Internet Engineering Task Force (IETF) protocol specification. This draft and other drafts referenced by it can be found at the following URL: ftp://ftpeng.cisco.com/ipmulticast/drafts.
For more information on PIM-SM, refer to the "Configuring IP Multicast Routing" chapter of the Cisco IOS IP Configuration Guide and the Cisco IOS IP Command Reference, Volume 3 of 3: Multicast.
For a complete description of the bidir-PIM commands used in this chapter, refer to the "IP Multicast Routing Commands" chapter of the Cisco IOS IP Command Reference, Volume 3 of 3: Multicast. To locate documentation of other commands that appear in this chapter, use the command reference master index, or search online.
To identify the hardware platform or software image information associated with a feature, use the Feature Navigator on Cisco.com to search for information about the feature or refer to the software release notes for a specific release. For more information, see the "Identifying Supported Platforms" section in the "Using Cisco IOS Software" chapter.
Bidir-PIM is a variant of the PIM suite of routing protocols for IP multicast. In PIM, packet traffic for a multicast group is routed according to the rules of the mode configured for that multicast group. The Cisco IOS implementation of PIM supports three modes for a multicast group:
A router can simultaneously support all three modes or any combination of them for different multicast groups. In bidirectional mode, traffic is routed only along a bidirectional shared tree that is rooted at the rendezvous point (RP) for the group. In bidir-PIM, the IP address of the RP acts as the key to having all routers establish a loop-free spanning tree topology rooted in that IP address. This IP address need not be a router, but can be any unassigned IP address on a network that is reachable throughout the PIM domain. This technique is the preferred configuration method for establishing a redundant RP configuration for bidir-PIM.
Membership to a bidirectional group is signalled via explicit join messages. Traffic from sources is unconditionally sent up the shared tree toward the RP and passed down the tree toward the receivers on each branch of the tree.
Bidir-PIM is designed to be used for many-to-many applications within individual PIM domains. Multicast groups in bidirectional mode can scale to an arbitrary number of sources without incurring overhead due to the number of sources.
Bidir-PIM is derived from the mechanisms of PIM-SM and shares many shortest-path tree (SPT) operations. Bidir-PIM also has unconditional forwarding of source traffic toward the RP upstream on the shared tree, but no registering process for sources as in PIM-SM. These modifications are necessary and sufficient to allow forwarding of traffic in all routers solely based on the (*, G) multicast routing entries. This feature eliminates any source-specific state and allows scaling capability to an arbitrary number of sources. Figure 76 and Figure 77 show the difference in state created per router for a unidirectional shared tree and source tree versus a bidirectional shared tree.
Figure 76 Unidirectional Shared Tree and Source Tree
Figure 77 Bidirectional Shared Tree
When packets are forwarded downstream from the RP toward receivers, there are no fundamental differences between bidir-PIM and PIM-SM. Bidir-PIM deviates substantially from PIM-SM when passing traffic from sources upstream toward the RP.
PIM-SM cannot forward traffic in the upstream direction of a tree, because it only accepts traffic from one Reverse Path Forwarding (RPF) interface. This interface (for the shared tree) points toward the RP, therefore allowing only downstream traffic flow. In this case, upstream traffic is first encapsulated into unicast register messages, which are passed from the designated router (DR) of the source toward the RP. In a second step, the RP joins an SPT that is rooted at the source. Therefore, in PIM-SM, traffic from sources traveling toward the RP does not flow upstream in the shared tree, but downstream along the SPT of the source until it reaches the RP. From the RP, traffic flows along the shared tree toward all receivers.
In bidir-PIM, the packet forwarding rules have been improved over PIM-SM, allowing traffic to be passed up the shared tree toward the RP. To avoid multicast packet looping, bidir-PIM introduces a new mechanism called designated forwarder (DF) election, which establishes a loop-free SPT rooted at the RP.
On every network segment and point-to-point link, all PIM routers participate in a procedure called DF election. The procedure selects one router as the DF for every RP of bidirectional groups. This router is responsible for forwarding multicast packets received on that network upstream to the RP.
The DF election is based on unicast routing metrics and uses the same tie-break rules employed by PIM assert processes. The router with the most preferred unicast routing metric to the RP becomes the DF. Use of this method ensures that only one copy of every packet will be sent to the RP, even if there are parallel equal cost paths to the RP.
A DF is selected for every RP of bidirectional groups. As a result, multiple routers may be elected as DF on any network segment, one for each RP. In addition, any particular router may be elected as DF on more than one interface.
Bidirectional Group Tree Building
The procedure for joining the shared tree of a bidirectional group is almost identical to that used in PIM SM. One main difference is that, for bidirectional groups, the role of the DR is assumed by the DF for the RP.
On a network with local receivers, only the router elected as the DF populates the outgoing interface list (olist) upon receiving Internet Group Management Protocol (IGMP) join messages, and sends (*, G) join and leave messages upstream toward the RP. When a downstream router wishes to join the shared tree, the RPF neighbor in the PIM join and leave messages is always the DF elected for the interface leading to the RP.
When a router receives a join or leave message, and the router is not the DF for the receiving interface, the message is ignored. Otherwise, the router updates the shared tree in the same way as in sparse mode.
In a network where all routers support bidirectional shared trees, (S, G) join and leave messages are ignored. There is also no need to send PIM assert messages, because the DF election procedure eliminates parallel downstream paths from any RP. In addition, an RP never joins a path back to the source, nor will it send any register stops.
A router only creates (*, G) entries for bidirectional groups. The olist of a (*, G) entry includes all the interfaces for which the router has been elected DF and that have received either an IGMP or PIM join message. If a router is located on a sender-only branch, it will also create (*, G) state, but the olist will not include any interfaces.
If a packet is received from the RPF interface toward the RP, the packet is forwarded downstream according to the olist of the (*, G) entry. Otherwise, only the router that is the DF for the receiving interface forwards the packet upstream toward the RP; all other routers must discard the packet.
Bidir-PIM Configuration Task List
To configure bidir-PIM, perform the tasks described in the following sections. The tasks in the first section are required; the task in the remaining sections are optional.
•Configuring Bidir-PIM (Required)
•Verifying Bidirectional Groups (Optional)
•Monitoring and Maintaining Bidir-PIM (Optional)
Before configuring bidir-PIM, ensure that the feature is supported on all IP multicast-enabled routers in that domain. It is not possible to enable groups for bidir-PIM operation in a partially upgraded network.
Note Packet loops will occur immediately in networks that are only partially upgraded to support bidir-PIM.
Most of the configuration requirements for bidir-PIM are the same as those for configuring PIM-SM. You need not enable or disable an interface for carrying traffic for multicast groups in bidirectional mode. Instead, you configure which multicast groups you want to operate in bidirectional mode. Similar to PIM-SM, this configuration can be done via Auto-RP, static RP configurations, or the PIM Version 2 bootstrap router (PIMv2 BSR) mechanism.
To enable bidir-PIM, use the following command in global configuration mode:
Router(config)# ip pim bidir-enable
Enables bidir-PIM on a router.
To configure bidir-PIM, use the following commands in global configuration mode, depending on which method you use to distribute group-to-RP mappings:
Router(config)# ip pim rp-address rp-address [access-list] [override] bidir
Configures the address of a PIM RP for a particular group, and specifies bidirectional mode. Use this command when you are not distributing group-to-RP mappings using either Auto-RP or the PIMv2 BSR mechanism.
Router(config)# ip pim rp-candidate type number [group-list access-list] bidir
Configures the router to advertise itself as a PIM Version 2 candidate RP to the BSR, and specifies bidirectional mode. Use this command when you are using the PIMv2 BSR mechanism to distribute group-to-RP mappings.
Router(config)# ip pim send-rp-announce type number scope ttl-value [group-list access-list] [interval seconds] bidir
Configures the router to use Auto-RP to configure for which groups the router is willing to act as RP, and specifies bidirectional mode. Use this command when you are using Auto-RP to distribute group-to-RP mappings.
See the "Bidir-PIM Configuration Example" section later in this chapter for an example of how to configure bidir-PIM.
Verifying Bidirectional Groups
To verify configuration of bidirectional groups, use the following show commands:
•To examine RP-to-group mappings and determine the bidirectional groups advertised by an RP, use the show ip pim rp mapping command in EXEC mode.
•To display the IP multicast routing table information for groups operating in bidirectional mode, sparse mode, and dense mode, use the show ip mroute command in EXEC mode.
•To display information about the elected DF for each RP of an interface and the metric associated with the DF, use the show ip pim interface df command in EXEC mode.
Monitoring and Maintaining Bidir-PIM
To display bidir-PIM information, use the following commands in EXEC mode, as needed:
Router# show ip pim interface [type number] [df | count] [rp-address]
Displays information about the elected DF for each RP of an interface, along with the unicast routing metric associated with the DF.
Router# show ip pim rp [mapping | metric] [rp-address]
Displays information about configured RPs, learned via Auto-RP or BSR, along with their unicast routing metric.
Bidir-PIM Configuration Example
By default a bidirectional RP advertises all groups as bidirectional. An access list on the RP can be used to specify a list of groups to be advertised as bidirectional. Groups with the deny keyword will operate in dense mode. A different, nonbidirectional RP address is required for groups that operate in sparse mode, because a single access list only allows either a permit or deny keyword.
The following example shows how to configure an RP for both sparse mode and bidirectional mode groups. 224/8 and 227/8 are bidirectional groups, 226/8 is sparse mode, and 225/8 is dense mode. The RP must be configured to use different IP addresses for the sparse mode and bidirectional mode operations. Two loopback interfaces are used to allow this configuration. The addresses of these loopback interfaces must be routed throughout the PIM domain such that the other routers in the PIM domain can receive Auto-RP announcements and communicate with the RP.
ip multicast-routing !Enable IP multicast routing
ip pim bidir-enable !Enable bidir-PIM
description One Loopback adddress for this routers Bidir Mode RP function
ip address 10.0.1.1 255.255.255.0
description One Loopback adddress for this routers Sparse Mode RP function
ip address 10.0.2.1 255.255.255.0
ip pim send-rp-announce Loopback0 scope 10 group-list 45 bidir
ip pim send-rp-announce Loopback1 scope 10 group-list 46
ip pim send-rp-discovery scope 10
access-list 45 permit 184.108.40.206 0.255.255.255
access-list 45 permit 220.127.116.11 0.255.255.255
access-list 45 deny 18.104.22.168 0.255.255.255
access-list 46 permit 22.214.171.124 0.255.255.255