Previous section   Next section

Recipe 23.12 Exchanging Multicast Routing Information with MBGP

23.12.1 Problem

You want to exchange multicast routing information between two networks using MBGP.

23.12.2 Solution

Before setting up MBGP, you should set up multicast routing on the Autonomous System Boundary Router (ASBR) and configure it to block multicast traffic that you know is intended only for the local network:

Router-ASBR1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router-ASBR1(config)#ip multicast-routing
Router-ASBR1(config)#access-list 15 deny 239.0.0.0 0.255.255.255
Router-ASBR1(config)#access-list 15 deny 224.0.1.39
Router-ASBR1(config)#access-list 15 deny 224.0.1.40
Router-ASBR1(config)#access-list 15 permit any
Router-ASBR1(config)#interface Serial0/0
Router-ASBR1(config-if)#ip multicast boundary 15
Router-ASBR1(config-if)#ip multicast ttl-threshold 64
Router-ASBR1(config-if)#ip pim dense-mode
Router-ASBR1(config-if)#end
Router-ASBR1#

Then you need to set up the MBGP configuration:

Router-ASBR1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router-ASBR1(config)#router bgp 65530
Router-ASBR1(config-router)#network 10.0.0.0 mask 255.0.0.0 
Router-ASBR1(config-router)#neighbor 10.15.32.1 remote-as 65531
Router-ASBR1(config-router)#address-family ipv4 multicast
Router-ASBR1(config-router-af)#neighbor 10.15.32.1 activate
Router-ASBR1(config-router-af)#end
Router-ASBR1#

23.12.3 Discussion

Usually when people talk about using BGP, they immediately think of the public Internet. Since most of the Internet is not capable of transmitting multicast traffic (yet), MBGP may not seem immediately useful. However, BGP has many other uses besides connecting to the Internet. For example, many large networks use it for interconnecting larger corporate divisions for stability, scalability, or administrative reasons. BGP is often used for interconnecting private networks belonging to separate companies that share information in large volume. In any case where you use BGP for interconnecting two networks, it is natural to consider MBGP for sharing required multicast routing information. And there is more and more interest and experimentation in multicast functionality in the public Internet.

However, it's important to remember that MBGP is not actually a multicast routing protocol in the same sense as PIM or DVMRP. It does not do Join or Prune operations to create SPTs, nor does it have a mechanism to find RPs. It merely allows you to transmit routing information that the router can use in calculating the best path back to the source. This is why we have configured PIM-DM on the external interface in the example.

The reason that we have not specified PIM-SM in particular is that doing so implies that there must be an RP external to the AS. This is possible, and increasingly common. But it means that you need a way to discover it. The best way to do this is to use the Multicast Source Discovery Protocol (MSDP), which is described in Recipe 23.13.

The example configuration does several things. First, it uses the same principles demonstrated in Recipe 23.10 and Recipe 23.11 for controlling scope. The external interfaces drop any packets with a TTL value less than or equal to 64, to help prevent internal applications from reaching the adjacent network. And these interfaces are also configured to block all groups with addresses between 239.0.0.0 and 239.255.255.255, to enforce administratively scoped addressing.

You will also notice that the same access list that enforces this address restriction also blocks two other groups: 224.0.1.39 and 224.0.1.40. These are used by Cisco's proprietary Auto-RP for discovering RPs within a network. It is a good idea to prevent these groups from crossing network boundaries, whether you are using Auto-RP or not. Otherwise you risk leaking inappropriate RP information from one network into the other. It can cause serious confusion if your network tries to use the RP from an adjacent network for its internal traffic.

In the BGP configuration section, both multicast and unicast traffic use the same network paths. You can also break these up so that you send multicast traffic by a different path than unicast traffic. This is done by simply defining one of the BGP peers for multicast traffic, and leaving the other unmodified so that the router will use it for unicast traffic.

Router-ASBR1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router-ASBR1(config)#router bgp 65530
Router-ASBR1(config-router)#network 10.0.0.0 mask 255.0.0.0 
Router-ASBR1(config-router)#neighbor 10.15.32.1 remote-as 65531
Router-ASBR1(config-router)#neighbor 10.15.32.2 remote-as 65531
Router-ASBR1(config-router)#address-family ipv4 multicast
Router-ASBR1(config-router-af)#neighbor 10.15.32.1 activate
Router-ASBR1(config-router-af)#end
Router-ASBR1#

Whether you route unicast and multicast traffic through the same or different paths, MBGP allows you to apply AS filtering separately to both kinds of traffic. There is a new route map match clause that you can use specifically to identify multicast routing information:

Router-ASBR1(config)#route-map mbgp-test permit 10
Router-ASBR1(config-routemap)#match nlri multicast

23.12.4 See Also

Recipe 23.10; Recipe 23.11; Recipe 23.13


  Previous section   Next section
Top