L3 · multicast · reviewed

MSDP

Multicast Source Discovery Protocol

Lets rendezvous points in separate domains tell each other which sources are active, so a receiver can join a source its own RP has never heard of.

Presenter modeEmbed this figure

OverviewRFC 3618 · EXPERIMENTAL · October 2003Peer-RPF Forwarding RulesRFC 3618 · EXPERIMENTAL · October 2003MSDP mesh-group semanticsRFC 3618 · EXPERIMENTAL · October 2003

Why it exists

A rendezvous point is scoped to a domain. That is deliberate — two organisations will not share one, and neither will two administrative regions of a large network. But it means a receiver’s RP has no way to learn about a source that registered somewhere else.

MSDP is a TCP session between rendezvous points that carries one fact: this source is active for this group. Once a receiver’s domain knows the source address, its own routers can build a tree straight to it. OverviewRFC 3618 · EXPERIMENTAL · October 2003

It also solved a second problem it was not designed for. Anycast RP — several routers sharing one RP address — needs those routers to share source state, and an MSDP mesh group between them is how that was done for years.

Telling another domain that a source exists

A source registers with its own RP. That RP announces it to a peer RP, whose receivers then join the source directly — the data never touches either RP.

Two domains, two rendezvous points. A receiver in B asks its own RP for a group, and its RP has never heard of the source in A. Nothing connects them. Source · 198.51.100.7. RP A · domain A. RP B · domain B: Knows nothing about 198.51.100.7. Last hop · domain B. Receiver.

Source · 198.51.100.7RP A · domain ARP B · domain BKnows: nothing about 198.51.100.7Last hop · domain BReceiverMSDP · TCP 639
  • Link
  • Blocking
  • Packet in flight
  • Discarded
  • Emphasis
Select a device to read its state. Arrow keys walk the topology.
Text equivalent of this diagram
Devices and links at this step
ElementKindState
Source · 198.51.100.7host
RP A · domain Arouter
RP B · domain BrouterKnows: nothing about 198.51.100.7
Last hop · domain Brouter
Receiverhost
Source · 198.51.100.7RP A · domain Alinkup
RP A · domain ARP B · domain Blinkup · MSDP · TCP 639
RP B · domain BLast hop · domain Blinkup
Last hop · domain BReceiverlinkup
1 / 6

Two domains, two rendezvous points. A receiver in B asks its own RP for a group, and its RP has never heard of the source in A. Nothing connects them.

This is a real boundary, not an artefact. An RP is a domain-scoped construct; two organisations, or two administrative regions of one, deliberately do not share one.

What changed

  • RP B · domain B: Knows → nothing about 198.51.100.7
  • Emphasis on RP B · domain B

How it works

An RP that learns of an active source sends a Source-Active message to its peers, naming the source, the group and itself as the originator. Peers cache it, so a receiver joining later does not have to wait for the next periodic announcement. CachingRFC 3618 · EXPERIMENTAL · October 2003

Loop prevention is peer-RPF: an SA is accepted only from the peer that lies on the unicast path back toward the RP that originated it. There is no other check, which is why getting the peering topology wrong produces silence rather than a loop. Peer-RPF Forwarding RulesRFC 3618 · EXPERIMENTAL · October 2003

A mesh group suspends that check between its members and stops SAs being forwarded between them, on the promise that the members are fully meshed and so cannot form a loop. That is what makes Anycast RP work, and it is a promise the configuration cannot verify. MSDP mesh-group semanticsRFC 3618 · EXPERIMENTAL · October 2003

The data itself does not travel over MSDP. The one exception is that an SA may encapsulate the first packets of a stream, so a receiver that joins at the wrong moment does not lose the beginning. Encapsulated Data PacketsRFC 3618 · EXPERIMENTAL · October 2003

On the wire

Constructed examples, encoded from the field table below them — not captured traffic.

The RP address is not documentation: every receiving peer compares the peer this arrived from against its own path back toward it, and discards the message if they differ. That check is why a healthy session can have an empty cache.

IPv4
Unicast between rendezvous points, sourced from a unique address rather than an anycast one. RFC 3618
TCP port 639
A session the peers keep open. Reliability comes from TCP, so MSDP itself carries no acknowledgement. RFC 3618
Source-Active TLV
Type, length, entry count, the originating RP, and one (S,G) entry per count. RFC 3618

Configure it

An anycast RP pair, and one filtered peering to another domain.

Cisco IOS-XE 17.12 · Catalyst 8500, ASR 1001-Xdraft

  1. interface Loopback0
     ip address 10.255.0.1 255.255.255.255
    interface Loopback1
     ip address 10.255.1.1 255.255.255.255

    Two loopbacks, and the separation is the point. Loopback0 is the shared anycast RP address; Loopback1 is unique to this router and is what MSDP peers from.

    Common mistake: Peering MSDP from the anycast address. Both routers own it, so each is effectively trying to connect to itself, and the session never establishes with nothing useful in the log.

  2. ip msdp peer 10.255.1.2 connect-source Loopback1
    ip msdp mesh-group ANYCAST 10.255.1.2

    The mesh group is not optional here. Both routers advertise the same RP address, so peer-RPF can never succeed between them; the mesh group suspends the check.

    RFC 3618 §10.2

  3. ip msdp originator-id Loopback1

    Stamps SA messages with this router’s unique address rather than the anycast one. Without it, both RPs originate SAs that appear to come from the same router.

    RFC 3618 §3

  4. ip msdp peer 203.0.113.9 connect-source Loopback1 remote-as 64500
    ip msdp sa-filter in 203.0.113.9 list SA-IN
    ip msdp sa-filter out 203.0.113.9 list SA-OUT

    Filter both directions on every external peering. Unfiltered, this imports every active source the far side knows and exports every one of yours.

    RFC 3618 §7

  5. ip msdp cache-sa-state
    ip msdp sa-limit 203.0.113.9 1000

    Caching makes a later join immediate rather than waiting for the next periodic SA. The limit is the backstop for the filter being wrong.

    RFC 3618 §4

Verify

show ip msdp peer
Session state and which address it is sourced from.
show ip msdp count
SA received against cache size — the pair that reveals peer-RPF.
show ip msdp sa-cache
Which sources arrived, and from which peer.
show ip pim rp mapping
That this router is the RP for the ranges intended.

Caveats

  • Source MSDP from a unique loopback, never the anycast address.
  • A mesh group suspends peer-RPF on the promise that members are fully meshed. Where that promise is false, SAs circulate.
  • An unfiltered peering imports the far side’s entire source list into the SA cache.

When it breaks

Symptom first, because that is what you have when it happens.

  1. The MSDP session is established, the SA received counter rises, and the SA cache stays empty.

    Narrow it down

    1. Compare the SA received count against the cache size — that pair is the whole diagnosis.
    2. Check the unicast path toward the RP that originates the SAs.
    3. Confirm whether the receiving peer is the next hop along that path.

    Cause

    Peer-RPF discarded them. The SAs arrived from a peer that is not on the path back toward the originating RP, and discarding them is correct behaviour, so nothing is logged.

    Fix

    Peer with the router that is on the path toward the originating RP, or put the peers in a mesh group — accepting that a mesh group suspends loop protection.

    Peer-RPF Forwarding RulesRFC 3618 · EXPERIMENTAL · October 2003
  2. An Anycast RP pair’s MSDP session never establishes, with no useful error.

    Narrow it down

    1. Check the source address configured for the MSDP session on each router.
    2. Confirm it is a unique loopback and not the shared anycast address.
    3. Look at whether the TCP connection is being made to the router itself.

    Cause

    The session was sourced from the anycast address, which both routers own. Each is effectively trying to peer with itself.

    Fix

    Give each RP a second, unique loopback and source MSDP from it. Keep the anycast address for PIM only.

  3. Inter-domain multicast works but takes up to a minute to start for every new receiver.

    Narrow it down

    1. Check whether SA caching is enabled on the receiving RP.
    2. Look at the SA advertisement interval on the originating side.
    3. Confirm the delay matches the advertisement period rather than a routing convergence.

    Cause

    Without a cache the receiving RP has to wait for the next periodic SA before it can tell a last-hop router which source to join.

    Fix

    Enable SA caching. The memory cost is bounded by an SA filter, which should be there anyway.

    CachingRFC 3618 · EXPERIMENTAL · October 2003
  4. The SA cache holds tens of thousands of entries and the RP’s control plane is under load.

    Narrow it down

    1. Count the cache entries and group them by originating RP.
    2. Check whether an inbound SA filter exists on each peering.
    3. Look for a mesh group whose members are not actually fully meshed.

    Cause

    Either no SA filter, so every source the far side knows is imported, or a mesh group with a broken promise, so SAs circulate among members that are not fully meshed.

    Fix

    Filter inbound and outbound on every peering, and verify that any mesh group really is a full mesh.

    SA Filtering and PolicyRFC 3618 · EXPERIMENTAL · October 2003
  5. An MSDP peering drops and re-establishes during periods of heavy multicast, and comes back cleanly each time.

    Narrow it down

    1. Check whether the hold timer is expiring rather than the TCP connection being reset.
    2. Look at the size of the SA messages being exchanged — the maximum is 9 192 octets.
    3. Check whether keepalives are being starved behind a large SA burst on the same connection.

    Cause

    MSDP runs over one TCP connection carrying both SA messages and keepalives. A burst of large SAs can delay a keepalive past the hold timer, and the session drops for a reason that is congestion rather than failure.

    Fix

    Filter the SA volume down so the bursts are smaller. Raising the hold timer treats the symptom and leaves a peering that takes longer to notice a genuine failure.

    Peer Hold TimerRFC 3618 · EXPERIMENTAL · October 2003

Design notes

Filter in both directions on every peering. An unfiltered MSDP session imports every active source the far side knows of, and exports every source you know of. The SA cache is where the consequences show up, and by then it is large. SA Filtering and PolicyRFC 3618 · EXPERIMENTAL · October 2003

Source the MSDP session from a unique loopback, never from the anycast RP address. Peering from the shared address is the most common Anycast RP mistake and it presents as a session that will not come up for no visible reason.

If Anycast RP is the only reason MSDP is being deployed, look at RFC 4610 first. It has the RP forward registers to its anycast peers inside PIM, achieving the same thing without a second protocol to configure, filter and monitor. MechanismRFC 4610 · PROPOSED STANDARD · August 2006

If the traffic is one-to-many, consider whether MSDP is needed at all. SSM has no RP, so it has no inter-domain RP problem — the receiver names the source and the join crosses the boundary by itself.

Misconceptions

Multicast traffic flows between domains over MSDP.
MSDP carries announcements. Once the receiving domain knows the source address, its own routers build a tree straight to the source and the data follows the shortest path — past both RPs, not through them. Only the encapsulated first packets in an SA are an exception. Encapsulated Data PacketsRFC 3618 · EXPERIMENTAL · October 2003
If SAs are being discarded the session must be down.
The session is up and healthy; peer-RPF is a per-message check applied after it. That is why the diagnosis is a rising receive counter beside an empty cache rather than anything in a log. Peer-RPF Forwarding RulesRFC 3618 · EXPERIMENTAL · October 2003
Anycast RP requires MSDP.
It requires the RPs to share source state, and MSDP was the original way to do it. RFC 4610 does the same inside PIM by forwarding registers between anycast peers, which removes a whole protocol from the design. MechanismRFC 4610 · PROPOSED STANDARD · August 2006
SSM needs MSDP to work across domains.
SSM has no RP, so there is no inter-RP problem to solve. The receiver already knows the source and the (S,G) join crosses the boundary on its own. MSDP configured for an SSM range does nothing.

More walkthroughs

Two rendezvous points sharing one addressdesign-choice

Anycast RP makes the RP redundant by making it ambiguous. A mesh group is what keeps the two halves in step.

Both routers own 10.255.0.1 on a loopback and advertise it into the IGP. Every router uses the nearest one, and none of them knows there are two. RP1 · 10.255.0.1: Loopback 10.255.0.1/32. RP2 · 10.255.0.1: Loopback 10.255.0.1/32. Source’s DR. Receiver’s DR.

RP1 · 10.255.0.1Loopback: 10.255.0.1/32RP2 · 10.255.0.1Loopback: 10.255.0.1/32Source’s DRReceiver’s DRMSDP mesh group
  • Link
  • Blocking
  • Packet in flight
  • Discarded
  • Emphasis
Select a device to read its state. Arrow keys walk the topology.
Text equivalent of this diagram
Devices and links at this step
ElementKindState
RP1 · 10.255.0.1routerLoopback: 10.255.0.1/32
RP2 · 10.255.0.1routerLoopback: 10.255.0.1/32
Source’s DRrouter
Receiver’s DRrouter
RP1 · 10.255.0.1RP2 · 10.255.0.1linkup · MSDP mesh group
RP1 · 10.255.0.1Source’s DRlinkup
RP2 · 10.255.0.1Receiver’s DRlinkup
1 / 6

Both routers own 10.255.0.1 on a loopback and advertise it into the IGP. Every router uses the nearest one, and none of them knows there are two.

What changed

  • RP1 · 10.255.0.1: Loopback → 10.255.0.1/32
  • RP2 · 10.255.0.1: Loopback → 10.255.0.1/32
  • Emphasis on RP1 · 10.255.0.1
  • Emphasis on RP2 · 10.255.0.1

The session is up and the cache is emptyfailure

Peer-RPF discards Source-Active messages that arrive from the wrong peer. Nothing errors, and the SA counters increment.

The MSDP session to RP A is established, SA messages are being received, and `show ip msdp sa-cache` is empty. Receivers in domain B get nothing. RP A · originator. RP X · transit. RP B · receiving: Session Established, SA cache 0 entries.

RP A · originatorRP X · transitRP B · receivingReceived and discardedSession: EstablishedSA cache: 0 entriesMSDP
  • Link
  • Blocking
  • Packet in flight
  • Discarded
  • Emphasis
Select a device to read its state. Arrow keys walk the topology.
Text equivalent of this diagram
Devices and links at this step
ElementKindState
RP A · originatorrouter
RP X · transitrouter
RP B · receivingrouterSession: Established · SA cache: 0 entries
RP A · originatorRP X · transitlinkup
RP X · transitRP B · receivinglinkup
RP A · originatorRP B · receivinglinkup · MSDP
1 / 5

The MSDP session to RP A is established, SA messages are being received, and `show ip msdp sa-cache` is empty. Receivers in domain B get nothing.

What changed

  • RP B · receiving: Session → Established
  • RP B · receiving: SA cache → 0 entries
  • Emphasis: Received and discarded

Terms

Source-Active message
The MSDP announcement that a source is active for a group. It names the source, the group and the RP that originated it — the last of those so receiving peers can run the peer-RPF check.
Peer-RPF
MSDP’s only loop protection: an SA is accepted solely from the peer on the unicast path back toward the RP that originated it. A failure is silent — the session stays up and the cache stays empty.
MSDP mesh group
A set of peers that do not forward SAs to each other and skip the peer-RPF check between themselves. It trades loop protection for a promise of a full mesh, and it is what makes Anycast RP work.

Check yourself

  • What does an MSDP Source-Active message carry?
  • The MSDP session is established, SAs are arriving, and the cache is empty. Why?
  • What does putting MSDP peers in a mesh group do?
  • Inter-domain multicast works but every new receiver waits up to a minute. What is missing?
  • How much MSDP does an SSM deployment need?
  • Why does one Source-Active message carry an entry count rather than one source?
  • An SA message carries an encapsulated data packet. What is it for?
  • Why does MSDP define no acknowledgement of its own?