Exchanging Multicast Routing Information with MBGP

Problem

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

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 only intended 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#

 

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. And 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 any 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 Rendezvous Points. 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 why we have not specified PIM-SM in particular is because doing so implies that there must be an RP external to the Autonomous System. 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.17.

The example configuration does several things. First, it uses the same principles demonstrated in Recipes 23.14 and 23.15 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 Rendezvous Points 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

 

See Also

Recipe 23.14; Recipe 23.15; Recipe 23.17

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