Configuring Bidirectional PIM

Problem

You want to use Bidirectional PIM to improve efficiency of your sparse-mode multicast network.

Solution

To use Bidirectional PIM, you must configure all of the routers in your network to support this method of building multicast forwarding trees. The RP configuration looks like this:

Router-RP1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router-RP1(config)#ip multicast-routing
Router-RP1(config)#ip pim bidir-enable
Router-RP1(config)#ip pim rp-address 192.168.12.1 bidir
Router-RP1(config)#ip pim rp-candidate Loopback0 group-list 15 bidir
Router-RP1(config)#ip pim bsr-candidate Loopback0 1
Router-RP1(config)#access-list 15 permit 239.5.5.0 0.0.0.255
Router-RP1(config)#access-list 15 deny any
Router-RP1(config)#interface Loopback0
Router-RP1(config-if)#ip address 192.168.12.1 255.255.255.255
Router-RP1(config-if)# ip pim sparse-mode
Router-RP1(config-if)#exit
Router-RP1(config)#interface FastEthernet0/0
Router-RP1(config-if)#ip address 192.168.1.1 255.255.255.0
Router-RP1(config-if)#ip pim sparse-mode
Router-RP1(config-if)#exit
Router-RP1(config)#interface Serial1/0
Router-RP1(config-if)#ip address 192.168.2.5 255.255.255.252
Router-RP1(config-if)#ip pim sparse-mode
Router-RP1(config-if)#exit
Router-RP1(config)#end
Router-RP1#

And the other multicast routers in this network will be configured to use Bidirectional PIM for this RP, as follows:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ip multicast-routing
Router1(config)#ip pim bidir-enable
Router1(config)#ip pim rp-address 192.168.12.1 bidir
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ip address 192.168.1.2 255.255.255.0
Router1(config-if)#ip pim sparse-mode
Router1(config-if)#interface Serial1/0
Router1(config-if)#ip address 192.168.3.5 255.255.255.252
Router1(config-if)#ip pim sparse-mode
Router1(config-if)#end
Router1#

 

Discussion

As we mentioned in the Introduction to this chapter, Bidirectional PIM is closely related to PIM-SM, but with a different method for building the multicast forwarding path from the source to the RP. In most cases, the actual path used by Bidirectional PIM will be identical to the path used by PIM-SM.

However, there are two key practical differences between PIM-SM and Bidirectional PIM. First, where PIM-SM must use unicast Registration packets to introduce a new multicast stream to the RP, Bidirectional PIM uses native multicasts and pre-builds the multicast tree to the RP. And second, PIM-SM can, after a multicast source has been sending packets for a predetermined period of time, revert to a source-rooted tree, eliminating the RP function. Bidirectional PIM does not have this capability, and barring changes in the network topology, will keep the same multicast forwarding tree for as long as the source continues to send packets.

If you plan to use this feature, it is important to remember that all of the routers in the network, including the RP, must be configured to support Bidirectional PIM. You do this by first enabling Bidirectional PIM mode, and specifying any statically configured RPs using the bidir option. These are global configuration commands:

Router1(config)#ip pim bidir-enable
Router1(config)#ip pim rp-address 192.168.12.1 bidir

On the RP you must also enable Bidirectional PIM by using the same bidir-enable command, and you must specify the bidir option on the rp-candidate command:

Router-RP1(config)#ip pim bidir-enable
Router-RP1(config)#ip pim rp-address 192.168.12.1 bidir
Router-RP1(config)#ip pim rp-candidate Loopback0 group-list 15 bidir

You will get very odd behavior if you configure some of your routers for Bidirectional PIM support and others for PIM-SM (regardless of whether you use AutoRP or BSR for locating the RP). If a Bidirectional PIM router initiates a new multicast source, it will attempt to reach the RP using multicast packets. Unfortunately, any upstream routers that are not running Bidirectional PIM will not have a pre-built Bidirectional tree rooted at the RP, and the multicast packets will not arrive.

Since Bidirectional PIM became available in IOS level 12.2, if you have a mixture of IOS levels that includes earlier releases, you cannot use this feature in your network.

Note that in these examples we have used BSR to locate the RP, as in Recipe 23.2. We did this because it is somewhat simpler conceptually to see the interfaces configured in sparse mode. However, we could just as easily have used AutoRP for RP discovery, as in Recipe 23.3. In this case, the key is to configure the RP to advertise itself as bidirectional when it sends RP announcement packets:

Router-RP1(config)#ip pim send-rp-announce loopback0 scope 16 group-list 15 bidir
Router-RP1(config)#ip pim send-rp-discovery scope 16

And you must also configure all of the interfaces in sparse-dense mode, as we did in Recipe 23.3.

It is important to remember that Bidirectional PIM creates an RP rooted multicast tree for each RP. If you have more than one RP, then the protocol creates a separate forwarding tree for each RP (not one for each group). This also implies that you can configure a mixture of Bidirectional PIM and PIM-SM RPs, with different multicast groups using different tree construction protocols depending on which RP they use. Furthermore, if you use AutoRP and sparse-dense mode, the routers will resort to dense mode by default for any multicast groups that do not have an RP. So it is actually possible to mix all three flavors of PIM in a single network, although we don't generally recommend this approach, as it will make troubleshooting more complicated.

See Also

Recipe 23.2; Recipe 23.3

Router Configuration and File Management

Router Management

User Access and Privilege Levels

TACACS+

IP Routing

RIP

EIGRP

OSPF

BGP

Frame Relay

Handling Queuing and Congestion

Tunnels and VPNs

Dial Backup

NTP and Time

DLSw

Router Interfaces and Media

Simple Network Management Protocol

Logging

Access-Lists

DHCP

NAT

First Hop Redundancy Protocols

IP Multicast

IP Mobility

IPv6

MPLS

Security

Appendix 1. External Software Packages

Appendix 2. IP Precedence, TOS, and DSCP Classifications

Index



Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net