In this demo, we'll see how a PIM designated router is elected under
default circumstances and then what methods are available to change
the choice of DR for a given segment.
We briefly talked about the PIM designated router in a previous
section, but now we'll cover it in more detail.
The function of a designated router is different or sometimes absent
between PIM implementations, but the basic election and operation of a
PIM DR is the same for every style of PIM. Here, we have three multicast
routers connected to a multi‑access segment. For any segment, whether
point‑to‑point or multiaccess, only one router can serve the function of
a PIM DR. By default,
each router sends PIM hellos on every PIM‑enabled interface to discover other
PIM routers. No matter how many or how few PIM routers exist on any segment,
each other PIM router will receive the hellos.
This is important for the designated router election
since only one PIM router can be a DR.
Let's take a look at the command line interface and see this in action. Here on
MCAST5, we've shut down the interface facing the multi‑access segment to
demonstrate the PIM neighbor adjacency and DR election.
We'll turn on debug from PIM here and then activate the interface.
We can see the first thing to happen before any PIM hellos are exchanged is
that the router believes it's the DR for the segment.
This is quickly confirmed when the PIM neighbor adjacencies are built.
We can validate that here.
We can see some important details on this interface.
The PIM version running is version 2, which is the standard.
The PIM mode shows D, which indicates that this is PIM dense mode. We
have two neighbors on this multi‑access segment.
The DR Priority is the default, which is 1.
And lastly, the IP of the DR shows that it's this system.
We can dig more by doing the same command and adding details at the end.
For DR‑specific details,
notice that the PIM DR shows the IP and says it's this local system.
Why is this router the DR? We can get a clue by looking
at another router on the segment.
The IP of this router is one below the current DR.
And without looking,
I can affirm that the third router has a lower IP as well. By
default, with the same DR priority, the PIM neighbor IP is
the tiebreaker in DR election.
What if we want to guarantee a specific router becomes the DR? Let's
configure MCAST for here and set its priority higher.
We can see that the DR changes to this system due to the
configured DR priority. At this point, MCAST4 here is now the
PIM designated router for this segment.
We can verify that by issuing the same command we used before.
What does that mean?
Well, for PIM dense mode, it means nothing at all.
While the RFC requires a PIM DR be elected for every segment, PIM
dense mode doesn't use the DR functionality at all.
We'll talk more about the DR when we get to the PIM implementations that need it.