RFC 3618

Multicast Source Discovery Protocol (MSDP)

πŸ“… published October 2003, from ietf

RFC 3618 πŸ¦‹ Multicast Source Discovery Protocol (MSDP)

Okay bestie πŸ’– so this is RFC 3618, the Multicast Source Discovery Protocol, aka MSDP ✨. B. Fenner and D. Meyer are the editors (the "Ed." bits πŸ™ˆ) and it's from the Network Working Group, dated October 2003. It's in the Experimental category πŸ§ͺ, which means it is NOT an Internet standard. The header doesn't list anything it obsoletes or updates, so it's standing all on its own πŸ’…


Status of this Memo πŸ“Œ

This memo defines an Experimental Protocol for the Internet community, so it doesn't specify an Internet standard of any kind. The authors are asking for discussion and suggestions for improvement 🫢 and distribution of this memo is unlimited 🌈

Copyright (C) The Internet Society (2003). All Rights Reserved. πŸ’œ

Abstract πŸŽ€

MSDP is a mechanism that connects multiple IP Version 4 Protocol Independent Multicast Sparse-Mode (PIM-SM) domains together πŸ”— Each PIM-SM domain has its own independent Rendezvous Point (RP) and doesn't have to depend on RPs in other domains. This document reflects existing MSDP implementations, so it's documenting what's already out there 🧚

Table of Contents πŸ“œ

1.  Introduction. . . . . . . . . . . . . . . . . . . . . . . . .   2
2.  Overview. . . . . . . . . . . . . . . . . . . . . . . . . . .   3
3.  Procedure . . . . . . . . . . . . . . . . . . . . . . . . . .   3
4.  Caching . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
5.  Timers. . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
    5.1. SA-Advertisement-Timer . . . . . . . . . . . . . . . . .   5
    5.2. SA-Advertisement-Timer Processing. . . . . . . . . . . .   5
    5.3. SA Cache Timeout (SA-State Timer). . . . . . . . . . . .   5
    5.4. Peer Hold Timer. . . . . . . . . . . . . . . . . . . . .   5
    5.5. KeepAlive Timer. . . . . . . . . . . . . . . . . . . . .   6
    5.6. ConnectRetry Timer . . . . . . . . . . . . . . . . . . .   6
6.  Intermediate MSDP Peers . . . . . . . . . . . . . . . . . . .   6
7.  SA Filtering and Policy . . . . . . . . . . . . . . . . . . .   6
8.  Encapsulated Data Packets . . . . . . . . . . . . . . . . . .   7
9.  Other Scenarios . . . . . . . . . . . . . . . . . . . . . . .   7
10. MSDP Peer-RPF Forwarding. . . . . . . . . . . . . . . . . . .   7
    10.1. Definitions . . . . . . . . . . . . . . . . . . . . . .   7
          10.1.1. Multicast RPF Routing Information Base. . . . .   8
          10.1.2. Peer-RPF Route. . . . . . . . . . . . . . . . .   8
          10.1.3. Peer-RPF Forwarding Rules . . . . . . . . . . .   8
    10.2. MSDP mesh-group semantics . . . . . . . . . . . . . . .   9
11. MSDP Connection State Machine . . . . . . . . . . . . . . . .   9
    11.1. Events. . . . . . . . . . . . . . . . . . . . . . . . .  10
    11.2. Actions . . . . . . . . . . . . . . . . . . . . . . . .  10
    11.3. Peer-specific Events. . . . . . . . . . . . . . . . . .  11
    11.4. Peer-independent Events . . . . . . . . . . . . . . . .  11
12. Packet Formats. . . . . . . . . . . . . . . . . . . . . . . .  12
    12.1. MSDP TLV format . . . . . . . . . . . . . . . . . . . .  12
    12.2. Defined TLVs. . . . . . . . . . . . . . . . . . . . . .  12
          12.2.1. IPv4 Source-Active TLV. . . . . . . . . . . . .  13
          12.2.2. KeepAlive TLV . . . . . . . . . . . . . . . . .  14
13. MSDP Error Handling . . . . . . . . . . . . . . . . . . . . .  15
14. SA Data Encapsulation . . . . . . . . . . . . . . . . . . . .  15
15. Applicability Statement . . . . . . . . . . . . . . . . . . .  15
    15.1. Between PIM Domains . . . . . . . . . . . . . . . . . .  15
    15.2. Between Anycast-RPs . . . . . . . . . . . . . . . . . .  15
16. Intellectual Property . . . . . . . . . . . . . . . . . . . .  15
17. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  16
18. Security Considerations . . . . . . . . . . . . . . . . . . .  16
19. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  17
    19.1. Allocated TLV Range . . . . . . . . . . . . . . . . . .  17
    19.2. Experimental TLV Range. . . . . . . . . . . . . . . . .  17
20. References. . . . . . . . . . . . . . . . . . . . . . . . . .  17
    20.1. Normative References. . . . . . . . . . . . . . . . . .  17
    20.2. Informative References. . . . . . . . . . . . . . . . .  18
21. Editors' Addresses. . . . . . . . . . . . . . . . . . . . . .  18
22. Full Copyright Statement. . . . . . . . . . . . . . . . . . .  19

1. Introduction 🌸

MSDP describes a mechanism to connect multiple PIM Sparse-Mode (PIM-SM) [RFC2362] domains together πŸ”— Each PIM-SM domain uses its own independent RP(s) and doesn't have to depend on RPs in other domains. The perks of this approach include:

  • No Third-party resource dependencies on a domain's RP PIM-SM domains can rely on their own RPs only. πŸ‘‘
  • Receiver only Domains Domains with only receivers get data without globally advertising group membership. πŸ™ˆ

Note that MSDP may be used with protocols other than PIM-SM, but that usage is not specified in this memo.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] πŸ“–

2. Overview 🧚

MSDP-speaking routers in a PIM-SM domain have an MSDP peering relationship with MSDP peers in another domain 🀝 The peering relationship is a TCP connection where control information gets exchanged. Each domain has one or more connections to this virtual topology.

The whole point of this topology is to let domains discover multicast sources from other domains πŸ‘€ If the multicast sources are of interest to a domain with receivers, the normal source-tree building mechanism in PIM-SM will be used to deliver multicast data over an inter-domain distribution tree 🌈

3. Procedure ✨

When an RP in a PIM-SM domain first learns of a new sender, e.g., via PIM register messages, it builds a "Source-Active" (SA) message and sends it to its MSDP peers πŸ“¨ All RPs that intend to originate or receive SA messages must establish MSDP peering with other RPs, either directly or via an intermediate MSDP peer. The SA message contains the following fields:

  • Source address of the data source.
  • Group address the data source sends to.
  • IP address of the RP.

Note that an RP that isn't a DR on a shared network SHOULD NOT originate SA's for directly connected sources on that shared network. It should only originate in response to receiving Register messages from the DR πŸ™…β€β™€οΈ

Each MSDP peer receives and forwards the message away from the RP address in a "peer-RPF flooding" fashion 🌊 The notion of peer-RPF flooding is about forwarding SA messages. The Multicast RPF Routing Information Base (MRIB) is examined to figure out which peer toward the originating RP of the SA message gets selected. That peer is called an "RPF peer". See section 13 for the details of peer-RPF forwarding πŸ’…

If the MSDP peer receives the SA from a non-RPF peer toward the originating RP, it drops the message πŸ—‘οΈ Otherwise, it forwards the message to all its MSDP peers (except the one it got the SA message from).

When an MSDP peer that is also an RP for its own domain receives a new SA message, it checks whether there are any group members in the domain interested in any group described by a (Source, Group), or (S,G) entry within the SA message πŸ” That is, the RP checks for a (*,G) entry with a non-empty outgoing interface list. That implies some system in the domain is interested in the group 🫢 In this case, the RP triggers a (S,G) join event toward the data source, as if a Join/Prune message had been received addressed to the RP itself. This sets up a branch of the source-tree to this domain 🌳 Subsequent data packets arrive at the RP via this tree branch and get forwarded down the shared-tree inside the domain. If leaf routers choose to join the source-tree, they have the option to do so according to existing PIM-SM conventions. Finally, if an RP in a domain receives a PIM Join message for a new group G, the RP SHOULD trigger a (S,G) join event for each active (S,G) for that group in its SA cache πŸ’–

This procedure has been affectionately named flood-and-join πŸ¦‹ because if an RP isn't interested in the group, it can ignore the SA message. Otherwise, it joins a distribution tree. Iconic behaviour, honestly πŸ‘‘

4. Caching πŸ“¦

An MSDP speaker MUST cache SA messages 🧠 Caching allows pacing of MSDP messages, and it also reduces join latency for new receivers of a group G at an originating RP that already has existing MSDP (S,G) state. On top of that, caching greatly helps with diagnosing and debugging all sorts of problems πŸ”§

An MSDP speaker must provide a mechanism to reduce the forwarding of new SA's πŸ›‘ The SA-cache is what reduces storms. It does this by not forwarding SA's unless they're already in the cache, or they're new SA packets the MSDP speaker will cache for the first time. The SA-cache also reduces storms by advertising from the cache at a rate of no more than twice per SA-Advertisement-Timer interval and no less than 1 time per SA Advertisement period ⏱️

5. Timers ⏰

The main timers for MSDP are: SA-Advertisement-Timer, SA Cache Entry timer, Peer Hold Timer, KeepAlive timer, and ConnectRetry timer. Each one gets its own look below πŸŽ€

5.1. SA-Advertisement-Timer πŸ“£

RPs that originate SA messages do so periodically, as long as the source is sending data 🎢 There is one SA-Advertisement-Timer covering the sources an RP may advertise. [SA-Advertisement-Period] MUST be 60 seconds ⏳ An RP MUST not send more than one periodic SA message for a given (S,G) within an SA Advertisement interval. Originating periodic SA messages is required to keep announcements alive in caches 🌸 Finally, an originating RP SHOULD trigger the transmission of an SA message as soon as it receives data from an internal source for the first time πŸš€ This initial SA message may be in addition to the periodic sa-message forwarded in that first 60 seconds for that (S,G).

5.2. SA-Advertisement-Timer Processing πŸ”„

An RP MUST spread the generation of periodic SA messages (i.e., messages advertising the active sources for which it is the RP) over its reporting interval (i.e., SA-Advertisement-Period) 🫧 An RP starts the SA-Advertisement-Timer when the MSDP process is configured. When the timer expires, the RP resets the timer to [SA-Advertisement-Period] seconds and begins advertising its active sources. Active sources are advertised like this: an RP packs its active sources into an SA message until the largest MSDP packet that can be sent is built or there are no more sources, and then it sends the message πŸ“¦ This process repeats periodically within the SA-Advertisement-Period, in such a way that all of the RP's sources are advertised. Note that since MSDP is a periodic protocol, an implementation SHOULD send all cached SA messages when a connection is established πŸ’œ Finally, the timer is deleted when the MSDP process is de-configured πŸ—‘οΈ

5.3. SA Cache Timeout (SA-State Timer) πŸ’…

Each entry in an SA Cache has an associated SA-State Timer πŸ•°οΈ An (S,G)-SA-State-Timer starts when an (S,G)-SA message is first received by an MSDP peer. The timer gets reset to [SG-State-Period] if another (S,G)-SA message is received before the (S,G)-SA-State Timer expires. [SG-State-Period] MUST NOT be less than [SA-Advertisement-Period] + [SA-Hold-Down-Period] πŸ™Œ

5.4. Peer Hold Timer

okay so the Hold Timer gets set to [HoldTime-Period] the second the peer's transport connection is established 🧚, and then it resets back to [HoldTime-Period] every time any MSDP message comes in πŸ’…. When the transport connection closes, the timer gets deleted 🫢. [HoldTime-Period] MUST be at least three seconds, and the recommended value is 75 seconds ✨.

5.5. KeepAlive Timer

once an MSDP transport connection is up, each side sends a KeepAlive message and starts a KeepAlive timer πŸ’–. if that timer runs out, the local system sends a KeepAlive message and restarts its timer πŸ”.

the timer gets set to [KeepAlive-Period] when the peer comes up 🌸. it resets to [KeepAlive-Period] each time an MSDP message is sent to the peer, and it also resets when it expires.

when the peer's transport connection closes, the KeepAlive timer gets deleted too πŸ¦‹.

[KeepAlive-Period] MUST be less than [HoldTime-Period], and MUST be at least one second. the recommended value is 60 seconds πŸŽ€.

5.6. ConnectRetry Timer

the ConnectRetry timer is used by the MSDP peer with the lower IP address to go from INACTIVE to CONNECTING 🌈. there's one timer per peer, and [ConnectRetry-Period] SHOULD be set to 30 seconds. it gets initialized to [ConnectRetry-Period] when an MSDP speaker tries to actively open a TCP connection to its peer (see section 15, event E2, action A2). when the timer expires, the peer retries the connection and the timer resets to [ConnectRetry-Period]. it gets deleted if the connection moves into ESTABLISHED state, or if the peer is de-configured 🫠.


6. Intermediate MSDP Peers

intermediate MSDP speakers don't originate periodic SA messages on behalf of sources in other domains πŸ™…β€β™€οΈ. generally, an RP MUST only originate an SA for a source that would register to it, and only RPs may originate SA messages. intermediate MSDP speakers MAY forward SA messages they receive from other domains πŸ”.

7. SA Filtering and Policy

as the number of (S,G) pairs grows across the Internet, an RP may want to filter which sources it describes in SA messages πŸ“‰. filtering can also be used as a matter of policy, which at the same time can reduce state. MSDP peers in transit domains should not filter SA messages, or the flood-and-join model can't guarantee that sources will be known throughout the Internet (so SA filtering by transit domains may cause undesired lack of connectivity πŸ’€). in general, policy should be expressed using MBGP [RFC2858]. that makes MSDP messages flow in the desired direction, and peer-RPF fails otherwise 🧭.

there's an exception at an administrative scope [RFC2365] boundary. in particular, an SA message for a (S,G) MUST NOT be sent to peers that are on the other side of an administrative scope boundary for G 🚧.

8. Encapsulated Data Packets

the RP MAY encapsulate multicast data from the source 🎁. an interested RP may decapsulate the packet, which SHOULD be forwarded as if a PIM register encapsulated packet was received. so if packets are already arriving over the interface toward the source, the packet gets dropped. otherwise, if the outgoing interface list is non-null, the packet is forwarded appropriately. also, when doing data encapsulation, an implementation MUST bound the time during which packets are encapsulated ⏱️.

this lets small bursts get through before the multicast tree is built back toward the source's domain 🌊. for example, an implementation SHOULD encapsulate at least the first packet so it can serve bursty sources πŸ’₯.

9. Other Scenarios

MSDP isn't limited to deployments across different routing domains 🌍. it can also be used within a routing domain when you want to deploy multiple RPs for the same group ranges, like with Anycast RP's πŸ‘―. as long as all RPs have a interconnected MSDP topology, each one can learn about active sources as well as RPs in other domains ✨.

10. MSDP Peer-RPF Forwarding

the MSDP Peer-RPF Forwarding rules are used for forwarding SA messages throughout an MSDP enabled internet πŸ—ΊοΈ. the regular RPF check used for data packets generally compares the packet's source address against the interface it arrived on. the Peer-RPF check is different: it compares the RP address carried in the SA message against the MSDP peer the message was received from 🫢.

10.1. Definitions

the following definitions are used in the description of the Peer-RPF Forwarding Rules πŸ“š:

10.1.1. Multicast RPF Routing Information Base

the Multicast RPF Routing Information Base (MRIB) is the multicast topology table πŸ—‚οΈ. it's typically derived from the unicast routing table, or from other routing protocols such as multi-protocol BGP [RFC2858].

10.1.2. Peer-RPF Route

the Peer-RPF route is the route the MRIB chooses for a given address πŸ›£οΈ. the Peer-RPF route for a SA's originating RP is used to select the peer from which the SA is accepted.

10.1.3. Peer-RPF Forwarding Rules

an SA message originated by R and received by X from N is accepted if N is the peer-RPF neighbor for X, and is discarded otherwise πŸ—‘οΈ.

        MPP(R,N)                 MP(N,X)
R ---------....-------> N ------------------> X
        SA(S,G,R)                SA(S,G,R)

MP(N,X) is an MSDP peering between N and X. MPP(R,N) is an MSDP peering path (zero or more MSDP peers) between R and N, e.g., MPP(R,N) = MP(R, A) + MP(A, B) + MP(B, N). SA(S,G,R) is an SA message for source S on group G originated by an RP R.

the peer-RPF neighbor N is chosen deterministically, using the first of the following rules that matches. in particular, N is the RPF neighbor of X with respect to R if one of these is true:

(i).    N == R (X has an MSDP peering with R).

(ii).   N is the eBGP NEXT_HOP of the Peer-RPF route for R.

(iii).  The Peer-RPF route for R is learned through a distance-vector
        or path-vector routing protocol (e.g., BGP, RIP, DVMRP) and N
        is the neighbor that advertised the Peer-RPF route for R
        (e.g., N is the iBGP advertiser of the route for R), or N is
        the IGP next hop for R if the route for R is learned via a
        link-state protocol (e.g., OSPF [RFC2328] or IS-IS
        [RFC1142]).

(iv).   N resides in the closest AS in the best path towards R.  If
        multiple MSDP peers reside in the closest AS, the peer with
        the highest IP address is the rpf-peer.

(v).    N is configured as the static RPF-peer for R.

MSDP peers which are not in state ESTABLISHED (i.e., down peers) are not eligible for peer RPF consideration πŸ™…β€β™€οΈ.

10.2. MSDP mesh-group semantics

an MSDP mesh-group is an operational mechanism for reducing SA flooding, typically in an intra-domain setting πŸ•ΈοΈ. in particular, when some subset of a domain's MSDP speakers are fully meshed, they can be configured into a mesh-group.

note that mesh-groups assume a member doesn't have to forward an SA to other members of the mesh-group, because the originator will forward to all members 🫢. so that the originator can forward to all members (and so each member can also be a potential originator), the mesh-group must be a full mesh of MSDP peering among all members.

the semantics of the mesh-group go like this:

(i).    If a member R of a mesh-group M receives a SA message from an
        MSDP peer that is also a member of mesh-group M, R accepts
        the SA message and forwards it to all of its peers that are
        not part of mesh-group M.  R MUST NOT forward the SA message
        to other members of mesh-group M.

(ii).   If a member R of a mesh-group M receives an SA message from
        an MSDP peer that is not a member of mesh-group M, and the SA
        message passes the peer-RPF check, then R forwards the SA
        message to all members of mesh-group M and to any other msdp
        peers.

11. MSDP Connection State Machine

MSDP uses TCP as its transport protocol πŸ”Œ. in a peering relationship, one MSDP peer listens for new TCP connections on the well-known port 639, and the other side makes an active connect to this port. the peer with the higher IP address will listen. this connection establishment algorithm avoids call collision, so there's no need for a call collision procedure πŸ™Œ. BUT (and it's a big but 😭) the downside is that startup time depends completely on the active side and its connect retry timer, since the passive side can't cause the connection to be established.

an MSDP peer starts in the DISABLED state. MSDP peers establish peering sessions according to the following state machine 🧩:

           --------------->+----------+
          /                | DISABLED |<----------
         |          ------>+----------+           \
         |         /            |E1->A1            |
         |        |             |                  |
         |        |             V                  |E7->A7
         |        |        +----------+ E3->A3 +--------+
         |        |        | INACTIVE |------->| LISTEN |
         |        |        +----------+        +--------+
         |        |     E2->A2|    ^               |E5->A5
         |        |           |    |               |
         |        |E7->A6     V    |E6             |
         |         \      +------------+           |
         |          ------| CONNECTING |           |
         |                +------------+           |
E7->A8   |                      |E4->A4            |
E8->A8   |                      |                  |
E9->A8   |                      V                  |
         \               +-------------+          /
           --------------| ESTABLISHED |<---------
                         +-------------+
                            |       ^
                            |       |
                    E10->A9 \______/

11.1. Events

E1) Enable MSDP peering with P
E2) Own IP address < P's IP address
E3) Own IP address > P's IP address
E4) TCP established (active side)
E5) TCP established (passive side)
E6) ConnectRetry timer expired
E7) Disable MSDP peering with P (e.g., when one's own address is
    changed)
E8) Hold Timer expired
E9) MSDP TLV format error detected
E10) Any other error detected

11.2. Actions

A1) Allocate resources for peering with P Compare one's own and
    peer's IP addresses
A2) TCP active OPEN Set ConnectRetry timer to
    [ConnectRetry-Period]
A3) TCP passive OPEN (listen)
A4) Delete ConnectRetry timer Send KeepAlive TLV
    Set KeepAlive timer to [KeepAlive-Period]
    Set Hold Timer to [HoldTime-Period]
A5) Send KeepAlive TLV
    Set KeepAlive timer to [KeepAlive-Period]
    Set Hold Timer to [HoldTime-Period]
A6) Abort TCP active OPEN attempt
    Release resources allocated for peering with P
A7) Abort TCP passive OPEN attempt
    Release resources allocated for peering with P
A8) Close the TCP connection
    Release resources allocated for peering with P
A9) Drop the packet

11.3. Peer-specific Events πŸ’Œ

Okay so these are the peer-specific events that can pop up while the session is chilling in the ESTABLISHED state. They do not cause a state transition, so no drama 🧚 Each one has its own actions:

  • KeepAlive timer expired:
    • Send KeepAlive TLV
    • Set KeepAlive timer to [KeepAlive-Period]
  • KeepAlive TLV received:
    • Set Hold Timer to [HoldTime-Period]
  • Source-Active TLV received:
    • Set Hold Timer to [HoldTime-Period]
    • Run Peer-RPF Forwarding algorithm
    • Set KeepAlive timer to [KeepAlive-Period] for those peers the Source-Active TLV is forwarded to
    • Send information to PIM-SM
    • Store information in cache

11.4. Peer-independent Events ✨

Some events hit more than one peering session but still need per-peer actions. Lowkey tricky, but iykyk πŸ’…

  • SA-Advertisement-Timer expired:
    • Start periodic transmission of Source-Active TLV(s)
    • Set KeepAlive timer to [KeepAlive-Period] each time a Source-Active TLV is sent
  • MSDP learns of a new active internal source (e.g., PIM-SM register received for a new source):
    • Send Source-Active TLV
    • Set KeepAlive timer to [KeepAlive-Period]
  • SG-State-Timer expired (one timer per cache entry):
    • Implementation specific, typically mark the cache entry for deletion

12. Packet Formats πŸŽ€

MSDP messages are encoded in TLV format. If an implementation receives a TLV whose length is bigger than the maximum TLV length listed below, the TLV SHOULD be accepted. Any extra data, including possible next TLVs in the same message, SHOULD be ignored, and the MSDP session should not be reset 🫢

12.1. MSDP TLV format

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type       |           Length              |  Value ....   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type (8 bits): this one describes the format of the Value field πŸ”

Length (16 bits): the length of the Type, Length, and Value fields in octets. The minimum length required is 4 octets, except for Keepalive messages. The maximum TLV length is 9192.

Value (variable length): the format depends on the Type value, so see below. The length of the Value field is the Length field minus 3. All reserved fields in the Value field MUST be transmitted as zeros and ignored on receipt. No cap, this is important πŸ™ˆ

12.2. Defined TLVs

The following TLV Types are defined:

Code                        Type
===================================================
  1                  IPv4 Source-Active
  2                  IPv4 Source-Active Request
  3                  IPv4 Source-Active Response
  4                  KeepAlive
  5                  Reserved (Previously: Notification)

Each TLV is described below πŸ’–

In addition, the following TLV Types are assigned but not described in this memo:

Code                        Type
====================================================
  6                  MSDP traceroute in progress
  7                  MSDP traceroute reply

12.2.1. IPv4 Source-Active TLV

The biggest SA message you can send is 9192 octets. That 9192 octet size does not count the TCP, IP, or layer-2 headers πŸ¦‹

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       1       |           x + y               |  Entry Count  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          RP Address                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Reserved            |  Sprefix Len  | \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  \
|                         Group Address                         |   ) z
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  /
|                         Source Address                        | /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type: the IPv4 Source-Active TLV is type 1.

Length x: the length of the control information in the message. x is 8 octets (for the first two 32-bit quantities) plus 12 times the Entry Count, in octets.

Length y: if this is 0, then there is no data encapsulated. Otherwise an IPv4 packet follows, and y is the value of the total length field in the header of the encapsulated IP packet. If there are multiple (S,G) entries in an SA message, only the last entry may have encapsulated data, and it must reflect the source and destination addresses in the header of the encapsulated IP packet πŸ‘‘

Entry Count: the count of z entries (see the diagram above) that follow the RP address field. This is so multiple (S,G)s from the same domain can be encoded efficiently for the same RP address. An SA message containing encapsulated data typically has an entry count of 1 (i.e., it only contains a single entry, for the (S,G) representing the encapsulated packet).

RP Address: the address of the RP in the domain the source has become active in.

Reserved: the Reserved field MUST be transmitted as zeros and MUST be ignored by a receiver.

Sprefix Len: the route prefix length associated with the source address. This field MUST be transmitted as 32 (/32).

Group Address: the group address the active source has sent data to.

Source Address: the IP address of the active source.

Multiple (S,G) entries MAY appear in the same SA and can be batched for efficiency at the expense of data latency. This would typically happen on intermediate forwarding of SA messages 🌈

12.2.2. KeepAlive TLV

A KeepAlive TLV is sent to an MSDP peer if and only if there were no MSDP messages sent to the peer within [KeepAlive-Period] seconds. This message is necessary to keep the MSDP connection alive πŸ’œ

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       4       |             3                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The length of the message is 3 octets, which covers the one octet Type field and the two octet Length field.

13. MSDP Error Handling πŸ™ˆ

If an MSDP message arrives with a TLV format error, the session SHOULD be reset with that peer. MSDP messages with other errors, such as an unrecognized type code, received from MSDP peers SHOULD be silently discarded, and the session SHOULD not be reset. Not the drama, just clean handling ✨

14. SA Data Encapsulation πŸ“

As discussed earlier, TCP encapsulation of data in SA messages MAY be supported for backwards compatibility with legacy MSDP peers 🧚

15. Applicability Statement 🌸

MSDP is used mainly in two deployment scenarios:

15.1. Between PIM Domains

MSDP can be used between PIM domains to share information about active sources available in other domains. MSDP peering in this case is generally one to one, and it uses the deterministic peer-RPF rules described in this spec (i.e., it does not use mesh-groups). Peerings can be aggregated on a single MSDP peer, typically from one to hundreds of peerings. That's similar in scale to BGP peerings, although not necessarily consistent with them πŸ’…

15.2. Between Anycast-RPs

MSDP is also used between Anycast-RPs [RFC3446] within a PIM domain to keep the information about active sources being served by each Anycast-RP peer in sync (by virtue of IGP reachability). MSDP peering here is typically based on MSDP mesh groups, where anywhere from two to tens of peers can make up a given mesh group, although more than ten is not typical. One or more of these mesh-group peers may also have additional one-to-one peering with msdp peers outside that PIM domain, as described in scenario A, for discovery of external sources. MSDP for anycast-RP without external MSDP peering is a valid deployment option and very common πŸ¦‹

16. Intellectual Property ⭐

The IETF takes no position on whether any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document are valid or in scope, or whether any license under those rights might or might not be available. It also doesn't say it has tried to find any such rights. Info on the IETF's procedures for rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication, and any assurances of licenses to be made available, or the result of an attempt to get a general license or permission to use such proprietary rights by implementers or users of this specification, can be obtained from the IETF Secretariat.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please send that info to the IETF Executive Director πŸŽ€

17. Acknowledgments 🫢

The editors want to thank the original authors, Dino Farinacci, Yakov Rehkter, Peter Lothberg, Hank Kilmer, and Jermey Hall, for their original contribution to the MSDP specification. Bill Nickless, John Meylor, Liming Wei, Manoj Leelanivas, Mark Turner, John Zwiebel, Cristina Radulescu-Banu, Brian Edwards, Selina Priestley, IJsbrand Wijnands, Tom Pusateri, Kristofer Warell, Henning Eriksson, Thomas Eriksson, Dave Thaler, and Ravi Shekhar gave useful and productive design feedback and comments. Toerless Eckert, Leonard Giuliano, Mike McBride, David Meyer, John Meylor, Pekka Savola, Ishan Wu, and Swapna Yelamanchi contributed to the final version of the document πŸ‘‘

18. Security Considerations πŸ’€

An MSDP implementation MUST implement Keyed MD5 [RFC2385] to secure control messages, and MUST be capable of interoperating with peers that do not support it. However, if one side of the connection is configured with Keyed MD5 and the other side is not, the connection SHOULD NOT be established. Big red flag, bestie 🚩

In addition, to mitigate state explosion during denial of service and other attacks, SA filters and limits SHOULD be used with MSDP to limit the sources and groups that will be passed between RPs [DEPLOY]. These filtering and limiting functions may include, for example, access lists of source or group addresses which should not be propagated to other domains using MSDP, the absolute highest acceptable number of SA-state entries, or a rate-limit for the creation of new SA-state entries after the connection has been established. Protect your state table like it's your main character era πŸ”₯

If follow-on work is done in this area, a more robust integrity mechanism, such as HMAC-SHA1 [RFC2104, RFC2202], ought to be employed 🌈

19. IANA Considerations 🧚

This document creates a new namespace called "MSDP TLV Values" that the IANA will manage. The initial seven MSDP TLV values are specified in Section 12.2. The following two sections describe the rules for allocating new MSDP TLV values πŸ“

19.1. IANA Allocated TLV Range

MSDP TLV values in the range [8,200] (inclusive) are to be allocated using an IESG Approval or Standards Action process [RFC2434].

19.2. Experimental TLV Range

TLV values in the range [201,255] (inclusive) are allocated for experimental use πŸ¦‹

20. References ✨

20.1. Normative References

okay so these are the normative refs, aka the docs this spec depends on. you can't really build this thing without reading them first 🫢

[RFC1142]       Oran, D., Ed., "OSI IS-IS Intra-domain Routing
                Protocol", RFC 1142, February 1990.

[RFC2119]       Bradner, S., "Key words for use in RFCs to Indicate
                Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2328]       Moy, J., "OSPF Version 2", STD 54, RFC 2328, April
                1998.

[RFC2858]       Bates, T., Rekhter, Y., Chandra, R. and D. Katz,
                "Multiprotocol Extensions for BGP-4", RFC 2858, June
                2000.

[RFC2362]       Estrin, D., Farinacci, D., Helmy, A., Thaler, D.,
                Deering, S., Handley, M., Jacobson, V., Lin, C.,
                Sharma, P. and L. Wei, "Protocol Independent
                Multicast - Sparse Mode (PIM-SM):  Protocol
                Specification", RFC 2362, June 1998.

[RFC2365]       Meyer, D., "Administratively Scoped IP Multicast",
                BCP 23, RFC 2365, July 1998.

[RFC2385]       Heffernan, A., "Protection of BGP Sessions via the
                TCP MD5 Signature Option", RFC 2385, August 1998.

[RFC2434]       Narten, T. and H. Alvestrand, "Guidelines for Writing
                an IANA Considerations Section in RFCs", BCP 26, RFC
                2434, October 1998.

[RFC3446]       Kim, D., Meyer, D., Kilmer, H. and D. Farinacci,
                "Anycast Rendezvous Point (RP) Mechanism using
                Protocol Independent Multicast (PIM) and Multicast
                Source Discovery Protocol (MSDP)", RFC 3446, January
                2003.

20.2. Informative References

these ones are the extra reading. good to know about, not required to build the thing πŸ“šπŸŒΈ

[DEPLOY]        McBride, M., Meylor, J. and D. Meyer, "Multicast
                Source Discovery Protocol (MSDP) Deployment
                Scenarios", Work in Progress, July 2003.

[RFC2104]       Krawczyk, H., Bellare, M. and R.  Canetti, "HMAC:
                Keyed-Hashing for Message Authentication", RFC 2104,
                February 1997.

[RFC2202]       Cheng, P. and R. Glenn, "Test Cases for HMAC-MD5 and
                HMAC-SHA-1", RFC 2202, September 1997.

21. Editors' Addresses πŸŽ€

the people who wrangled this doc into shape, aka the ones to ping if something's giving confusing πŸ’Œ

Bill Fenner
AT&T Labs -- Research
75 Willow Road
Menlo Park, CA 94025

EMail: fenner@research.att.com


David Meyer

EMail: dmm@1-4-5.net

the legal bit, bestie. read it, it's short and it matters 🫢

Copyright (C) The Internet Society (2003).  All Rights Reserved.

This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works.  However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.

The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assignees.

This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

funding check, obviously it's a whole thing πŸ’– The RFC Editor function is currently funded by the Internet Society. 🌈✨

πŸ“¦ where this page comes from