Multicast is a powerful communication method in computer networks that allows a single sender to efficiently deliver data to multiple interested recipients simultaneously. Unlike unicast (one-to-one) or broadcast (one-to-all on a segment), multicast conserves network bandwidth and processing resources by minimizing duplicate transmissions, replicating packets only when necessary. At the heart of this efficiency are multicast trees, which are fundamental to how multicast protocols like Protocol Independent Multicast (PIM) build loop-free forwarding topologies.
What is a Network Tree?
In networking, a tree structure provides a prescribed and specific path for frames and packets, preventing network loops. Multicast routers are “master tree builders”. These trees represent the end-to-end paths, where the “root” is typically the router closest to the source (server), and the “leaves” are routers with attached receivers (clients). “Branches” are routers that replicate packets to connect the root to multiple leaves not on the same segment. The show ip mroute command in Cisco platforms displays a state table that represents these trees.
There are two primary types of multicast trees used in IP multicast networks: Source Trees and Shared Trees.
1. Source Trees (Shortest Path Trees - SPTs)
Concept
A Source Tree, also known as a Shortest Path Tree (SPT), is the most common type of multicast tree. The tree is rooted at the multicast source (the device sending the multicast messages). From the network’s perspective, the root of the source tree is the router closest to the source, and the tree extends directly towards all group members.
How it Works
- A separate and distinct tree is maintained for each unique (S,G) entry (Source, Group) in the multicast routing information base (MRIB). The “(S,G)” notation refers to a specific source and a specific multicast group.
- Each router independently calculates its portion of the tree based on received information.
- Loop-free paths are ensured using Reverse Path Forwarding (RPF) checks, which use the unicast routing information base (RIB) to determine the best (shortest) path back to the source. If a packet arrives on an interface that is not on the shortest path back to the source, it is dropped.
- Packet replication occurs at routers that need to forward traffic to multiple outgoing interfaces, effectively creating branches.
Use Cases & Considerations
- Efficiency: SPTs are highly efficient in terms of bandwidth usage and path optimization because they always follow the shortest path from the source to the receivers.
- Scalability Challenges: However, maintaining a separate state for every (S,G) pair can impose significant control-plane overhead on routers in very large networks or those with a high number of active sources. This is often referred to as a “thick multicast forest” due to the many paths needing to be kept.
2. Shared Trees (Rendezvous Point Trees - RPTs)
Concept
A Shared Tree, also known as a Rendezvous Point Tree (RPT), uses a different philosophy for distributing multicast packets to address the scalability concerns of source trees. It uses a shared point in the network, called a Rendezvous Point (RP), as the root of the distribution tree. The RP acts as a “gatekeeper” that holds information on active multicast receivers and sources. The RP’s placement doesn’t necessarily have a direct relation to the multicast source’s IP address and can be outside the shortest path between source and receiver.
How it Works
- Shared trees are represented by (*,G) entries in the MRIB. The asterisk signifies that it accepts traffic from “any source” for the specified group.
- Join Process: When a receiver wants to join a group, its last-hop router (LHR) sends a PIM join message towards the RP, establishing the (*,G) state and forming a shared tree from the RP to the receivers.
- Source Registration: When a source connected to a Designated Router (DR) begins sending traffic, the DR unicasts register messages to the RP, encapsulating the source’s data packets.
- SPT Switchover (in PIM-SM): In PIM Sparse Mode (PIM-SM), the initial flow uses the shared tree. However, to achieve greater efficiency, the last-hop router typically switches to a Shortest Path Tree (SPT) once it learns about the source and can verify a more optimal path directly to the source. This bypasses the RP for subsequent traffic. The RP then sends a “register stop” message to the DR, indicating the (S,G) path to the RP is functional.
- RPF checks for shared trees are performed in the direction of the RP.
Use Cases & Considerations
- Scalability: Shared trees are ideal for sparse topologies (networks with relatively few group members) because they significantly conserve control-plane resources. Only one (*,G) entry is needed per group, regardless of the number of sources.
- Predictability: The network path is pre-determined and predictable, leading to consistent network operations.
- RP Bottleneck: A potential drawback is that the RP can become a bottleneck for high-bandwidth sessions or a single point of failure if not properly designed with redundancy. The path through the RP might also be suboptimal in some scenarios.
Variations and Specific Models
a. PIM Source-Specific Multicast (PIM-SSM)
- Concept: SSM is a subset of PIM-SM that exclusively uses source trees. The key difference is that SSM does not require a Rendezvous Point (RP).
- How it Works: Receivers indicate interest in a specific source by sending IGMPv3 (for IPv4) or MLDv2 (for IPv6) source-specific join messages directly towards the source. The tree is built directly from the source to the receiver along the shortest path. No (*,G) state is maintained.
- IANA Range: IANA has assigned the 232.0.0.0/8 range for IPv4 SSM.
- Use Cases: SSM is well-suited for one-to-many applications like video distribution where the source is well-known. It can also be used for many-to-many applications by “stacking” multiple SSM trees, creating a separate (S,G) tree for each source.
b. Bidirectional PIM (BiDir-PIM)
- Concept: BiDir-PIM is a variant of PIM-SM designed specifically for many-to-many applications where traffic flows in both directions between sources and receivers, such as video conferencing.
- How it Works:
- It only uses shared trees rooted at the RP.
- A crucial characteristic is that it never builds (S,G) entries; only (*,G) entries are maintained.
- There is no source registration process (no register or register stop messages) as sources unconditionally send traffic towards the RP along the shared tree.
- Loop prevention is handled by Designated Forwarders (DFs) on each multi-access segment, rather than traditional RPF checks for upstream traffic.
- Use Cases: Ideal for applications with numerous senders and receivers where the number of sources can be extensive, as it simplifies multicast routing and reduces state maintenance compared to PIM-SM with many sources. RP redundancy in BiDir-PIM can be achieved using the Phantom RP method.