PIM DR and the Assert Message

There are two PIM mechanisms you should be aware of which are used on broadcast segments, the PIM DR and the Assert message.

The PIM DR (Designated Router) is elected when PIM neighbors become adjacent. The DR is only used in PIM-SM. The DR is the router which sends a PIM Join upstream. If both routers on the shared segment sent a PIM Join upstream, they would receive duplicated traffic.

The PIM Assert message is used primarily in PIM-DM. The PIM Assert is used to determine which router will forward multicast traffic onto the broadcast segment. If both routers forwarded traffic onto the broadcast segment, the hosts would receive duplicated traffic.

We’ll first go over the PIM Assert in detail, and then switch the lab to PIM-SM and go over the role of the DR.

Assert

To explore the PIM Assert message, we will use the following topology with PIM-DM:

Here are the startup configs:

#Source1
hostname Source1
!
int Gi1
 ip address 10.10.10.10 255.255.255.0
 no shut
!
ip route 0.0.0.0 0.0.0.0 10.10.10.1

#R1
hostname R1
!
ip multicast-routing distributed
!
int Gi1
 ip address 10.10.10.1 255.255.255.0
 ip pim dense-mode
 no shut
!
int Gi2
 ip address 10.1.2.1 255.255.255.0
 no shut
 ip ospf network point-to-point
 ip pim dense-mode
!
int Gi3
 ip address 10.1.3.1 255.255.255.0
 no shut
 ip ospf network point-to-point
 ip pim dense-mode
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
 passive-interface Gi1

#R2
hostname R2
!
ip multicast-routing distributed
!
int Gi1
 ip address 10.1.2.2 255.255.255.0
 ip ospf network point-to-point
 ip pim dense-mode
 no shut
!
int Gi2
 ip address 10.10.100.2 255.255.255.0
 ip pim dense-mode
 vrrp 1 ip 10.10.100.1
 no shut
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
 passive-interface Gi2

#R3
hostname R3
!
ip multicast-routing distributed
!
int Gi1
 ip address 10.1.3.3 255.255.255.0
 ip ospf network point-to-point
 ip pim dense-mode
 no shut
!
int Gi2
 ip address 10.10.100.3 255.255.255.0
 ip pim dense-mode
 vrrp 1 ip 10.10.100.1
 vrrp 1 priority 90
 no shut
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
 passive-interface Gi2

#Host1
hostname Host1
!
int Gi0/0
 ip address 10.10.100.10 255.255.255.0
 no shut
 ip igmp join-group 239.1.1.1
!
ip route 0.0.0.0 0.0.0.0 10.10.100.1
 

PIM-DM is already enabled on all interfaces. Verify that both R2 and R3 have a (*, 239.1.1.1) entry in response to the IGMP Join sent by Host1.

R2#show ip mroute 239.1.1.1

(*, 239.1.1.1), 00:09:28/00:02:22, RP 0.0.0.0, flags: DC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet2, Forward/Dense, 00:09:28/stopped
    GigabitEthernet1, Forward/Dense, 00:09:28/stopped

R3#show ip mroute 239.1.1.1

(*, 239.1.1.1), 00:09:42/00:02:04, RP 0.0.0.0, flags: DC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet2, Forward/Dense, 00:09:42/stopped
    GigabitEthernet1, Forward/Dense, 00:09:42/stopped

When the source begins sending traffic to the multicast group, R1 will flood it out both Gi2 and Gi3. R2 and R3 have an entry for (*, 239.1.1.1), so they will each send traffic out Gi2.

Host1 will receive duplicated packets. If this continues, every packet that the source sends will be duplicated at Host1.

To prevent this, PIM uses the Assert message. This message is sent when a router receives a multicast packet on an interface which is in the OIL for the associated entry. So when both R2 and R3 receive the packet on Gi2 from each other, they both send an Assert message.

The Assert message contains the local router’s metric to the source. If a router receives an Assert message with a lower metric than its own, it means the other router on the subnet has a lower cost to the source, so the router stops sending traffic onto the LAN. If the metrics tie, the router with the highest IP wins. The router with the lowest IP will stop sending traffic.

Let’s see this in action by sending pings from the Source:

Source1#ping 239.1.1.1 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:

Reply to request 0 from 10.10.100.10, 84 ms
Reply to request 0 from 10.10.100.10, 144 ms
Reply to request 1 from 10.10.100.10, 5 ms
Reply to request 2 from 10.10.100.10, 5 ms
Reply to request 3 from 10.10.100.10, 6 ms
Reply to request 4 from 10.10.100.10, 5 ms

A capture is taken on Gi0/0 of Host1:

Notice that the host receives two copies of the first ping, and responds to both. Next, R3 sends a PIM Assert, shown above. The Assert shows the AD and metric for R3’s route to the source, 10.10.10.10.

R2, before it can send its own Assert, realizes that R3 wins. R3 has a higher IP address on the broadcast segment (10.10.100.3). Instead of sending an Assert, R2 simply sends a Prune, pruning its own Gi2 interface. Subsequent traffic is only forwarded by R3.

R2#show ip mroute 239.1.1.1

(*, 239.1.1.1), 00:07:04/stopped, RP 0.0.0.0, flags: DC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet1, Forward/Dense, 00:06:39/stopped
    GigabitEthernet2, Forward/Dense, 00:07:04/stopped

(10.10.10.10, 239.1.1.1), 00:04:08/00:01:51, flags: PT
  Incoming interface: GigabitEthernet1, RPF nbr 10.1.2.1
  Outgoing interface list:
    GigabitEthernet2, Prune/Dense, 00:04:08/00:01:48

R2 now has no interfaces in the OIL for (10.10.10.10, 239.1.1.1), so it sends a Prune upstream to R1. R1 removes Gi2 from the OIL:

R1#show ip mroute 239.1.1.1

(*, 239.1.1.1), 00:05:32/stopped, RP 0.0.0.0, flags: D
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet3, Forward/Dense, 00:05:32/stopped
    GigabitEthernet2, Forward/Dense, 00:05:32/stopped

(10.10.10.10, 239.1.1.1), 00:00:43/00:02:16, flags: T
  Incoming interface: GigabitEthernet1, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet2, Prune/Dense, 00:00:31/00:02:28
    GigabitEthernet3, Forward/Dense, 00:00:43/stopped

Designated Router (DR)

The PIM DR (Designated Router) is elected when a neighborship comes up. The router with the highest DR priority value wins. The default priority is 1. If the priorites tie, the highest IP address wins. Similar to OSPF, there is a single DR on every segment. There is no BDR in PIM.

This output from R2 shows that each neighbor has a DR priority of 1, and that R3 is the DR on the LAN segment, because it has a higher IP. R2 has a higher IP than R1, so we can infer that R2 is the DR on the link to R1 since the DR flag is missing. The DR flag indicates that the neighbor is the DR.

R2#show ip pim neighbor 
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      P - Proxy Capable, S - State Refresh Capable, G - GenID Capable,
      L - DR Load-balancing Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
10.1.2.1          GigabitEthernet1         00:20:03/00:01:21 v2    1 / S P G
10.10.100.3       GigabitEthernet2         00:20:02/00:01:21 v2    1 / DR S P G

The DR status is not advertised in the PIM Hello. Only the priorty value is advertised. Routers silently elect themselves DR based on received Hellos.

The PIM DR function is only useful in PIM-SM. This is because the DR is the router which will send a PIM Join upstream on a broadcast segment when acting as LHR, or send a PIM Register when acting as FHR. This prevents duplicated traffic from being pulled down to both R2 and R3 in our topology. This makes the PIM Assert message unncessary in general for PIM-SM, as the non-DR router will not receive the multicast traffic in the first place. The non-DR router will not be on the shared tree.

Let’s change from PIM-DM to PIM-SM in our lab. We will set R1 as the RP. Have Host1 leave the group.

#R1
int lo0
 ip address 1.1.1.1 255.255.255.255
!
ip pim rp-address 1.1.1.1
!
int range Gi1-3
 ip pim sparse-mode

#R2, 3
ip pim rp-address 1.1.1.1
!
int range Gi1-2
 ip pim sparse-mode

#Host1
int Gi0/0
 no ip igmp join-group 239.1.1.1

Run debug ip pim on both R2 and R3 and have Host1 join the group again:

#R2, 3
debug ip pim

#Host1
int Gi0/0
 ip igmp join-group 239.1.1.1

R2 is not the DR, so it will not send a PIM Join upstream. Instead it actually sends a Prune upstream, to Prune itself from (*, 239.1.1.1). R2 sends this Prune because it has state for this entry from the IGMP Join, but no interfaces in the OIL (because it is not the DR).

*Sep 14 14:44:49.730: PIM(0): Re-check RP 1.1.1.1 into the (*, 239.1.1.1) entry
*Sep 14 14:44:49.731: PIM(0): Building Triggered (*,G) Join / (S,G,RP-bit) Prune message for 239.1.1.1

R2#show ip mroute 239.1.1.1

(*, 239.1.1.1), 00:00:23/00:02:49, RP 1.1.1.1, flags: SP
  Incoming interface: GigabitEthernet1, RPF nbr 10.1.2.1
  Outgoing interface list: Null

The RP (R1) only has Gi3 in the OIL:

R1#show ip mroute 239.1.1.1

(*, 239.1.1.1), 00:06:04/00:03:02, RP 1.1.1.1, flags: S
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    GigabitEthernet3, Forward/Sparse, 00:02:25/00:03:02

When we initiate traffic from the Source, we should not see any duplicated pings.

Source1#ping 239.1.1.1 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:

Reply to request 0 from 10.10.100.10, 41 ms
Reply to request 1 from 10.10.100.10, 6 ms
Reply to request 2 from 10.10.100.10, 4 ms
Reply to request 3 from 10.10.100.10, 5 ms
Reply to request 4 from 10.10.100.10, 5 ms

In addition to the PIM Join function, the DR is also the router to send a PIM Register in the case where there are multiple FHRs on the LAN. This prevents the RP from receiving duplicate Register messages.

DR Failover

DR Failover works somewhat crudely. The non-DR will only takeover as DR once its neighborship with the DR times out. The non-DR still has IGMP state for all groups the hosts on the LAN has joined. However, the problem is that in PIM, the neighborship takes 3.5 times the hello (30 seconds) to time out. This is 105 seconds, or 1 min and 45 seconds!

To demonstrate this, start a repeated ping at the source, and then shut down Gi1 and Gi2 on R3 (the DR). Because this connection runs through a switch, R2 has no choice but to rely on the neighborship to time out. It cannot use link failure to detect that R3 is down.

#Source1
ping 239.1.1.1 repeat 100

#R3
int range Gi1-2
 shutdown
Source1#ping 239.1.1.1 repeat 100
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:

Reply to request 0 from 10.10.100.10, 37 ms...................................................
Reply to request 52 from 10.10.100.10, 20 ms

51 pings timed out before R2 finally took over as DR.

Conclusion

The PIM DR and PIM Assert message are used to prevent duplicated traffic on a broadcast segment.

The DR is elected on every interface whether using PIM-DM or PIM-SM, because it is a function of PIM itself. However, it is only applicable to PIM-SM. The DR is the router with the highest priority (default is 1) or the highest IP address. The DR is the router on the segment which will send a PIM Join or PIM Register.

The PIM Assert message is primarily seen in PIM-DM, but in rare cases it could conceivably be seen in PIM-SM. The Assert message is used to prevent duplicated multicast traffic being sent onto a broadcast segment. The Assert is generated in response to a multicast packet being received on an interface in the OIL. The Assert contains the router’s metric to the source. The router with the higher (worse) routing metric, or lower IP address (if metric ties) will prune its interface.

Further Reading

https://www.cisco.com/c/en/us/support/docs/ip/ip-multicast/212595-how-well-do-you-know-pim-assert-mechanis.html

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipmulti_pim/configuration/xe-3s/imc-pim-xe-3s-book/ip6-mcast-pim-sm.html#GUID-5222D94C-4930-4255-814E-DCD0DB853DFF

Last updated