Skip to main content

Multicast - Bidirectional PIM (7)

The Problem with Regular PIM-SM (Many-to-Many Apps)

In standard PIM Sparse Mode, routing is unidirectional. Senders must encapsulate their traffic inside unicast PIM Register messages to the RP, and routers must build unique (S, G) states for every single source.

image.png

For "many-to-many" applications—like stock-trading platforms where thousands of users are both sending and receiving data simultaneously (shown in image)—this causes a massive problem:

  • Every single source generates its own independent (S, G) routing entry.

  • Router memory and CPU usage explode due to the thousands of entries.

  • Network performance degrades under the overhead of data encapsulation.


The Solution: Bidirectional PIM (Bidir-PIM)

Bidirectional PIM solves this scaling crisis by using the exact same tree to move traffic upstream (from sources to the RP) and downstream (from the RP to receivers).

  • The Core Benefit: Bidir-PIM completely deletes source registration, data encapsulation, and (S, G) states.

  • State Reduction: No matter how many thousands of sources start broadcasting, only one generic (*, G) entry is created per group in the multicast routing tables (shown in the images below):

  • Traffic Shortcut: Traffic flows natively hop-by-hop. If a source and a receiver happen to be on the exact same local branch of the tree, the traffic can switch directly between them without even traveling all the way up to the RP.

    image.png

    image.png


The Key Mechanism: The Designated Forwarder (DF)

Because traffic flows both up and down the same tree, normal PIM loops could easily occur on shared multiaccess links. To prevent this, Bidir-PIM introduces a vital new routing role: the Designated Forwarder (DF).

  • What it is: Every single network link (multiaccess or point-to-point) elects exactly one DF per RP.

  • The Election Rule: Routers on a link look at their unicast routing table. The router with the best unicast route (lowest metric) to the RP is elected as the DF

  • Failover: The election happens automatically when the RP is discovered. If a DF dies, neighbor routers detect it using normal PIM Hello messages and instantly elect a new one.

image.png

The Absolute Responsibilities of the DF:

  1. It is the only router allowed to pull upstream traffic off that link and forward it toward the RP.

  2. It is the only router allowed to push downstream traffic from the RP onto that local link toward receivers.


How Bidir-PIM Operates (Step-by-Step)

1. Group Identification

Before any traffic moves, routers must recognize that a multicast group is running in bidirectional mode. This is done either by manual static configuration or dynamically via Auto-RP or BSR. In PIMv2 dynamic messages, this is flagged by a specific bidir bit embedded in the group-address field.

2. The Receiver Join Process (Downstream)

  • When a host wants to receive traffic, its local last-hop router sends a (*, G) join message toward the RP

    image.png

    image.png

  • The Bidir Difference: The downstream router explicitly targets the join to the link's elected DF by placing the DF's IP address directly into the "upstream router" field of the PIM message.

  • If a router receives a join message but is not the elected DF for that link, it ignores it.

  • When the actual DF receives the join, it adds that link to its Outgoing Interface List (OIL) and extends the (*, G) join up toward the RP 

    image.png

3. The Source Sending Process (Upstream)

  • When a source begins transmitting data, there is no register process or encapsulation. The first-hop router does not send anything special to the RP.

  • The local DF on the source's segment simply grabs the native multicast packets directly off the wire 

    image.png


  • The DF then forwards the packets upstream through its Incoming Interface (IIF) toward the RP, while simultaneously replicating and pushing the packets out to any other interfaces listed in its (*, G) OIL


The Strict Forwarding Rules for a Bidir-PIM Router

A bidirectional router will only forward a multicast packet if it meets one of two criteria:

  1. Standard Downstream Rule: The packet arrives on the true Incoming Interface (IIF) pointing toward the RP. The router forwards it downstream to all interfaces in the OIL.

  2. Upstream DF Rule: The router is the official elected DF for the link where the packet arrived. It forwards the packet upstream toward the RP via its IIF, and duplicates it out to all other links in the (*, G) OIL (strictly excluding the interface it arrived on).