A PIM Designated Router (DR) is elected on every multiple-access segment—that is, every segment where multiple routers share the same medium/subnet. This election process is based on the highest priority and highest IP address; the router with the numerically higher value wins the election. This process is preemptive and every new router with a better priority will preempt the previous DR.

One purpose of a DR is to signal multicast delivery trees using PIM messages when it sees interested receivers on the shared segment by means of IGMP. Another purpose is to register active sources on the segment with the regional RP. When the DR hears multicast packets on the segment, it will check to determine whether the destination group has an RP. If it does, the data packets are encapsulated into special PIM Register messages and sent to the RP. The RP will start forwarding them down the shared tree if there are any active subscribers. At the same time, the RP will build a shortest-path tree toward the DR and send a PIM Register-Stop message to the DR to inform it that regular forwarding may start now. After this, the multicast traffic is delivered over the SPT. Note that PIM Register messages are subject to RPF checks, as usual. If the Register message is received on a non-RPF interface, the check will fail.

R1(config)# ip multicast-routing distributed R1(config)# ip pim rp-address 150.1.5.5 R1(config)# interface GigabitEthernet0/1 R1(config-if)# ip pim sparse-mode R1(config-if)# ip pim dr-priority 100 R1(config-if)# exit ```