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 6-8, 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 3, PIM Sparse Mode Configuration.
Configure MSDP
In the topology in
Figure 6-8, 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)#exit | Exit configure mode. |
Validation
RTR-1
#show running-config
!
!Last configuration change at 06:54:59 EDT Tue May 28 2019 by ocnos
!
no service password-encryption
!
hostname RTR1
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
feature telnet
ssh login-attempts 0
ssh server port 39681568
no feature ssh
snmp-server enable snmp
snmp-server view all .1 included
feature ntp
ntp enable
username ocnos role network-admin password encrypted $1$wOL9u7T.$YENa7qmmtL3zWMXKBWSKw/
feature rsyslog
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 bsr-candidate eth2
ip pim rp-candidate eth2
!
interface lo
ip address 127.0.0.1/8
ipv6 address ::1/128
mtu 65536
!
interface eth0
ip address 192.168.52.3/24
!
interface eth1
ip address 11.1.1.11/24
ip pim bsr-border
ip pim sparse-mode
!
interface eth2
ip address 10.1.1.11/24
ip pim sparse-mode
!
interface eth3
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
!
end
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 6-8, 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 - 1 entries
(20.1.1.11, 224.1.1.1), RP 12.1.1.12, 00:00:14/00:03:16
#
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 ................................
Joined ..j.............................
Asserted ................................
FCR:
(20.1.1.10, 224.1.1.1)
RPF nbr: 0.0.0.0
RPF idx: None
SPT bit: 0
Upstream State: JOINED
Local ................................
Joined ................................
Asserted ................................
Outgoing ..o.............................
(20.1.1.10, 224.1.1.1, rpt)
RP: 10.1.1.11
RPF nbr: 0.0.0.0
RPF idx: None
Upstream State: NOT PRUNED
--More-- Local ................................
Pruned ................................
Outgoing ..o.............................
#sh ip msdp sa-cache
MSDP Source-Active Cache - 1 entries
(20.1.1.11, 224.1.1.1), RP 12.1.1.12, 00:00:14/00:03:16
#
RTR-2
#show running-config
!
!Last configuration change at 13:58:59 EDT Mon May 27 2019 by ocnos
!
no service password-encryption
!
hostname RTR2
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
feature telnet
no feature ssh
snmp-server enable snmp
snmp-server view all .1 included
feature ntp
ntp enable
username ocnos role network-admin password encrypted $1$wOL9u7T.$YENa7qmmtL3zWMXKBWSKw/
feature rsyslog
ip msdp peer 11.1.1.11
ip msdp default-peer 11.1.1.11
ip msdp mesh-group mesh1 11.1.1.11
ip msdp password myPass peer 11.1.1.11
ip msdp originator-id eth2
!
ip multicast-routing
!
ip pim bsr-candidate eth2
ip pim rp-candidate eth2
!
interface lo
ip address 127.0.0.1/8
--More-- ipv6 address ::1/128
mtu 65536
!
interface eth0
ip address 192.168.52.2/24
!
interface eth1
ip address 11.1.1.12/24
ip pim bsr-border
ip pim sparse-mode
!
interface eth2
ip address 12.1.1.12/24
ip pim sparse-mode
!
interface eth3
shutdown
!
router ospf 200
network 12.1.1.0/24 area 0.0.0.0
cspf disable-better-protection
!
router bgp 2
neighbor 11.1.1.11 remote-as 1
!
line con 0
login
line vty 0 39
login
!
end
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: 15
Keepalive received: 17
#
RTR-3
#show running-config
!
!Last configuration change at 14:07:38 EDT Mon May 27 2019 by ocnos
!
no service password-encryption
!
hostname RTR3
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
feature telnet
ssh login-attempts 0
ssh server port 40574496
no feature ssh
snmp-server enable snmp
snmp-server view all .1 included
feature ntp
ntp enable
username ocnos role network-admin password encrypted $1$wOL9u7T.$YENa7qmmtL3zWMXKBWSKw/
feature rsyslog
!
ip multicast-routing
!
ip pim rp-address 10.1.1.11
!
interface lo
ip address 127.0.0.1/8
ipv6 address ::1/128
mtu 65536
!
interface eth0
--More-- ip address 192.168.52.6/24
!
interface eth1
ip address 13.1.1.13/24
ip pim sparse-mode
!
interface eth2
ip address 10.1.1.13/24
ip pim sparse-mode
!
interface eth3
shutdown
!
interface eth4
shutdown
!
router ospf 100
network 10.1.1.0/24 area 0.0.0.0
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end
#sh ip igmp bgr
IGMP Connected Group Membership
Group Address Interface Uptime Expires State Last Reporter
224.1.1.1 eth1 16:58:51 00:03:39 Active 13.1.1.11
#
RTR-4
#show running-config
!
!Last configuration change at 13:57:34 EDT Mon May 27 2019 by ocnos
!
no service password-encryption
!
hostname RTR4
!
logging monitor 7
!
ip vrf management
!
ip domain-lookup
feature telnet
ssh login-attempts 0
ssh server port 20761744
no feature ssh
snmp-server enable snmp
snmp-server view all .1 included
feature ntp
ntp enable
username ocnos role network-admin password encrypted $1$ypBh3Wo/$4Fq/DbkFF/UWeA7YnTYMm1
feature rsyslog
!
ip multicast-routing
!
interface lo
ip address 127.0.0.1/8
ipv6 address ::1/128
mtu 65536
!
interface eth0
ip address 192.168.52.5/24
!
--More-- interface eth1
ip address 20.1.1.14/24
ip pim sparse-mode
!
interface eth2
ip address 12.1.1.14/24
ip pim sparse-mode
!
interface eth3
shutdown
!
router ospf 200
network 12.1.1.0/24 area 0.0.0.0
cspf disable-better-protection
!
line con 0
login
line vty 0 39
login
!
end