MSDP Configuration
Multicast Source Discovery Protocol (MSDP) is used to exchange multicast source information between BGP-enabled PIM-SM domains. Using MSDP, routers in a PIM-SM domain can rely on their own RP to reach a source in a different PIM-SM domain.
Overview
MSDP routers in a PIM-SM domain have a MSDP peering relationship with MSDP peers in another domain using a TCP connection. MSDP peering is the first step towards exchanging inter-domain multicast source information using MSDP SA (Source-Active) messages.
When an RP in a PIM-SM domain first learns of a new sender (via PIM register messages), it constructs an SA message and sends it to its MSDP peers.
All RPs which intend to originate or receive SA messages must establish MSDP peering with other RPs, either directly or via an intermediate MSDP peer.
An SA message contains these fields:
• Source address of the data source
• Group address the data source sends to
• IP address of the RP
Each SA message received from a MSDP peer goes through an RPF check. The peer-RPF check compares the RP address carried in the SA message with the MSDP peer from which the message was received:
• If the MSDP peer receives an SA from a non-RPF peer towards the originating RP, it drops the message.
• Otherwise, it forwards the message to all its MSDP peers (except the one from which it received the SA message).
When an RP receives a new SA message from a peer in another domain, it checks if there are any receivers interested in the traffic. An RP checks for a (*, G) entry with a non-empty outgoing list. If the outgoing list is non-empty, the RP sends a (S,G) join towards the source.
Caching SA state
If a member joins a group soon after a SA message is received by the local RP, that member needs to wait until the next SA message to learn about the source. MSDP SA caching is done at MSDP peers to reduce join latency for new receivers. The SA cache is populated as soon an MSDP peer receives a SA message from its peer.
MSDP Mesh Group
MSDP Mesh groups are used inside a PIM-SM domain to ease RPF checking and SA forwarding within the domain. Any SA messages received from a peer in a mesh group are not forwarded to other peers in the same mesh group. This reduces SA message flooding and simplifies peer-RPF flooding.
MSDP Default Peer
An MSDP default peer is used when MSDP peers are not BGP peers. SA messages coming from a default peer do not go through an RPF check and are always accepted.
Configure PIM-SM
For the MSDP topology in
Figure 7-11, you must enable PIM-SM on all the routers in both PIM domains and make RTR-1 a rendezvous point (RP) in Domain-1 and RTR-2 an RP in Domain-2. For the steps to configure PIM-SM and RPs, see
Chapter 1, PIM Sparse Mode Configuration.
Configure MSDP
In the topology in
Figure 7-11, an MSDP session is established between RTR-1 and RTR-2 in both domains. The following sample configuration on RTR-1 shows how to enable MSDP peering between RTR-1 and RTR-2.
Topology
MSDP topology
IP addresses:
RTR-1 eth1: 11.1.1.11
RTR-1 eth2: 10.1.1.11
RTR-2 eth1: 11.1.1.12
RTR-2 eth2: 12.1.1.12
RTR-4 eth1: 12.1.1.14
RTR-4 eth2: 20.1.1.14
RTR-3 eth1: 13.1.1.13
RTR-3 eth2: 10.1.1.13
Source: 20.1.1.10
Multicast group: 224.1.1.1
RTR-1
#configure terminal | Enter configure mode. |
(config)#ip msdp peer 11.1.1.12 --or-- (config)#ip msdp peer 11.1.1.12 connect source eth1 | Configure a MSDP peer. Use the connect-source option to specify the primary IP address of the interface to use as the source IP address of the MSDP TCP connection. |
(config)#ip msdp password myPass peer 11.1.1.12 | Configure an MSDP password for the peer. You must specify the same command at RTR-2. The password must match at both the routers. |
(config)#ip msdp default-peer 11.1.1.12 | Configure MSDP default peer. |
(config)#ip msdp mesh-group mesh1 11.1.1.12 | Configure MSDP mesh group. |
(config)#ip msdp originator-id eth2 | Configure MSDP originator identifier. |
(config)#commit | Commit the transaction. |
Validation
RTR-1
#show running-config
ip msdp peer 11.1.1.12
ip msdp default-peer 11.1.1.12
ip msdp mesh-group mesh1 11.1.1.12
ip msdp password myPass peer 11.1.1.12
ip msdp originator-id eth2
ip multicast-routing
!
ip pim register-rp-reachability
ip pim bsr-candidate eth2
ip pim rp-candidate eth2
ip pim vrf management register-rp-reachability
!
interface lo
ip address 127.0.0.1/8
ipv6 address ::1/128
no shutdown
!
interface eth0
ip address 10.12.48.175/24
no shutdown
!
interface eth1
ip address 11.1.1.11/24
no shutdown
ip pim sparse-mode
ip pim bsr-border
!
interface eth2
ip address 10.1.1.11/24
no shutdown
ip pim sparse-mode
!
interface eth3
no shutdown
!
interface pimreg
no multicast
no shutdown
!
router ospf 100
network 10.1.1.0/24 area 0.0.0.0
cspf disable-better-protection
!
router bgp 1
neighbor 11.1.1.12 remote-as 2
!
line con 0
login
line vty 0 39
login
!
This command shows the MSDP peer information at RTR-1:
#show ip msdp peer
MSDP Peer 11.1.1.12
Connection status
State: Up (Established)
Keepalive sent: 1
Keepalive received: 1
Number of connect retries: 0
In the MSDP topology in
Figure 7-11, when a source sends multicast traffic for group 224.1.1.1, RTR-4 (the DR) sends a register packet towards RTR-2 which is the RP in the domain. RTR-2 receives the register packet and sends an MSDP SA message to its MSDP peer (RTR-1). RTR-1 receives the SA message and creates an entry in the SA cache containing the source, group, and RP information.
This command at RTR-1 shows the SA information with source address, group address, and RP address:
#show ip msdp sa-cache
MSDP Source-Active Cache:
(20.1.1.11, 224.1.1.1), RP 10.1.1.11, RPF-Peer 11.1.1.12 Uptime 00:00:02 Exptime 00:03:28P
RTR-3 receives an IGMP join for group 224.1.1.1 and joins the shared tree path toward the RP (RTR-1).
When RTR-1 receives an SA message from RTR-2, because it has a receiver, it sends an (S,G) join towards the source. Now traffic from the source is received at RTR-1 via the shortest path tree formed between RTR-1 and the source. RTR-1 distributes traffic downstream towards the receiver.
This command shows the PIM state at RTR-1 upon receiving an SA message and joining towards the source:
#show ip pim mroute
IP Multicast Routing Table
(*,*,RP) Entries: 0
(*,G) Entries: 1
(S,G) Entries: 1
(S,G,rpt) Entries: 1
FCR Entries: 0
(*, 224.1.1.1)
RP: 10.1.1.11
RPF nbr: 0.0.0.0
RPF idx: None
Upstream State: JOINED
Local ..i.............................
Joined ................................
Asserted ................................
FCR:
(20.1.1.10, 224.1.1.1)
RPF nbr: 11.1.1.12
RPF idx: eth1
SPT bit: 0
Upstream State: JOINED
Local ................................
Joined ................................
Asserted ................................
Outgoing ..o.............................
(20.1.1.10, 224.0.1.3, rpt)
RP: 10.1.1.11
RPF nbr: 0.0.0.0
RPF idx: None
Upstream State: NOT PRUNED
Local ................................
Pruned ................................
Outgoing ..o.............................
RTR-2
This command shows the MSDP peer information at RTR-2.
#show ip msdp peer
MSDP Peer 11.1.1.11
Connection status
State: Up (Established)
Keepalive sent: 2
Keepalive received: 2