IP Multicast - Introduction

IP Multicast

IP Multicast is a communication paradigm in computer networking designed to efficiently send data from one source to multiple recipients. Unlike unicast, where data is sent from one source to one destination, and broadcast, where data is sent from one source to all destinations, multicast enables the efficient delivery of information to a specific group of recipients. In multicast, the sender generates a single copy of the data, and routers within the network replicate and forward the data only to those hosts that have expressed interest in the multicast group. This approach conserves network resources and bandwidth, making multicast particularly suited for scenarios such as streaming multimedia, online conferencing, and content distribution where the same data needs to be delivered to multiple receivers simultaneously. IP Multicast employs special multicast addresses within the IPv4 or IPv6 address space, and protocols like Internet Group Management Protocol (IGMP) assist in managing group memberships. Overall, IP Multicast optimizes network efficiency for applications requiring one-to-many or many-to-many communication.

Lab:

Disclaimer

This CCIE Routing & Switching Lab Guide is designed to assist candidates in the preparation for Cisco CCIE Routing & Switching Lab exam. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on as "as is" basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this workbook. This workbook was developed by Forum. Any similarities between material presented in this workbook and actual CCIE TM lab material or any other material is completely coincidental.

Configure IP Multicast with PIM Dense Mode throughout the OSPF domain so that multicast traffic sent from SW1 can be received by SW2.

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.15.1 255.255.255.0
ip pim dense-mode

Configuration:

interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim dense-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim dense-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim dense-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim dense-mode
!

Configuration:

router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim dense-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.15.5 255.255.255.0
ip pim dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim dense-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Configuration:

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

R1#show ip pim neighbor 
PIM Neighbor Table 

Neighbor      Interface         Uptime/Expires       Ver     DR
Address                           Prio/Mode 
150.1.15.5   FastEthernet0/0    00:55:51/00:01:26    v2    1 / DR P 
150.1.13.3   Serial2/0          00:55:55/00:01:28    v2    1 / P 
150.1.12.2   Serial2/1          00:30:06/00:01:42    v2    1 / P

R2#show ip pim neighbor 
PIM Neighbor Table 

Neighbor      Interface         Uptime/Expires       Ver     DR
Address                           Prio/Mode 
150.1.24.4   FastEthernet0/0    01:01:40/00:01:41    v2    1 / DR P 
150.1.12.1   Serial2/1          00:35:47/00:01:24    v2    1 / P

R3#show ip pim neighbor 
PIM Neighbor Table 

Neighbor      Interface         Uptime/Expires       Ver     DR
Address                           Prio/Mode 
150.1.13.1    Serial2/0        01:04:54/00:01:39     v2     1 / P

R4#show ip pim neighbor 
PIM Neighbor Table 

Neighbor      Interface         Uptime/Expires       Ver     DR
Address                           Prio/Mode 
150.1.24.2    FastEthernet0/0   00:23:37/00:01:37    v2     1 / P 
150.1.45.5    Serial2/0         00:29:24/00:01:24    v2     1 / P

R5#show ip pim neighbor 
PIM Neighbor Table 

Neighbor      Interface         Uptime/Expires       Ver     DR
Address                           Prio/Mode 
150.1.15.1    FastEthernet0/0   01:08:04/00:01:22    v2     1 / P 
150.1.56.6    FastEthernet0/1   01:07:39/00:01:22    v2     1 / DR P 
150.1.45.4    Serial2/0         00:30:34/00:01:41    v2     1 / P

R6#show ip pim neighbor 
PIM Neighbor Table 

Neighbor      Interface         Uptime/Expires       Ver     DR
Address                           Prio/Mode 
150.1.56.5    FastEthernet0/1   01:09:00/00:01:21     v2    1 / P

Verification:

SW1: Originate multicast feed from source SW1: 
SW1#conf t 
SW1(config)#rtr 1 
SW1(config-rtr)#type udpEcho dest-ipaddr 224.1.1.1 dest-port 12345 
                source-ipaddr 10.1.37.7 control disable 
SW1(config-rtr)#frequency 5 
SW1(config-rtr)#exit 
SW1(config)#rtr schedule 1 start now 
SW1(config)#end

(10.1.37.7,224.1.1.1) is flooded throughout the network to R6 and 
pruned back to R3 as there are no receivers:

R6#debug ip pim 
PIM(0): Insert (10.1.37.7,224.1.1.1) prune in nbr 150.1.56.5's queue 
PIM(0): Building Join/Prune packet for nbr 150.1.56.5 
PIM(0): Adding v2 (10.1.37.7/32, 224.1.1.1) Prune 
PIM(0): Send v2 join/prune to 150.1.56.5 (FastEthernet0/1) 

R3#debug ip pim 
PIM(0): Received v2 Join/Prune on Serial2/0 from 150.1.13.1, to us 
PIM(0): Prune-list: (10.1.37.7/32, 224.1.1.1) 
PIM(0): Prune Serial2/0/224.1.1.1 from (10.1.37.7/32, 224.1.1.1) 

R1#show ip mroute 224.1.1.1 
<output omitted> 
(*, 224.1.1.1), 00:07:30/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/1, Forward/Dense, 00:07:30/00:00:00 
        Serial2/0, Forward/Dense, 00:07:30/00:00:00 
        FastEthernet0/0, Forward/Dense, 00:07:30/00:00:00 
(10.1.37.7, 224.1.1.1), 00:04:05/00:02:00, flags: PT 
    Incoming interface: Serial2/0, RPF nbr 150.1.13.3 
    Outgoing interface list: 
        FastEthernet0/0, Prune/Dense, 00:01:00/00:01:59 
        Serial2/1, Prune/Dense, 00:00:56/00:02:03

Verification:

R2#show ip mroute 224.1.1.1 
<output omitted> 

(*, 224.1.1.1), 00:12:46/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/1, Forward/Dense, 00:12:46/00:00:00 
        FastEthernet0/0, Forward/Dense, 00:12:47/00:00:00 

(10.1.37.7, 224.1.1.1), 00:00:45/00:02:14, flags: PT 
    Incoming interface: Serial2/1, RPF nbr 150.1.12.1 
    Outgoing interface list: 
        FastEthernet0/0, Prune/Dense, 00:00:40/00:02:19, A

R3#show ip mroute 224.1.1.1 
<output omitted> 

(*, 224.1.1.1), 00:35:12/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/0, Forward/Dense, 00:35:12/00:00:00 

(10.1.37.7, 224.1.1.1), 00:03:02/00:00:07, flags: PT 
    Incoming interface: FastEthernet0/0, RPF nbr 0.0.0.0 
     Outgoing interface list: 
        Serial2/0, Prune/Dense, 00:02:57/00:00:02

R4#show ip mroute 224.1.1.1 
<output omitted> 

(*, 224.1.1.1), 00:37:43/stopped, RP 0.0.0.0, flags: D 
     Incoming interface: Null, RPF nbr 0.0.0.0 
     Outgoing interface list: 
         Serial2/0, Forward/Dense, 00:37:43/00:00:00 
         FastEthernet0/0, Forward/Dense, 00:37:43/00:00:00 

(10.1.37.7, 224.1.1.1), 00:02:43/00:00:23, flags: PT 
    Incoming interface: Serial2/0, RPF nbr 150.1.45.5 
    Outgoing interface list: 
         FastEthernet0/0, Prune/Dense, 00:02:42/00:00:17

Verification:

R5#show ip mroute 224.1.1.1 
<output omitted> 

(*, 224.1.1.1), 00:39:27/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
         Serial2/0, Forward/Dense, 00:39:27/00:00:00 
         FastEthernet0/1, Forward/Dense, 00:39:27/00:00:00 
         FastEthernet0/0, Forward/Dense, 00:39:27/00:00:00 

(10.1.37.7, 224.1.1.1), 00:01:07/00:01:59, flags: PT 
    Incoming interface: FastEthernet0/0, RPF nbr 150.1.15.1 
    Outgoing interface list: 
         FastEthernet0/1, Prune/Dense, 00:01:07/00:01:52 
         Serial2/0, Prune/Dense, 00:01:07/00:01:52

R6#show ip mroute 224.1.1.1 
<output omitted> 

(*, 224.1.1.1), 00:44:31/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
         FastEthernet0/1, Forward/Dense, 00:44:31/00:00:00 

(10.1.37.7, 224.1.1.1), 00:02:41/00:00:18, flags: PT 
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 
    Outgoing interface list: Null 

SW2: Sends join message to requests traffic from the group 224.1.1.1: 
SW2#conf t 
SW2(config)#int FastEthernet0/0 
SW2(config-if)#ip igmp join-group 224.1.1.1 
SW2(config-if)#end

Verification:

R6 sends PIM dense graft to add itself to the tree for 224.1.1.1:

R6#debug ip pim 
02:57:27: PIM(0): Building Graft message for 224.1.1.1, FastEthernet0/1: 
 10.1.37.7/32 
02:57:27: PIM(0): Send v2 Graft to 150.1.56.5 (FastEthernet0/1) 
02:57:27: PIM(0): Received v2 Graft-Ack on FastEthernet0/1 from 150.1.56.5 
02:57:27: Group 224.1.1.1: 
 10.1.37.7/32


R5 receives graft request from R6 and continues forwarding request upstream toward source:


02:56:57: PIM(0): Received v2 Graft on FastEthernet0/1 from 150.1.56.6 
02:56:57: PIM(0): Join-list: (10.1.37.7/32, 224.1.1.1) 
02:56:57: PIM(0): Add FastEthernet0/1/0.0.0.0 to (10.1.37.7, 224.1.1.1), Forward state, by PIM Graft 
02:56:57: PIM(0): Send v2 Graft-Ack on FastEthernet0/1 to 150.1.56.6 
02:56:57: PIM(0): Building Graft message for 224.1.1.1, Serial2/0: no entries 
02:56:57: PIM(0): Building Graft message for 224.1.1.1, FastEthernet0/1: no entries 
02:56:57: PIM(0): Building Graft message for 224.1.1.1, FastEthernet0/0: 
 10.1.37.7/32 
02:56:57: PIM(0): Send v2 Graft to 150.1.15.1 (FastEthernet0/0) 
02:56:58: PIM(0): Received v2 Graft-Ack on FastEthernet0/0 from 150.1.15.1 
02:56:58: Group 224.1.1.1: 
 10.1.37.7/32

Dense tree is built back to the source and traffic begins to flow: 

R3#show ip mroute 224.1.1.1 
<output omitted> 
(*, 224.1.1.1), 00:10:42/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/0, Forward/Dense, 00:10:42/00:00:00 

(10.1.37.7, 224.1.1.1), 00:10:42/00:02:51, flags: T 
    Incoming interface: FastEthernet0/0, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/0, Forward/Dense, 00:10:20/00:00:00

Verification:

R1#show ip mroute 224.1.1.1 
<output omitted> 
(*, 224.1.1.1), 00:15:27/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
         Serial2/1, Forward/Dense, 00:15:27/00:00:00 
         Serial2/0, Forward/Dense, 00:15:27/00:00:00 
         FastEthernet0/0, Forward/Dense, 00:15:27/00:00:00 

(10.1.37.7, 224.1.1.1), 00:15:27/00:02:59, flags: T 
    Incoming interface: Serial2/0, RPF nbr 150.1.13.3 
    Outgoing interface list: 
        FastEthernet0/0, Forward/Dense, 00:15:05/00:00:00 
        Serial2/1, Prune/Dense, 00:02:47/00:00:12

Traffic is still prunted through R2 and R4 as they are not in the SPT from SW1 to SW2:

R2#show ip mroute 224.1.1.1 
<output omitted> 
(*, 224.1.1.1), 00:18:47/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/1, Forward/Dense, 00:18:47/00:00:00 
        FastEthernet0/0, Forward/Dense, 00:18:47/00:00:00

(10.1.37.7, 224.1.1.1), 00:03:02/00:00:06, flags: PT 
     Incoming interface: Serial2/1, RPF nbr 150.1.12.1 
     Outgoing interface list: 
        FastEthernet0/0, Prune/Dense, 00:02:58/00:00:01, A

R4#show ip mroute 224.1.1.1 
<output omitted> 
(*, 224.1.1.1), 00:20:34/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/0, Forward/Dense, 00:20:34/00:00:00 
        FastEthernet0/0, Forward/Dense, 00:20:34/00:00:00 

(10.1.37.7, 224.1.1.1), 00:01:39/00:01:27, flags: PT 
    Incoming interface: Serial2/0, RPF nbr 150.1.45.5 
    Outgoing interface list: 
        FastEthernet0/0, Prune/Dense, 00:01:39/00:01:20

Verification:

R5#show ip mroute 224.1.1.1 
<output omitted> 
(*, 224.1.1.1), 00:23:50/stopped, RP 0.0.0.0, flags: D 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        Serial2/0, Forward/Dense, 00:23:50/00:00:00 
        FastEthernet0/1, Forward/Dense, 00:23:50/00:00:00 
        FastEthernet0/0, Forward/Dense, 00:23:50/00:00:00 

(10.1.37.7, 224.1.1.1), 00:23:50/00:02:52, flags: T 
    Incoming interface: FastEthernet0/0, RPF nbr 150.1.15.1 
    Outgoing interface list: 
        FastEthernet0/1, Forward/Dense, 00:23:28/00:00:00 
        Serial2/0, Prune/Dense, 00:01:45/00:01:14

R6#show ip mroute 224.1.1.1 
<output omitted> 
(*, 224.1.1.1), 00:28:19/stopped, RP 0.0.0.0, flags: DC 
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: 
        FastEthernet0/0, Forward/Dense, 00:26:22/00:00:00 
        FastEthernet0/1, Forward/Dense, 00:28:19/00:00:00 

(10.1.37.7, 224.1.1.1), 00:26:43/00:02:51, flags: T 
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 
    Outgoing interface list: 
        FastEthernet0/0, Forward/Dense, 00:26:22/00:00:00

Traffic flows from SW1 to SW2: 

R6#debug ip mpacket 
04:06:25: IP(0): s=10.1.37.7 (FastEthernet0/1) d=224.1.1.1 (FastEthernet0/0) len 44, 
mforward

Configure IP Multicast with PIM Sparse Mode throughout the OSPF domain with R2 as Rendevous point so that multicast traffic sent from SW1 can be received by SW2.

Configuration:

R1: 
ip multicast-routing 
! 
interface Loopback0 
 ip address 150.1.1.1 255.255.255.255 
! 
interface FastEthernet0/0 
 ip address 150.1.15.1 255.255.255.0 
 ip pim sparse-mode

Configuration:

interface Serial2/0 
 ip address 150.1.13.1 255.255.255.0 
 ip pim sparse-mode 
! 
interface Serial2/1 
 ip address 150.1.12.1 255.255.255.0 
 ip pim sparse-mode 
! 
router ospf 1 
network 0.0.0.0 255.255.255.255 area 0 
! 
ip pim rp-address 150.1.2.2 

R2: 
ip multicast-routing 
! 
interface Loopback0 
 ip address 150.1.2.2 255.255.255.255 
! 
interface FastEthernet0/0 
 ip address 150.1.24.2 255.255.255.0 
 ip pim sparse-mode 
! 
interface Serial2/1 
 ip address 150.1.12.2 255.255.255.0 
 ip pim sparse-mode 
! 
router ospf 1 
 network 0.0.0.0 255.255.255.255 area 0 
! 
ip pim rp-address 150.1.2.2

R3: 
ip multicast-routing 
! 
interface Loopback0 
ip address 150.1.3.3 255.255.255.255 
! 
interface FastEthernet0/0 
ip address 10.1.37.3 255.255.255.0
ip pim sparse-mode 
! 
interface Serial2/0 
ip address 150.1.13.3 255.255.255.0 
ip pim sparse-mode

Configuration:

router ospf 1 
network 0.0.0.0 255.255.255.255 area 0 
! 
ip pim rp-address 150.1.2.2 

R4: 
ip multicast-routing 
! 
interface Loopback0 
 ip address 150.1.4.4 255.255.255.255 
! 
interface FastEthernet0/0 
 ip address 150.1.24.4 255.255.255.0 
 ip pim sparse-mode 
! 
interface Serial2/0 
 ip address 150.1.45.4 255.255.255.0 
 ip pim sparse-mode 
! 
router ospf 1 
 network 0.0.0.0 255.255.255.255 area 0 
! 
ip pim rp-address 150.1.2.2 

R5:
ip multicast-routing 
! 
interface Loopback0 
 ip address 150.1.5.5 255.255.255.255 
! 
interface FastEthernet0/0 
 ip address 150.1.15.5 255.255.255.0 
 ip pim sparse-mode 
! 
interface FastEthernet0/1 
 ip address 150.1.56.5 255.255.255.0 
 ip pim sparse-mode 
! 
interface Serial2/0 
 ip address 150.1.45.5 255.255.255.0 
 ip pim sparse-mode 
! 
router ospf 1 
 network 0.0.0.0 255.255.255.255 area 0 
! 
ip pim rp-address 150.1.2.2

Configuration:

R6: 
ip multicast-routing 
! 
interface Loopback0 
 ip address 150.1.6.6 255.255.255.255 
! 
interface FastEthernet0/0 
 ip address 10.1.68.6 255.255.255.0 
 ip pim sparse-mode 
! 
interface FastEthernet0/1 
 ip address 150.1.56.6 255.255.255.0 
 ip pim sparse-mode 
! 
router ospf 1 
 network 0.0.0.0 255.255.255.255 area 0 
! 
ip pim rp-address 150.1.2.2

SW1: 
ip multicast-routing 
! 
interface Loopback0 
 ip address 150.1.7.7 255.255.255.255 
! 
interface FastEthernet0/0 
 ip address 10.1.37.7 255.255.255.0 
! 
router ospf 1 
 network 0.0.0.0 255.255.255.255 area 0 

SW2: 
ip multicast-routing 
! 
interface Loopback0 
 ip address 150.1.8.8 255.255.255.255 
! 
interface FastEthernet0/0 
 ip address 10.1.68.8 255.255.255.0 
! 
router ospf 1 
 network 0.0.0.0 255.255.255.255 area 0

Verification:

R1#show ip pim neighbor 
PIM Neighbor Table 

Neighbor     Interface          Uptime/Expires      Ver      DR
Address                           Prio/Mode 
150.1.15.5  FastEthernet0/0     00:55:51/00:01:26   v2      1 / DR P 
150.1.13.3  Serial2/0           00:55:55/00:01:28   v2      1 / P 
150.1.12.2  Serial2/1           00:30:06/00:01:42   v2      1 / P


R2#show ip pim neighbor 
PIM Neighbor Table 

Neighbor     Interface          Uptime/Expires      Ver      DR
Address                           Prio/Mode
150.1.24.4   FastEthernet0/0    01:01:40/00:01:41   v2     1 / DR P 
150.1.12.1   Serial2/1          00:35:47/00:01:24   v2     1 / P 


R3#show ip pim neighbor 
PIM Neighbor Table 

Neighbor     Interface          Uptime/Expires      Ver      DR
Address                           Prio/Mode
150.1.13.1   Serial2/0          01:04:54/00:01:39   v2      1 / P
R4#show ip pim neighbor 
PIM Neighbor Table

Neighbor     Interface          Uptime/Expires      Ver      DR
Address                           Prio/Mode
150.1.24.2   FastEthernet0/0    00:23:37/00:01:37   v2      1 / P 
150.1.45.5   Serial2/0          00:29:24/00:01:24   v2      1 / P


R5#show ip pim neighbor 
PIM Neighbor Table 

Neighbor     Interface          Uptime/Expires      Ver      DR
Address                           Prio/Mode
150.1.15.1   FastEthernet0/0    01:08:04/00:01:22   v2      1 / P 
150.1.56.6   FastEthernet0/1    01:07:39/00:01:22   v2      1 / DR P 
150.1.45.4   Serial2/0          00:30:34/00:01:41   v2      1 / P


R6#show ip pim neighbor 
PIM Neighbor Table 

Neighbor     Interface          Uptime/Expires      Ver      DR
Address                           Prio/Mode
150.1.56.5   FastEthernet0/1   01:09:00/00:01:21    v2      1 / P 

Verification:

SW1: Originate multicast feed from source SW1: 
SW1#conf t 
SW1(config)#rtr 1 
SW1(config-rtr)#type udpEcho dest-ipaddr 224.1.1.1 dest-port 12345 
                source-ipaddr 10.1.37.7 control disable 
SW1(config-rtr)#frequency 5 
SW1(config-rtr)#exit 
SW1(config)#rtr schedule 1 start now 
SW1(config)#end 

(10.1.37.7,224.1.1.1) is flooded throughout the network to R6 and pruned back to R3 as there are no receivers:

R3: The PIM DR, sends unicast register message to R2, the RP 
R3#debug ip pim 
PIM debugging is on 
R3# 
00:04:51: PIM(0): Send v2 Register to 150.1.2.2 for 10.1.37.7, group 224.1.1.1 
00:04:52: PIM(0): Received v2 Register-Stop on Serial2/0 from 150.1.2.2 
00:04:52: PIM(0): for source 10.1.37.7, group 224.1.1.1 
00:04:52: PIM(0): Clear register flag to 150.1.2.2 for (10.1.37.7/32, 224.1.1.1) 

R3 and R2 have the (*,G) and (S,G) entry for 224.1.1.1.
Other devices do not have these entries since there are no receivers:

R3#show ip mroute 224.1.1.1
<output omitted>

(*, 224.1.1.1), 00:23:45/stopped, RP 150.1.2.2, flags: SPF
    Incoming interface: Serial2/0, RPF nbr 150.1.13.1 
    Outgoing interface list: Null

(10.1.37.7, 224.1.1.1), 00:26:13/00:02:52, flags: PFT
    Incoming interface: FastEthernet0/0, RPF nbr 0.0.0.0 
    Outgoing interface list: Null

Verification:

R2#show ip mroute 224.1.1.1
<output omitted>

(*, 224.1.1.1), 00:31:29/00:00:38, RP 150.1.2.2, flags: SP
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: Null

(10.1.37.7, 224.1.1.1), 00:27:40/00:01:22, flags: PT
    Incoming interface: Serial2/1, RPF nbr 150.1.12.1
    Outgoing interface list: Null

R1#show ip mroute 224.1.1.1 
Group 224.1.1.1 not found

R4#show ip mroute 224.1.1.1 
Group 224.1.1.1 not found

R5#show ip mroute 224.1.1.1 
Group 224.1.1.1 not found

R6#show ip mroute 224.1.1.1 
Group 224.1.1.1 not found


SW2: Sends join message to requests traffic from the group 224.1.1.1: 
SW2#conf t
SW2(config)#int FastEthernet0/0
SW2(config-if)#ip igmp join-group 224.1.1.1 
SW2(config-if)#end

Verification:

R6: Forwards the PIM join message upstream towards the RP: 

R6#debug ip pim
01:31:12: PIM(0): Check RP 150.1.2.2 into the (*, 224.1.1.1) entry
01:31:12: PIM(0): Building Triggered Join/Prune message for 224.1.1.1 
01:31:12: PIM(0): Insert (*,224.1.1.1) join in nbr 150.1.56.5's queue 
01:31:12: PIM(0): Building Join/Prune packet for nbr 150.1.56.5
01:31:12: PIM(0): Adding v2 (150.1.2.2/32, 224.1.1.1), WC-bit, RPT-bit, S-bit Join
01:31:12: PIM(0): Send v2 join/prune to 150.1.56.5 (FastEthernet0/1) 

Shortest Path Tree is built from SW1 to R3, R1, R5, R6, SW2:


R3#show ip mroute
<output omitted>

(*, 224.1.1.1), 00:01:20/stopped, RP 150.1.2.2, flags: SPF
    Incoming interface: Serial2/0, RPF nbr 150.1.13.1 
    Outgoing interface list: Null

(10.1.37.7, 224.1.1.1), 00:00:50/00:03:25, flags: FT
    Incoming interface: FastEthernet0/0, RPF nbr 0.0.0.0 
    Outgoing interface list:
         Serial2/0, Forward/Sparse, 00:00:29/00:03:01

R1#show ip mroute
<output omitted>

(*, 224.1.1.1), 00:00:29/stopped, RP 150.1.2.2, flags: SP
    Incoming interface: Serial2/1, RPF nbr 150.1.12.2 
    Outgoing interface list: Null

(10.1.37.7, 224.1.1.1), 00:00:29/00:03:16, flags: T
    Incoming interface: Serial2/0, RPF nbr 150.1.13.3
    Outgoing interface list:
        FastEthernet0/0, Forward/Sparse, 00:00:19/00:03:10

Verification:

R5#show ip mroute
<output omitted>

(*, 224.1.1.1), 00:07:27/00:02:56, RP 150.1.2.2, flags: S
    Incoming interface: Serial2/0, RPF nbr 150.1.45.4 
    Outgoing interface list:
        FastEthernet0/1, Forward/Sparse, 00:07:27/00:02:56

(10.1.37.7, 224.1.1.1), 00:07:18/00:03:23, flags: T
    Incoming interface: FastEthernet0/0, RPF nbr 150.1.15.1   Outgoing interface list:
       FastEthernet0/1, Forward/Sparse, 00:07:18/00:02:56


R6#show ip mroute
<output omitted>

(*, 224.1.1.1), 00:01:25/stopped, RP 150.1.2.2, flags: SJC
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse, 00:01:25/00:02:30

(10.1.37.7, 224.1.1.1), 00:00:20/00:02:58, flags: JT
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse, 00:00:20/00:02:39

R6: Forwards multicast feed to SW2:

R6(config)#int FastEthernet0/1 
R6(config-if)#no ip mroute-cache 
R6(config-if)#do debug ip mpacket


IP multicast packets debugging is on

00:14:46: IP(0): s=10.1.37.7 (FastEthernet0/1) d=224.1.1.1 (FastEthernet0/0) len 44, mforward

Configure IP Multicast with PIM Dense Mode throughout the OSPF domain except between R1 and R5. Configure static multicast routes so that multicast traffic sent from SW1 can be received by SW2.

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.15.1 255.255.255.0

Configuration:

interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim dense-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim dense-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim dense-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim dense-mode

Configuration:

router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim dense-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip mroute 10.1.37.0 255.255.255.0 150.1.24.2

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.15.5 255.255.255.0
ip pim dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim dense-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip mroute 10.1.37.0 255.255.255.0 150.1.45.4

Configuration:

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

SW1: Originate multicast feed from source SW1:
SW1#conf t SW1(config)#rtr 1
SW1(config-rtr)#type udpEcho dest-ipaddr 224.1.1.1 dest-port 12345
               source-ipaddr 10.1.37.7 control disable
SW1(config-rtr)#frequency 5 
SW1(config-rtr)#exit 
SW1(config)#rtr schedule 1 start now 
SW1(config)#end

SW2 requests to traffic for the group 224.1.1.1: 

SW2#conf t
SW2(config)#int fa0/0
SW2(config-if)#ip igmp join-group 224.1.1.1 
SW2(config-if)#end

Before static mroute R4 drops traffic due to RPF failure:

R4#show ip mroute 224.1.1.1
<output omitted>

(*, 224.1.1.1), 00:01:09/stopped, RP 0.0.0.0, flags: D
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        Serial2/0, Forward/Dense, 00:01:09/00:00:00 FastEthernet0/0, Forward/Dense, 00:01:09/00:00:00


Incoming multicast interface is Serial2/0
(10.1.37.7, 224.1.1.1), 00:01:09/00:01:51, flags:
    Incoming interface: Serial2/0, RPF nbr 150.1.45.5 
    Outgoing interface list:
        FastEthernet0/0, Forward/Dense, 00:01:09/00:00:00

Incoming unicast interface is FastEthernet0/0:
R4#sho ip route 10.1.37.7
Routing entry for 10.1.37.0/24
 Known via "ospf 1", distance 110, metric 98, type intra area Last update from 150.1.24.2 on FastEthernet0/0, 00:08:31 ago Routing Descriptor Blocks:
 * 150.1.45.5, from 150.1.7.7, 00:08:31 ago, via Serial2/0     Route metric is 98, traffic share count is 1
150.1.24.2, from 150.1.7.7, 00:08:31 ago, via FastEthernet0/0 Route metric is 98, traffic share count is 1

Verification:

R4#conf t
R4(config)#interface Fastethernet0/0 
R4(config-if)#no ip mroute-cache 
R4(config-if)#do debug ip mpacket
IP multicast packets debugging is on


Packets are dropped due to RPF failure:
00:18:02: IP(0): s=10.1.37.7 (FastEthernet0/0) d=224.1.1.1 len 60, not RPF interface


R4#show ip mroute count IP Multicast Statistics
3 routes using 1976 bytes of memory
2 groups, 0.50 average sources per group
Forwarding Counts: Pkt Count/Pkts per second/Avg Pkt Size/Kilobits per second Other counts: Total/RPF failed/Other drops(OIF-null, rate-limit etc)

 Group: 224.1.1.1, Source count: 1, Group pkt count: 0
   Source: 10.1.37.7/32, Forwarding: 0/0/0/0, Other: 11/11/0


Static mroute is configured to bypass RPF check:
R4(config)#ip mroute 10.1.37.0 255.255.255.0 150.1.24.2
R4(config)#end


00:27:42: IP(0): s=10.1.37.7 (FastEthernet0/0) d=224.1.1.1 (Serial2/0) len 44, mforward

R5: expects multicast packet in FastEthernet0/0 from R1 but receives it from R4:

R5#debug ip mpacket
00:32:32: IP(0): s=10.1.37.7 (Serial2/0) d=224.1.1.1 len 48, not RPF interface

R5#debug ip mpacket
00:32:32: IP(0): s=10.1.37.7 (Serial2/0) d=224.1.1.1 len 48, not RPF interface

R5#show ip route 10.1.37.7 Routing entry for 10.1.37.0/24
 Known via "ospf 1", distance 110, metric 50, type intra area Last update from 150.1.15.1 on FastEthernet0/0, 00:36:53 ago Routing Descriptor Blocks:
 * 150.1.15.1, from 150.1.7.7, 00:36:53 ago, via FastEthernet0/0 Route metric is 50, traffic share count is 1

Verification:

Static mroute overrides RPF check:
R5#conf t
R5(config)#ip mroute 10.1.37.0 255.255.255.0 150.1.45.4
 
IP(0): s=10.1.37.7 (Serial2/0) d=224.1.1.1 (FastEthernet0/1), len=44(44), mforward

Traffic is now delivered to SW2:

R6#debug ip mpacket
IP multicast packets debugging is on
00:58:52: IP(0): s=10.1.37.7 (FastEthernet0/1) d=224.1.1.1 (FastEthernet0/0) len 44, mforward

R6#show ip mroute 224.1.1.1
<output omitted>

(*, 224.1.1.1), 00:52:25/stopped, RP 0.0.0.0, flags: DC
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        FastEthernet0/0, Forward/Dense, 00:05:36/00:00:00 FastEthernet0/1, Forward/Dense, 00:17:43/00:00:00

(10.1.37.7, 224.1.1.1), 00:17:36/00:02:57, flags: T
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Dense, 00:05:36/00:00:00

Configure IP Multicast with PIM Sparse-Dense and Auto-RP throughout the OSPF domain so that multicast traffic sent from SW1 can be received by SW2. R1 should be RP and R5 should be mapping agent.

Note: In Auto-RP the RP announces itself to discovery agent using address 224.0.0.39 and in turn mapping agent uses 224.0.0.40 to tell other routers. For RP announce and Discovery dense mode is used hence it is recomended to use Ip pim sparse-dense-mode. or you can use ip pim autorp listener that allows the device to listen to and propagate mapping messages even if no RP for the group exists.

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.15.1 255.255.255.0
ip pim sparse-dense-mode

Configuration:

interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim send-rp-announce Loopback0 scope 16

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim sparse-dense-mode

Configuration:

router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.15.5 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim send-rp-discovery Loopback0 scope 16

Configuration:

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

R1 advertises itself to the mapping agent via 224.0.1.39:
**Note:** 224.0.1.39 and 224.0.1.40 use the dense mode for RP announce and Discovery hence we are using PIM Sparse-dense mode

R5#show ip mroute 224.0.1.39
<output omitted>

(*, 224.0.1.39), 00:25:49/stopped, RP 0.0.0.0, flags: DCL
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        
        Serial2/0, Forward/Sparse-Dense, 00:25:49/00:00:00 FastEthernet0/1, Forward/Sparse-Dense, 00:25:49/00:00:00 FastEthernet0/0, Forward/Sparse-Dense, 00:25:49/00:00:00

(150.1.1.1, 224.0.1.39), 00:25:49/00:02:16, flags: LT
    Incoming interface: FastEthernet0/0, RPF nbr 150.1.15.1 Outgoing interface list:
        FastEthernet0/1, Forward/Sparse-Dense, 00:24:21/00:00:00        
        Serial2/0, Forward/Sparse-Dense, 00:24:21/00:00:00

R5 advertises R1 as the RP to all other routers via 224.0.1.40: 

R3#show ip mroute 224.0.1.40
<output omitted>

(*, 224.0.1.40), 00:03:46/stopped, RP 0.0.0.0, flags: DCL
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        Serial2/0, Forward/Sparse-Dense, 00:03:46/00:00:00 FastEthernet0/0, Forward/Sparse-Dense, 00:03:46/00:00:00

(150.1.5.5, 224.0.1.40), 00:03:24/00:02:39, flags: LT
    Incoming interface: Serial2/0, RPF nbr 150.1.13.1 
    Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 00:03:24/00:00:00

R1 is assigned as the RP via Auto-RP:

R3#show ip pim rp mapping 
PIM Group-to-RP Mappings

Group(s) 224.0.0.0/4 RP 150.1.1.1 (?), v2v1
Info source: 150.1.5.5 (?), elected via Auto-RP Uptime: 00:21:20, expires: 00:02:29

Verification:

SW1: Originate multicast feed from source SW1; R3 registers the source with the RP: SW1#conf t
SW1(config)#rtr 1
SW1(config-rtr)#type udpEcho dest-ipaddr 224.1.1.1 dest-port 12345  
                source-ipaddr 10.1.37.7 control disable
SW1(config-rtr)#frequency 5 
SW1(config-rtr)#exit 
SW1(config)#rtr schedule 1 start now 
SW1(config)#end

R3#debug ip pim
00:01:13: PIM(0): Check RP 150.1.1.1 into the (*, 224.1.1.1) entry
00:01:13: PIM(0): Send v2 Register to 150.1.1.1 for 10.1.37.7, group 224.1.1.1 
00:01:14: PIM(0): Received v2 Register-Stop on Serial2/0 from 150.1.1.1 
00:01:14: PIM(0):  for source 10.1.37.7, group 224.1.1.1
00:01:14: PIM(0): Clear register flag to 150.1.1.1 for (10.1.37.7/32, 224.1.1.1)

SW2: joins group and R6 sends PIM Join upstream towards RP:

SW2(config)#int fa0/0
SW2(config-if)#ip igmp join-group 224.1.1.1

R6#debug ip pim PIM debugging is on
00:03:42: PIM(0): Insert (10.1.37.7,224.1.1.1) join in nbr 150.1.56.5's queue
00:03:42: PIM(0): Building Join/Prune packet for nbr 150.1.56.5 00:03:42: PIM(0): Adding v2 (10.1.37.7/32, 224.1.1.1), S-bit Join
00:03:42: PIM(0): Send v2 join/prune to 150.1.56.5 (FastEthernet0/1)

Multicast traffic flows from SW1 to SW2:

R6(config)#int f0/1
R6(config-if)#no ip mroute-cache 
R6(config-if)#do debug ip mpacket

IP multicast packets debugging is on
00:14:32: IP(0): s=10.1.37.7 (FastEthernet0/1) d=224.1.1.1 (FastEthernet0/0) len 44, mforward

Verification:

224.0.1.39 and 224.0.1.40 are in PIM Dense mode All other groups are Sparse:

R6#show ip mroute
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 
    V - RD & Vector, v - Vector

(*, 224.1.1.1), 00:13:49/stopped, RP 150.1.1.1, flags: SJC
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 00:13:49/00:02:38

(10.1.37.7, 224.1.1.1), 00:13:43/00:02:55, flags: JT
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 00:13:43/00:02:38

(*, 224.0.1.39), 00:17:12/stopped, RP 0.0.0.0, flags: DC
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        FastEthernet0/1, Forward/Sparse-Dense, 00:17:12/00:00:00

(150.1.1.1, 224.0.1.39), 00:00:08/00:02:51, flags: PTX
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list: Null

(*, 224.0.1.40), 00:17:23/stopped, RP 0.0.0.0, flags: DCL
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 00:17:23/00:00:00 FastEthernet0/1, Forward/Sparse-Dense, 00:16:54/00:00:00

(150.1.5.5, 224.0.1.40), 00:16:15/00:02:41, flags: LT
     Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 00:16:15/00:00:00

Configure IP Multicast with PIM Sparse-Dense and Auto-RP throughout the OSPF domain so that multicast traffic sent from SW1 can be received by SW2. R2 should be RP for group 224.0.0.0/5 and R4 should be RP for group 232.0.0.0/5. R5 should be mapping agent.

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.15.1 255.255.255.0
ip pim sparse-dense-mode

Configuration:

interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim send-rp-announce Loopback0 scope 16 group-list 1 access-list 1 permit 224.0.0.0 7.255.255.255

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim sparse-dense-mode

Configuration:

router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
Ip pim send-rp-announce loopback0 scope 16 group-list 1 access-list 1 permit 232.0.0.0 7.255.255.255

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
Ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.15.5 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim send-rp-discovery Loopback0 scope 16

Configuration:

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

R2 and R4 advertises themselves to the mapping agent via 224.0.1.39:

(*, 224.0.1.39), 00:03:56/stopped, RP 0.0.0.0, flags: DCL
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        Loopback0, Forward/Sparse-Dense, 00:02:48/00:00:00 Serial2/0, Forward/Sparse-Dense, 00:03:56/00:00:00 FastEthernet0/1, Forward/Sparse-Dense, 00:03:56/00:00:00 
        FastEthernet0/0, Forward/Sparse-Dense, 00:03:56/00:00:00

(150.1.2.2, 224.0.1.39), 00:03:01/00:02:58, flags: LT
    Incoming interface: Serial2/0, RPF nbr 150.1.45.4 
    Outgoing interface list:
        Loopback0, Forward/Sparse-Dense, 00:02:48/00:00:00 FastEthernet0/0, Forward/Sparse-Dense, 00:00:00/00:00:00 
        FastEthernet0/1, Forward/Sparse-Dense, 00:03:01/00:00:00

(150.1.4.4, 224.0.1.39), 00:03:07/00:02:55, flags: LT
    Incoming interface: Serial2/0, RPF nbr 150.1.45.4 
    Outgoing interface list:
        Loopback0, Forward/Sparse-Dense, 00:02:48/00:00:00 FastEthernet0/0, Forward/Sparse-Dense, 00:03:10/00:00:00 
        FastEthernet0/1, Forward/Sparse-Dense, 00:03:10/00:00:00

R5 advertises R1 as the RP to all other routers via 224.0.1.40: 

R3#show ip mroute 224.0.1.40
<output omitted>

(*, 224.0.1.40), 01:04:58/stopped, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
    Serial2/0, Forward/Sparse-Dense, 01:04:28/00:00:00          
        FastEthernet0/0, Forward/Sparse-Dense, 01:04:58/00:00:00

(150.1.5.5, 224.0.1.40), 00:08:28/00:02:34, flags: LT
    Incoming interface: Serial2/0, RPF nbr 150.1.13.1 
    Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 00:08:28/00:00:00

Verification:

R2 and R4 are assigned as the RP’s via Auto-RP: 

R3#show ip pim rp mapping
PIM Group-to-RP Mappings 

Group(s) 224.0.0.0/5 
 RP 150.1.2.2 (?), v2v1 
    Info source: 150.1.5.5 (?), elected via Auto-RP
        Uptime: 00:42:42, expires: 00:02:55 
Group(s) 232.0.0.0/5 
 RP 150.1.4.4 (?), v2v1 
    Info source: 150.1.5.5 (?), elected via Auto-RP
        Uptime: 00:43:08, expires: 00:02:34


SW1: Originate multicast feed from source SW1; 
SW1#conf t 
SW1(config)#rtr 1 
SW1(config-rtr)#type udpEcho dest-ipaddr 224.1.1.1 dest-port 12345 
                source-ipaddr 10.1.37.7 control disable 
SW1(config-rtr)#frequency 5 
SW1(config-rtr)#exit 
SW1(config)#rtr schedule 1 start now 
SW1(config)#end 
SW1(config)#rtr 2 
SW1(config-rtr)#type udpEcho dest-ipaddr 232.1.1.1 dest-port 12345 
                source-ipaddr 10.1.37.7 control disable 
SW1(config-rtr)#frequency 5 
SW1(config-rtr)#exit 
SW1(config)#rtr schedule 2 start now 
SW1(config)#end

Verification:

R3#debug ip pim
01:24:40: PIM(0): Check RP 150.1.2.2 into the (*, 224.1.1.1) entry
01:24:40: PIM(0): Send v2 Register to 150.1.2.2 for 10.1.37.7, group 224.1.1.1 
01:24:40: PIM(0): Received v2 Register-Stop on Serial2/0 from 150.1.2.2 
01:24:40: PIM(0):  for source 10.1.37.7, group 224.1.1.1
01:24:40: PIM(0): Clear register flag to 150.1.2.2 for (10.1.37.7/32, 224.1.1.1)
01:25:26: PIM(0): Check RP 150.1.4.4 into the (*, 232.1.1.1) entry
01:25:26: PIM(0): Send v2 Register to 150.1.4.4 for 10.1.37.7, group 232.1.1.1 
01:25:27: PIM(0): Received v2 Register-Stop on Serial2/0 from 150.1.4.4 
01:25:27: PIM(0):  for source 10.1.37.7, group 232.1.1.1
01:25:27: PIM(0): Clear register flag to 150.1.4.4 for (10.1.37.7/32, 232.1.1.1)


SW2: joins group and R6 sends PIM Join upstream towards RP:

SW2(config)#int fa0/0
SW2(config-if)#ip igmp join-group 224.1.1.1 SW2(config-if)#ip igmp join-group 232.1.1.1

R6#debug ip pim PIM debugging is on
01:44:14: PIM(0): Adding v2 (10.1.37.7/32, 224.1.1.1), S-bit Join
01:44:14: PIM(0): Send v2 join/prune to 150.1.56.5 (FastEthernet0/1) 
01:44:14: PIM(0): Received RP-Reachable on FastEthernet0/1 from 150.1.2.2 
01:44:14:	for group 224.1.1.1
01:47:13: PIM(0): Adding v2 (10.1.37.7/32, 232.1.1.1), S-bit Join
01:47:13: PIM(0): Send v2 join/prune to 150.1.56.5 (FastEthernet0/1) 
01:47:14: PIM(0): Received RP-Reachable on FastEthernet0/1 from 150.1.2.2 
01:47:14:	for group 224.1.1.1


Multicast traffic flows from SW1 to SW2:

R6(config)#int f0/1
R6(config-if)#no ip mroute-cache 
R6(config-if)#do debug ip mpacket

01:56:33: IP(0): s=10.1.37.7 (FastEthernet0/1) d=224.1.1.1 (FastEthernet0/0) len 80, mforward
01:56:34: IP(0): s=10.1.37.7 (FastEthernet0/1) d=232.1.1.1 (FastEthernet0/0) len 80, mforward

Verification:

224.0.1.39 and 224.0.1.40 are in PIM Dense mode All other groups are Sparse:

R6#show ip mroute

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 
    V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 232.1.1.1), 03:18:06/00:02:59, RP 150.1.4.4, flags: SJC 
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 03:18:06/00:02:59

(*, 224.1.1.1), 03:18:09/00:02:56, RP 150.1.2.2, flags: SJC
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 03:18:09/00:02:56

(*, 224.0.1.39), 04:38:26/stopped, RP 0.0.0.0, flags: DC
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        FastEthernet0/1, Forward/Sparse-Dense, 04:38:26/00:00:00

(150.1.2.2, 224.0.1.39), 00:00:09/00:02:50, flags: PTX
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list: Null

(150.1.4.4, 224.0.1.39), 00:01:09/00:01:50, flags: PTX
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list: Null

Verification:

(*, 224.0.1.40), 05:02:17/stopped, RP 0.0.0.0, flags: DCL
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 05:02:17/00:00:00 
        FastEthernet0/1, Forward/Sparse-Dense, 05:01:48/00:00:00

(150.1.5.5, 224.0.1.40), 04:05:41/00:02:26, flags: LT
    Incoming interface: FastEthernet0/1, RPF nbr 150.1.56.5 Outgoing interface list:
        FastEthernet0/0, Forward/Sparse-Dense, 04:05:41/00:00:00

Configure IP Multicast with PIM Sparse-Dense and Auto-RP throughout the OSPF domain so that multicast traffic sent from SW1 can be received by SW2. R2 should be RP for group 224.0.0.0/5 and R4 should be RP for group 232.0.0.0/5. R5 should be mapping agent and should prevent any additional devices from being elected as RPs.

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.15.1 255.255.255.0
ip pim sparse-dense-mode

Configuration:

interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim send-rp-announce Loopback0 scope 16 group-list 1 access-list 1 permit 224.0.0.0 7.255.255.255

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim sparse-dense-mode

Configuration:

router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
Ip pim send-rp-announce loopback0 scope 16 group-list 1 access-list 1 permit 232.0.0.0 7.255.255.255

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
Ip pim sparse-dense-mode
!
interface FastEthernet0/0
ip address 150.1.15.5 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim sparse-dense-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!

Configuration:

!
ip pim send-rp-discovery Loopback0 scope 16
ip pim rp-announce-filter rp-list R2_LOOPBACK group-list R2_GROUPS ip pim rp-announce-filter rp-list R4_LOOPBACK group-list R4_GROUPS ip pim rp-announce-filter rp-list ALL_OTHER_RPS group-list NO_GROUPS
!
ip access-list standard ALL_OTHER_RPS deny 150.1.2.2
deny 150.1.4.4 permit any
!
ip access-list standard NO_GROUPS deny 224.0.0.0 3.255.255.255
!
ip access-list standard R2_GROUPS permit 224.0.0.0 7.255.255.255
!
ip access-list standard R2_LOOPBACK permit 150.1.2.2
!
ip access-list standard R4_GROUPS permit 232.0.0.0 7.255.255.255
!
ip access-list standard R4_LOOPBACK permit 150.1.4.4

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Configuration:

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

R1 and R3 advertise themselves as “rogue” RPs but are filtered by R5:

R1(config)#int lo0
R1(config-if)#ip pim sparse-dense-mode
R1(config)#ip pim send-rp-announce loopback0 scope 16


R3(config)#int lo0
R3(config-if)#ip pim sparse-dense-mode
R3(config)#ip pim send-rp-announce loopback0 scope 16

R5#debug ip pim auto-rp 
PIM Auto-RP debugging is on
01:13:17: Auto-RP(0): Received RP-announce, from 150.1.1.1, RP_cnt 1, ht 181 
01:13:17: Auto-RP(0): Filtered 224.0.0.0/4 for RP 150.1.1.1
01:13:23: Auto-RP(0): Received RP-announce, from 150.1.3.3, RP_cnt 1, ht 181 
01:13:23: Auto-RP(0): Filtered 224.0.0.0/4 for RP 150.1.3.3

R2 and R4 are accepted by the filter on R5:

R5#debug ip pim auto-rp 
PIM Auto-RP debugging is on
01:10:33: Auto-RP(0): Received RP-announce, from 150.1.2.2, RP_cnt 1, ht 181 
01:10:33: Auto-RP(0): Update (224.0.0.0/5, RP:150.1.2.2), PIMv2 v1
01:10:39: Auto-RP(0): Received RP-announce, from 150.1.4.4, RP_cnt 1, ht 181 
01:10:39: Auto-RP(0): Update (232.0.0.0/5, RP:150.1.4.4), PIMv2 v1


R5#show ip pim rp mapping 

PIM Group-to-RP Mappings
This system is an RP-mapping agent (Loopback0)

Group(s) 224.0.0.0/5
  RP 150.1.2.2 (?), v2v1
    Info source: 150.1.2.2 (?), elected via Auto-RP 
        Uptime: 01:21:43, expires: 00:02:42
Group(s) 232.0.0.0/5
  RP 150.1.4.4 (?), v2v1
    Info source: 150.1.4.4 (?), elected via Auto-RP 
        Uptime: 01:22:56, expires: 00:02:30

Configure IP Multicast with PIM Sparse and Auto-RP throughout the OSPF domain so that multicast traffic sent from SW1 can be received by SW2. R2 should be RP for group 224.0.0.0/5. R5 should be mapping agent. Groups outside should not fall back to dense mode.

Note: The ip pim autorp listener is mandatory command in Pim sparse AutoRP mode. This command allows the Group 224.0.0.39 & 224.0.0.40 to be densed flooded. This command is used when pim-dense mode is not configured. As the RP announces 224.0.0.39 to the mapping agent and the mapping agent announces 224.0.0.40 to all routers part of the group. when using autoRP to propagate groups to RP mappings you face the following problem: - mapping messages are sent with destination address 224.0.1.40, i.e. for group 224.0.1.40. But if the links are configured with sparse-mode and no RP for 224.0.1.40 exists then this group will not work. (In Auto-RP the two ip's 224.0.0.39 and 224.0.0.40 use the dense mode for RP announce and Discovery hence it is recomended to use Ip pim sparse-dense-mode) - or you can use ip pim autorp listener that allows the device to listen to and propagate mapping messages even if no RP for the group exists. Comments from cisco: "To cause IP multicast traffic for the two Auto-RP groups 224.0.1.39 and 224.0.1.40 to be PIM dense mode flooded across interfaces operating in PIM sparse mode, use the ip pim autorp listener command in global configuration mode.

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.15.1 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim sparse-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim autorp listener

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
ip pim sparse-mode
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim sparse-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim send-rp-announce Loopback0 scope 16 group-list 1 access-list 1 permit 224.0.0.0 7.255.255.255
!
ip pim autorp listener

Configuration:

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim autorp listener

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim autorp listener

Configuration:

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
Ip pim sparse-mode
!
interface FastEthernet0/0
ip address 150.1.15.5 255.255.255.0
ip pim sparse-mode
!
interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim send-rp-discovery Loopback0 scope 16
!
ip pim autorp listener

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim sparse-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim autorp listener

Configuration:

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255

interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

Multicast routers only have an RP for 224.0.0.0/5:

R3#show ip pim rp mapping PIM 
Group-to-RP Mappings 
Group(s) 224.0.0.0/5
  RP 150.1.2.2 (?), v2v1
    Info source: 150.1.15.5 (?), elected via Auto-RP 
        Uptime: 00:01:19, expires: 00:02:36

SW1 generates traffic to 224.1.1.1 and 232.1.1.1:

SW1(config)#rtr 1
SW1(config-rtr)#type udpEcho dest-ipaddr 224.1.1.1 dest-port 12345 source-ipaddr
10.1.37.7 control disable SW1(config-rtr-udp)#frequency 5

SW1(config)#rtr 2
SW1(config-rtr)#type udpEcho dest-ipaddr 232.1.1.1 dest-port 12345 source-ipaddr
10.1.37.7 control disable SW1(config-rtr-udp)#frequency 5

SW1(config)#rtr schedule 1 start after 00:00:05
SW1(config)#rtr schedule 2 start after 00:00:05 
SW1(config)#end

R3 registers (10.1.37.7,224.1.1.1) but (10.1.37.7,232.1.1.1) is dropped

R3#debug ip pim
00:08:31: PIM(0): Check RP 150.1.2.2 into the (*, 224.1.1.1) entry
00:08:31: PIM(0): Send v2 Register to 150.1.2.2 for 10.1.37.7, group 224.1.1.1 
00:08:31: PIM(0): Received v2 Register-Stop on Serial2/0 from 150.1.2.2 
00:08:31: PIM(0):  for source 10.1.37.7, group 224.1.1.1
00:08:31: PIM(0): Clear register flag to 150.1.2.2 for (10.1.37.7/32, 224.1.1.1)

Traffic for 224.1.1.1 flows but 232.1.1.1 is dropped: 
Sw2(config)# int fa0/0
Sw2(config)#ip igmp join 224.1.1.1 
Sw2(config)#ip igmp join 232.1.1.1

R3#conf t
Enter configuration commands, one per line. End with CNTL/Z. 
R3(config)#int F0/0
R3(config-if)#no ip mroute-cache 
R3(config-if)#do debug ip mpacket

Verification:

IP multicast packets debugging is on

00:30:20: IP(0): s=10.1.37.7 (FastEthernet0/0) d=224.1.1.1 (Serial2/0) len 44, mforward 00:30:30: IP(0): s=10.1.37.7 (FastEthernet0/0) d=232.1.1.1 len 60, RPF lookup failed for source or RP

Only 224.0.1.39 and 224.0.1.40 are allow to run in dense mode: 

R3#show ip mroute
<output omitted>
(*, 232.1.1.1), 00:00:21/00:02:38, RP 0.0.0.0, flags: SP
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list: Null

(*, 224.1.1.1), 00:35:10/stopped, RP 150.1.2.2, flags: SPF
    Incoming interface: Serial2/0, RPF nbr 150.1.13.1 
    Outgoing interface list: Null

(10.1.37.7, 224.1.1.1), 00:35:10/00:03:28, flags: FT
  Incoming interface: FastEthernet0/0, RPF nbr 0.0.0.0
  Outgoing interface list:
    Serial2/0, Forward/Sparse, 00:20:19/00:03:03

(*, 224.0.1.39), 00:40:35/stopped, RP 0.0.0.0, flags: D
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        Serial2/0, Forward/Sparse, 00:40:35/00:00:00

(150.1.2.2, 224.0.1.39), 00:01:25/00:01:34, flags: PT
    Incoming interface: Serial2/0, RPF nbr 150.1.13.1 Outgoing interface list: Null

(*, 224.0.1.40), 00:41:21/stopped, RP 0.0.0.0, flags: DCL
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        Loopback0, Forward/Sparse, 00:41:21/00:00:00 
        Serial2/0, Forward/Sparse, 00:41:21/00:00:00

(150.1.15.5, 224.0.1.40), 00:40:36/00:02:57, flags: LT
    Incoming interface: Serial2/0, RPF nbr 150.1.13.1 
    Outgoing interface list:
        Loopback0, Forward/Sparse, 00:40:36/00:00:00

Configure IP Multicast with PIM Sparse and BSR throughout the OSPF domain so that multicast traffic sent from SW1 can be received by SW2. R1 should be RP and R5 should be BSR.

Note: There are two ways to configure the routers to use an RP. 1) To statically define the RP This method has two important administrative problems. If you ever want to change the RP to another router, you have to change it separately in every router, and it lacks the ability to automatically switch to a backup RP in case of failure. 2) The alternative is to configure the network to discover the RP dynamically; there are two ways to accomplish this. One uses a Cisco proprietary method called Auto-RP, and the other called the Bootstrap Router method, which is part of the open PIM-SM standard defined in RFC 4601.

In BSR router there are two important commands that define how it will advertise itself. The first is ip pim rp-candidate, which allows the router to advertise itself as a possible RP. If there are several candidate RP routers, the PIM-SM algorithm prefers the one with the highest IP address. Next important command is ip pim bsr-candidate, This allows the router to act as BSRs which are responsible for distributing information about all of the known candidate RPs throughout the network

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
ip pim sparse-mode
!
interface FastEthernet0/0
ip address 150.1.15.1 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim sparse-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim rp-candidate Loopback0

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim sparse-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Configuration:

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
Ip pim sparse-mode
!
interface FastEthernet0/0
ip address 150.1.15.5 255.255.255.0
ip pim sparse-mode
!

Configuration:

interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim bsr-candidate Loopback0

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim sparse-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Configuration:

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

R1 advertises itself to the BSR as an RP Candidate: 

R5#show ip pim bsr-router

PIMv2 Bootstrap information
This system is the Bootstrap Router (BSR) 
    BSR address: 150.1.5.5 (?)
    Uptime:	00:05:12, BSR Priority: 0, Hash mask length: 0 Next bootstrap message in 00:00:48

R5#show ip pim rp mapping PIM Group-to-RP Mappings
This system is the Bootstrap Router (v2) Group(s) 224.0.0.0/4
  RP 150.1.1.1 (?), v2
    Info source: 150.1.15.1 (?), via bootstrap, priority 0, holdtime 150
        Uptime: 00:06:41, expires: 00:01:47

R6#show ip pim rp mapping 
PIM Group-to-RP Mappings 
Group(s) 224.0.0.0/4
    RP 150.1.1.1 (?), v2
        Info source: 150.1.5.5 (?), via bootstrap, priority 0, holdtime 150
            Uptime: 00:09:09, expires: 00:01:32

Configure IP Multicast with MSDP between R2 and R4 so that multicast traffic sent from SW1 in AS1 can be received by SW2 in AS2.

Note: MSDP: Multicast Source Discovery Protocol - MSDP describes a mechanism to connect multiple PIM-SM domains together. Each PIM-SM domain uses its own independent RP(s) and does not have to depend on RPs in other domains. Advantages include:

-No Third-party resource dependencies. PIM-SM domains can rely on their own RPs only. -Domains with only receivers get data without globally advertising group membership.

MSDP-speaking routers have a MSDP peering relationship with MSDP peers in another domain. Each domain has one or more connections to this virtual topology. The purpose of this topology is to allow domains to discover multicast sources from other domains. If the multicast sources are of interest to a domain which has receivers, the normal source-tree building mechanism in PIM-SM will be used to deliver multicast data over an inter-domain distribution tree.

Configuration:

R1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.1.1 255.255.255.255
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.13.1 255.255.255.0
ip pim sparse-mode
!
interface Serial2/1
ip address 150.1.12.1 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim rp-address 150.1.24.2

R2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.2 255.255.255.0
ip pim sparse-mode
!
interface Serial2/1
ip address 150.1.12.2 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 1
redistribute ospf 1
neighbor 150.1.24.4 remote-as 2
!
ip pim rp-address 150.1.24.2
ip msdp peer 150.1.24.4 remote-as 2

Configuration:

R3:
ip multicast-routing
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.3 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.13.3 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
!
ip pim rp-address 150.1.24.2

R4:
ip multicast-routing
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 150.1.24.4 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.45.4 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 2
redistribute ospf 1
neighbor 150.1.24.2 remote-as 1
!
ip pim rp-address 150.1.24.4 ip msdp peer 150.1.24.2

Configuration:

R5:
ip multicast-routing
!
interface Loopback0
ip address 150.1.5.5 255.255.255.255
Ip pim sparse-mode
!
interface FastEthernet0/1
ip address 150.1.56.5 255.255.255.0
ip pim sparse-mode
!
interface Serial2/0
ip address 150.1.45.5 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim rp-address 150.1.24.4

R6:
ip multicast-routing
!
interface Loopback0
ip address 150.1.6.6 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.6 255.255.255.0
ip pim sparse-mode
!
interface FastEthernet0/1
ip address 150.1.56.6 255.255.255.0
ip pim sparse-mode
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim rp-address 150.1.24.4

Configuration:

SW1:
ip multicast-routing
!
interface Loopback0
ip address 150.1.7.7 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.37.7 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

SW2:
ip multicast-routing
!
interface Loopback0
ip address 150.1.8.8 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.68.8 255.255.255.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

Verification:

Enable multicast debugging on R2 and R4:
R2#debug ip pim 
PIM debugging is on

R2#debug ip msdp peer 
MSDP Peer debugging is on

R2#debug ip msdp routes 
MSDP Routes debugging is on

R2#debug ip msdp detail 
MSDP Detail debugging is on

R4#debug ip pim 
PIM debugging is on

R4#debug ip msdp peer 
MSDP Peer debugging is on

R4#debug ip msdp routes 
MSDP Routes debugging is on

R4#debug ip msdp detail 
MSDP Detail debugging is on

Generate multicast traffic from SW1:

SW1(config)#rtr 1
SW1(config-rtr)#type udpEcho dest-ipaddr 224.1.1.1 dest-port 12345 source-ipaddr
10.1.37.7 control disable 
SW1(config-rtr-udp)#frequency 5 
SW1(config-rtr-udp)#timeout 0 
SW1(config-rtr-udp)#exit
SW1(config)#rtr schedule 1 start after 00:00:05 life forever

R3 registers source with R2 and R2 generates MSDP SA message to R4: 
R2#
00:31:27: PIM(0): Received v2 Register on Serial2/1 from 150.1.13.3 
00:31:27:	for 10.1.37.7, group 224.1.1.1
00:31:27: PIM(0): Check RP 150.1.24.2 into the (*, 224.1.1.1) entry

00:31:27: MSDP(0): 150.1.24.4: Send 52-byte SA encapsulated data for (10.1.37.7, 224.1.1.1), RP 150.1.24.2
00:31:27: PIM(0): Send v2 Register-Stop to 150.1.13.3 for 10.1.37.7, group 224.1.1.1

Verification:

R2#show ip mroute
<output omitted>
(10.1.37.7, 224.1.1.1), 00:04:34/00:02:26, flags: PA
    Incoming interface: Serial2/1, RPF nbr 150.1.12.1 
    Outgoing interface list: Null

R4 receives SA message from R2:
R4#
00:38:54: MSDP(0): Received 20-byte TCP segment from 150.1.24.2 
00:38:54: MSDP(0): Append 20 bytes to 0-byte msg 42 from 150.1.24.2, qs 1
00:38:54: MSDP(0): 150.1.24.2: Received 20-byte msg 42 from peer
00:38:54: MSDP(0): 150.1.24.2: SA TLV, len: 20, ec: 1, RP: 150.1.24.2
00:38:54: MSDP(0): 150.1.24.2: Peer RPF check passed for single peer 
00:38:54: MSDP(0): (10.1.37.7/32, 224.1.1.1), accepted


R4 does not have mroute entry fro group 224.1.1.1 
R4#show ip mroute
(*, 224.0.1.40), 00:40:04/00:02:51, RP 150.1.24.4, flags: SJCL
    Incoming interface: Null, RPF nbr 0.0.0.0 
    Outgoing interface list:
        Serial2/0, Forward/Sparse, 00:39:33/00:03:20 FastEthernet0/0, Forward/Sparse, 00:39:58/00:02:51

Configure SW2 to receive traffic for the multicast group: 
SW2(config)#int fa0/0
SW2(config-if)#ip igmp join-group 224.1.1.1

R4 receives PIM Join from R5 for 224.1.1.1 and builds the RPF tree 
R4#
00:42:38: PIM(0): Received v2 Join/Prune on Serial2/0 from 150.1.45.5, to us 
00:42:38: PIM(0): Join-list: (*, 224.1.1.1), RPT-bit set, WC-bit set, S-bit set 
00:42:38: PIM(0): Check RP 150.1.24.4 into the (*, 224.1.1.1) entry
00:42:38: PIM(0): Add Serial2/0/150.1.45.5 to (*, 224.1.1.1), Forward state, by PIM *G Join
00:42:38: PIM(0): Insert (10.1.37.7,224.1.1.1) join in nbr 150.1.24.2's queue
00:42:38: PIM(0): Update Serial2/0/150.1.45.5 to (10.1.37.7, 224.1.1.1), Forward state, by PIM *G Join
00:42:38: PIM(0): Building Join/Prune packet for nbr 150.1.24.2 
00:42:38: PIM(0): Adding v2 (10.1.37.7/32, 224.1.1.1), S-bit Join
00:42:38: PIM(0): Send v2 join/prune to 150.1.24.2 (FastEthernet0/0) 
00:42:42: PIM(0): Received v2 Join/Prune on Serial2/0 from 150.1.45.5, to us 
00:42:42: PIM(0): Join-list: (10.1.37.7/32, 224.1.1.1), S-bit set
00:42:42: PIM(0): Update Serial2/0/150.1.45.5 to (10.1.37.7, 224.1.1.1), Forward state, by PIM SG Join