MSDP & its operation

MSDP & its operation

MSDP stands for Multicast Source Discovery Protocol. As the name suggest, it discovers multicast sources in other PIM domains. Hence, the group members do not have to be directly dependent on another domain's RP.

MSDP uses TCP port 639 for its peering connections. The peer with lowest IP address attempts to initiate the MSDP session- this becomes the active peer. When an RP in a PIM domain learns of a new sender (source) via a Register message sent by the PIM DR of the source, the RP creates (also an MSDP speaker) a Source-Active (SA) message and advertises to its MSDP peer.The SA message contains the following information-

1. The IP address of the multicast source

2. Group address the data source sends to

3. IP address of the RP

Each MSDP peer receives SA message and forwards the message away from the RP address in peer-RPF flooding fashion to its MSDP peers. The MSDP peer consults the BGP next-hop database to determine the next-hop toward the SA's originator. That next-hop neighbor is the RPF-peer for the originator, and the SA's received from the originator on any interface other than the interface to the RPF-peer are dropped.

When the MSDP peer/RP receives the new SA message, it determines if there are any other group members within the domain interested in any group described in the (S,G) entry within the SA message i.e. the RP checks for a (*,G) entry with a non-empty outgoing interface list (indicating a group member for that particular group). In this case, the RP creates a (S,G) entry rooted to the data-source present in other PIM domain. This sets up a branch to the source-tree to this domain. As multicast packets arrive at the RP, they are forwarded down its own shared-tree inside the domain. If the members' DR wish to join the source-tree, they have the option to do so according to standard PIM procedures.

To configure an MSDP peer on an RP, use

ip msdp peer <peer-ip-address> connect-source <source-interface> command from global configuration mode.

The SA messages are not cached by MSDP peers which do not have any interested members. To allow caching which can easily reduce join-latency, use

ip msdp cache-sa-state command.

By default, the RP advertises the SA messages once every 60 seconds. The MSDP peer times out the cache entry after 180 seconds if it does not hear any new SA messages.

To view cached SA entries, use show ip msdp sa-cache command.

MSDP Message Types-

There are 5 different types of MSDP messages sent across MSDP peers.

Type 1- SA TLV: The RP advertises the SA message to its MSDP peers when it receives a Register message from a DR. It is sent every 60 seconds.It contains the Data-source IP address, the Group address and the IP address of the RP. An SA message can contain multiple (S,G) entries.

Type 2- SA Request TLV: These TLVs are sent by MSDP speakers to request (S,G) information from MSDP peers which are caching SA states. Non-caching peers will return an error code.

To configure an MSDP speaker to request sa-cache, use ip msdp peer <peer-ip-address> sa-request command.

Type 3- SA Response TLV: This TLV is sent by a caching peer in response to a Type 2 TLV. It contains the data-source ip address, group address and the RP address for the requested (S,G).

Type 4- Keepalive TLV: The passive peer sends a Keepalive message (every 60 seconds) to the active peer if it has no MSDP message to send to keep the TCP session ON. The active peer maintains a Holdtime timer set to 75 seconds which resets every time an MSDP message is received. If the timer expires, the active peer terminates the TCP session.

Type 5- Notification TLV: Notification message is sent when an error is detected. Typical error types are- message-header error, SA request error, SA response error, Holdtime timer expired, FSM error, etc.

Further reading:

1) RFC 3618: Multicast Source Discovery Protocol http://www.faqs.org/ftp/rfc/pdf/rfc3618.txt.pdf