Router R4 and R5 using HSRP
Multicast and unicast topology are not congruent
One thing that I have notice here is that R5 is the PIM DR even though R4 is the HSRP AR. The network has been setup with OSPF, PIM and R1 is the RP. Both R4 and R5 will receive IGMP reports but only R3 will send PIM Join, due to it being the PIM DR. R5 builds the (*,G) towards the RP:
In environments that require redundancy towards clients, HSRP will normally be running. HSRP is a proven protocol and it works but how do we handle when we have clients that need multicast? What triggers multicast to converge when the Active Router (AR) goes down? The following topology is used:
config
R1
!
ip multicast-routing
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/0
no switchport
ip address 192.168.41.1 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
no switchport
ip address 192.168.51.1 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
We then ping 239.1.1.1 from the multicast source to build the (S,G):
R1#ping 239.1.1.1 source loopback 0 repeat 9999
after configuration
activate #debup ip pim (in R4and R5 )
R5
!config
!
ip multicast-routing
!
interface FastEthernet0/0
no switchport
ip address 192.168.51.5 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
no switchport
ip address 192.168.2.5 255.255.255.0
ip pim sparse-dense-mode
standby 1 ip 192.168.2.4
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
R5
R5#show ip mroute 1.1.1.1 239.1.1.1
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(1.1.1.1, 239.1.1.1), 00:03:06/00:02:57, flags: JT
Incoming interface: FastEthernet0/0, RPF nbr 192.168.51.1
Outgoing interface list:
FastEthernet0/1, Forward/Sparse-Dense, 00:03:06/00:02:38
-====================
*Mar 1 01:18:46.427: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 224.0.1.40
*Mar 1 01:18:46.427: PIM(0): Insert (*,224.0.1.40) join in nbr 192.168.51.1's queue
*Mar 1 01:18:46.431: PIM(0): Building Join/Prune packet for nbr 192.168.51.1
*Mar 1 01:18:46.431: PIM(0): Adding v2 (1.1.1.1/32, 224.0.1.40), WC-bit, RPT-bit, S-bit Join
*Mar 1 01:18:46.431: PIM(0): Send v2 join/prune to 192.168.51.1 (FastEthernet0/0)
R5#
*Mar 1 01:18:50.551: PIM(0): Received RP-Reachable on FastEthernet0/0 from 1.1.1.1
*Mar 1 01:18:50.551: PIM(0): Received RP-Reachable on FastEthernet0/0 from 1.1.1.1
*Mar 1 01:18:50.555: for group 224.0.1.40
*Mar 1 01:18:50.555: PIM(0): Forward RP-reachability for 224.0.1.40 on FastEthernet0/1
R5#
*Mar 1 01:19:12.711: PIM(0): Received RP-Reachable on FastEthernet0/0 from 1.1.1.1
*Mar 1 01:19:12.711: PIM(0): Received RP-Reachable on FastEthernet0/0 from 1.1.1.1
*Mar 1 01:19:12.715: for group 239.1.1.1
*Mar 1 01:19:12.715: PIM(0): Forward RP-reachability for 239.1.1.1 on FastEthernet0/1
R5#
*Mar 1 01:19:24.535: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 239.1.1.1
*Mar 1 01:19:24.535: PIM(0): Insert (*,239.1.1.1) join in nbr 192.168.51.1's queue
*Mar 1 01:19:24.539: PIM(0): Building Join/Prune packet for nbr 192.168.51.1
*Mar 1 01:19:24.539: PIM(0): Adding v2 (1.1.1.1/32, 239.1.1.1), WC-bit, RPT-bit, S-bit Join
*Mar 1 01:19:24.543: PIM(0): Send v2 join/prune to 192.168.51.1 (FastEthernet0/0)
R5#
R4
!
ip multicast-routing
!
interface FastEthernet0/0
no switchport
ip address 192.168.41.4 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
no switchport
ip address 192.168.2.1 255.255.255.0
ip pim sparse-dense-mode
standby 1 ip 192.168.2.4
standby 1 priority 150
standby 1 preempt
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
-==========
R4#show ip mroute 1.1.1.1 239.1.1.1
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 239.1.1.1), 00:25:51/00:02:54, RP 1.1.1.1, flags: SP
Incoming interface: FastEthernet0/0, RPF nbr 192.168.41.1
Outgoing interface list: Null
-=================
*Mar 1 01:18:45.739: PIM(0): Insert (*,224.0.1.40) join in nbr 192.168.41.1's queue
*Mar 1 01:18:45.743: PIM(0): Building Join/Prune packet for nbr 192.168.41.1
*Mar 1 01:18:45.743: PIM(0): Adding v2 (1.1.1.1/32, 224.0.1.40), WC-bit, RPT-bit, S-bit Join
*Mar 1 01:18:45.747: PIM(0): Send v2 join/prune to 192.168.41.1 (FastEthernet0/0)
R4#
*Mar 1 01:18:52.131: PIM(0): Received RP-Reachable on FastEthernet0/0 from 1.1.1.1
*Mar 1 01:18:52.131: PIM(0): Received RP-Reachable on FastEthernet0/0 from 1.1.1.1
*Mar 1 01:18:52.135: for group 224.0.1.40
*Mar 1 01:18:52.163: PIM(0): Received RP-Reachable on FastEthernet0/1 from 1.1.1.1
*Mar 1 01:18:52.163: PIM(0): Received RP-Reachable on FastEthernet0/1 from 1.1.1.1
*Mar 1 01:18:52.163: for group 224.0.1.40
*Mar 1 01:18:52.163: PIM(0): Not RPF interface, group 224.0.1.40
R4#
*Mar 1 01:19:14.307: PIM(0): Received RP-Reachable on FastEthernet0/1 from 1.1.1.1
*Mar 1 01:19:14.307: PIM(0): Received RP-Reachable on FastEthernet0/1 from 1.1.1.1
*Mar 1 01:19:14.311: for group 239.1.1.1
*Mar 1 01:19:14.311: PIM(0): Not RPF interface, group 239.1.1.1
R4#
*Mar 1 01:19:22.763: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 239.1.1.1
R4#
*Mar 1 01:19:45.179: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 224.0.1.40
*Mar 1 01:19:45.179: PIM(0): Insert (*,224.0.1.40) join in nbr 192.168.41.1's queue
*Mar 1 01:19:45.183: PIM(0): Building Join/Prune packet for nbr 192.168.41.1
*Mar 1 01:19:45.183: PIM(0): Adding v2 (1.1.1.1/32, 224.0.1.40), WC-bit, RPT-bit, S-bit Join
*Mar 1 01:19:45.187: PIM(0): Send v2 join/prune to 192.168.41.1 (FastEthernet0/0)
R4#
receiver
interface Ethernet0/0
ip address 192.168.2.3 255.255.255.0
ip pim dense-mode
ip igmp join-group 239.1.1.1
half-duplex
!
interface Ethernet0/1
no ip address
shutdown
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
*Mar 1 01:20:06.807: IGMP(0): Send v2 Report for 239.1.1.1 on Ethernet0/0
*Mar 1 01:20:06.807: IGMP(0): Received v2 Report on Ethernet0/0 from 192.168.2.3 for 239.1.1.1
*Mar 1 01:20:06.811: IGMP(0): Received Group record for group 239.1.1.1, mode 2 from 192.168.2.3 for 0 sources
*Mar 1 01:20:06.811: IGMP(0): Updating EXCLUDE group timer for 239.1.1.1
*Mar 1 01:20:06.811: IGMP(0): MRT Add/Update Ethernet0/0 for (*,239.1.1.1) by 0
*Mar 1 01:20:07.807: IGMP(0): Send v2 Report for 224.0.1.40 on Ethernet0/0
*Mar 1 01:20:07.807: IGMP(0): Received v2 Report on Ethernet0/0 from 192.168.2.3 for 224.0.1.40
*Mar 1 01:20:07.811: IGMP(0): Received Group record for group 224.0.1.40, mode 2 from 192.168.2.3 for 0 sources
*Mar 1 01:20:07.811: IGMP(0): Updating EXCLUDE group timer for 224.0.1.40
*Mar 1 01:20:07.811: IGMP(0): MRT Add/Update Ethernet0/0 for (*,224.0.1.40) by 0
Rreceiver#
*Mar 1 01:20:19.463: PIM(0): Received RP-Reachable on Ethernet0/0 from 1.1.1.1
*Mar 1 01:20:19.467: PIM(0): Received RP-Reachable on Ethernet0/0 from 1.1.1.1
*Mar 1 01:20:19.467: for group 224.0.1.40
*Mar 1 01:20:19.467: PIM(0): 224.0.1.40 is not sparse-mode group
Rreceiver#
We can increase the DR priority on R4 to make it become the DR.
R4(config)#interface fastEthernet 0/1
R4(config-if)#ip pim dr
R4(config-if)#ip pim dr-priority 100
R4(config-if)#
*Mar 1 01:30:37.827: %PIM-5-DRCHG: DR change from neighbor 192.168.2.5 to 192.168.2.1 on interface FastEthernet0/1
after the change
R4#show ip mroute 1.1.1.1 239.1.1.1
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(1.1.1.1, 239.1.1.1), 00:03:19/00:03:15, flags: T
Incoming interface: FastEthernet0/0, RPF nbr 192.168.41.1
Outgoing interface list:
FastEthernet0/1, Forward/Sparse-Dense, 00:03:19/00:03:08, A
R4#
-==========
R5#show ip mroute 1.1.1.1 239.1.1.1
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(1.1.1.1, 239.1.1.1), 00:02:55/00:00:51, flags: PJT
Incoming interface: FastEthernet0/0, RPF nbr 192.168.51.1
Outgoing interface list: Null
R5#
note
HSRP aware PIM is a feature that started appearing in IOS 15.3(1)T and makes the HSRP AR become the PIM DR. It will also send PIM messages from the virtual IP which is useful in situations where you have a router with a static route towards an Virtual IP (VIP). This is how Cisco describes the feature:
HSRP Aware PIM enables multicast traffic to be forwarded through the HSRP active router (AR), allowing PIM to leverage HSRP redundancy, avoid potential duplicate traffic, and enable failover, depending on the HSRP states in the device. The PIM designated router (DR) runs on the same gateway as the HSRP AR and maintains mroute states.