In this demo, we'll see how PIM routers determine which one will be
the designated forwarder for any given segment.
We'll turn on debugs to see the process in action,
and then change the upstream route metrics to force a re‑election.
The designated forwarder is based on the best unicast path to the Bidir‑PIM RP.
When routers are trying to select the DF for a segment,
each advertises an offer, suggesting it will be the DF,
along with its calculated metric to the RP.
It then backs off and waits to see if a better offer comes in.
In this example, MCAST3 and MCAST4 have the same metric.
So I'll come down to whichever router has the highest PIM neighbor IP.
Right now, MCAST4 is the DF for the segment.
Let's see what that looks like on the command line.
This output tells us that right now,
MCAST4 is a designated forwarder and has a metric to the RP of 3072.
We can see the asterisk next to the winning DF,
indicating this local router has won the election.
The Bidir RP address is listed as well,
since we could have different RPs configured to cover different groups.
Each RP could have a different DF shared tree build.
Let's look at MCAST3 and verify it sees the same for the segment.
The MCAST3 output is nearly identical to the one for MCAST4.
The only real difference is the lack of an asterisk.
Doing this on MCAST5 would be tedious,
because it's clear all routers in the segment agree which is the DF.
Now we'll turn on debugs at MCAST5 and watch the fur fly as I
change the upstream metric from MCAST4.
When MCAST4's path to the RP gets worse,
MCAST3 reacts by proposing a better metric MCAST4 replies by essentially
setting in an infinite metric, ceding the election.
After waiting to see if any better offers come in,
MCAST3 declares itself the winner. MCAST5 changes the RPF neighbor on the
segment to 10.255.254.3, which is MCAST3's PIM neighbor IP. This will
affect how the Bidir shared tree gets built and how multicast gets
delivered to the segment, as well as what router will forward PIM joins
upstream. To finish off the demonstration, let's fix the metric and watch
MCAST4 take back its DF role.
The first thing we see is the offer message from MCAST4, and then the RPF
neighbor changes based on the information. After that, we see MCAST3 and
MCAST5 both cede the election via an offer with near infinite metric. And
skipping down a bit, we can see the DF winner message coming from MCAST4. If
we check to see who the designated forwarder is on the segment now, it's back to MCAST4, as expected.