Skip to main content

Multicast - Routing (4)

Multicast Forwarding vs. Unicast Forwarding

  • Unicast Forwarding: A router looks only at the destination IP address. It scans the routing table and forwards a single copy of the packet out a single interface toward that destination.

  • Multicast Forwarding: A source sends traffic to a multicast group address representing an arbitrary set of hosts. The router must determine the upstream direction (toward the source) and the downstream direction (toward receivers). If multiple downstream paths exist, the router replicates the packet and forwards it down those specific paths.


Reverse Path Forwarding (RPF)

Forwarding multicast traffic away from the source and toward the receivers is handled via Reverse Path Forwarding (RPF). The RPF check is the primary mechanism used to prevent loop conditions.

  • The RPF Check Process: When a multicast packet arrives on an interface, the router inspects the source IP address of the packet and checks it against the unicast routing table.

  • Pass Condition: If the incoming interface matches the interface the unicast routing table uses to reach that source, the packet passes the RPF check and is forwarded.

  • Fail Condition: If the packet arrives on any other interface, it fails the check and is dropped.


Protocol Independent Multicast (PIM) Fundamentals

PIM is called "protocol independent" because it does not create its own multicast routing updates. Instead, it leverages the existing unicast routing table (populated by OSPF, EIGRP, BGP, or static routes) to perform the RPF check.

There are two primary modes of PIM used to handle multicast routing:

1. PIM Dense Mode (PIM-DM)
  • Traffic Model: Uses a "push" model. It assumes every subnet in the network wants the traffic.

  • Mechanics: PIM-DM initially floods multicast traffic to every corner of the network. Routers with no downstream receivers explicitly send a "prune" message to cut off the unwanted stream. This flood-and-prune cycle automatically repeats every 3 minutes.

  • Tree Type: Only supports source trees and builds explicit (S, G) entries. It cannot build shared trees.

2. PIM Sparse Mode (PIM-SM)
  • Traffic Model: Uses an "explicit pull" model. Traffic is only sent to areas of the network that specifically request it.

  • Mechanics: Uses a central root router called a Rendezvous Point (RP) to coordinate traffic between sources and receivers.

  • RPF Checks by Tree Type:
    • If traffic flows down a shared tree, the RPF check uses the IP address of the RP.
    • If traffic flows down a shortest path tree (SPT), the RPF check uses the IP address of the actual source.

  • SPT Threshold: Routers can be configured with an SPT threshold. When exceeded, the last-hop router bypasses the shared tree and joins the direct source tree (SPT) to reduce latency.

  • Multiple RPs: A single environment can use access control lists (ACLs) to map different group ranges to different physical RPs, optimizing traffic flow. Only one RP can be active for a specific group at a time.


PIM-SM Optimizations

  • Bidirectional PIM (BIDIR-PIM): Optimized specifically for many-to-many applications.

  • Source-Specific Multicast (SSM): A PIM-SM variant that builds only source-specific SPTs. It uses the dedicated address range 232.0.0.0/8 and operates completely without an RP.


PIM-SM Operational Workflows

PIM-SM coordinates communication through two explicit automated processes: the Shared Tree Join and Sender Registration.

Workflow 1: The Shared Tree Join (Receiver Side)
  1. An active receiver joins a multicast group by sending an IGMP membership report.

  2. The local Designated Router (DR)—known as the last-hop router—receives this report.

  3. The last-hop router identifies the RP assigned to that group and sends a (*, G) join message hop-by-hop toward the RP.

  4. Each router along the path installs a (*, G) state entry, building a branch of the shared distribution tree. Traffic can now flow from the RP down to the receiver.

[Receiver] ---> (IGMP Report) ---> [Last-Hop Router] ---> (PIM *,G Join) ---> [RP]
Workflow 2: Sender Registration (Source Side)
  1. An active source begins transmitting multicast packets.

  2. The local first-hop Designated Router (DR) receives the packets, encapsulates them inside unicast PIM Register messages, and sends them directly to the RP.

  3. The RP decapsulates the packets and sends them down the shared tree to active receivers. Simultaneously, the RP sends a native (S, G) join back toward the first-hop router to build a native Shortest Path Tree (SPT).

  4. Once native, unencapsulated (S, G) traffic begins arriving at the RP via the newly built SPT, the RP sends a unicast PIM Register-Stop message to the first-hop router.

  5. The first-hop router stops encapsulating the packets into unicast. Traffic now flows natively along the SPT to the RP, and then down the shared tree to the receivers.

[Source] ---> (Native Traffic) ---> [First-Hop Router] ---> (Unicast PIM Register) ---> [RP]
                                         ^                                           |
                                         |------------ (PIM Register-Stop) ----------|