Professional Documents
Culture Documents
03 - PIM - SM - Lab Solution
03 - PIM - SM - Lab Solution
Course Title
Semester/Year
Instructor
Lab Assignment No 04
Assignment Title PIM
Submission Date
Due Date
Page No. 1 of 19
Table of Contents
Topic on Page
1 Introduction 03
10 Conclusion 19
11 References 19
Page No. 2 of 19
1. Introduction:
Protocol-Independent Multicast (PIM) is a multicast routing protocol used to locate each
other among the routers and the directly connected receivers. It is most popular than the
similar type protocols like DVMRP, CBC, etc.
The PIM can be configured as two modes: Dense Mode (PIM-DM) and Sparse Mode (PIM-
SM)
Dense Mode (PIM-DM) is based on Broadcast-and-prune, uses SPT distribution tree. For this
case the Routers keeps huge state information. This type of configuration is required if the
density of multicast receivers are in everywhere.
The Sparse Mode (PIM-SM) is configured when the receivers are not many. For that case , it
builds a core-based shared tree rooted at Rendezvous Point, called RP-rooted Shared Tree
(RPT), later on the receivers may switch from RPT to SPT (Shortest path tree) once when the
pim spt-threshold crossed . The RP keeps track of multicast groups. Hosts that send multicast
packets are registered with the RP by the host’s first-hop router. The RP then sends Join
messages toward the source. At this point, packets are forwarded on a shared distribution
tree. If the multicast traffic from a specific source is sufficient, the receiver’s first-hop router
may send Join messages toward the source to build a source-based distribution tree and
simultaneously it send prune to the immediate upstream router towards the RP. This lab is
based on some features of PIM-SM.
Page No. 3 of 19
2. In Figure 1, S is the source, R1 and R2 are receivers, and PnR1– PnR7 are
routers.
Prior to configure RIP, we configured all the interfaces with appropriate (given) IP address
and also checked the Frame-Relay interface status is active. We simulated the PIM lab using
POD 17.
After configuring RIP, we verified that all the subnets are converged all where. The
verification outputs are given below:
R1# sh ip protocols
Page No. 4 of 19
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.3.1 120 00:00:11
10.1.1.1 120 00:00:22
Distance: (default is 120)
R1# sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
R2# sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Page No. 5 of 19
R 10.1.7.0 [120/2] via 10.1.5.1, 00:00:10, FastEthernet0/0
C 10.1.5.0 is directly connected, FastEthernet0/0
R 10.1.4.0 [120/1] via 10.1.5.1, 00:00:10, FastEthernet0/0
R 10.1.20.0 [120/1] via 10.1.1.2, 00:00:15, Serial0/1/0
R4# sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 9 subnets
R 10.1.10.0 [120/1] via 10.1.7.1, 00:00:15, Serial0/1/0
C 10.1.8.0 is directly connected, Serial0/1/1
R 10.1.3.0 [120/3] via 10.1.8.2, 00:00:07, Serial0/1/1
R 10.1.2.0 [120/2] via 10.1.8.2, 00:00:07, Serial0/1/1
R 10.1.1.0 [120/2] via 10.1.8.2, 00:00:07, Serial0/1/1
C 10.1.7.0 is directly connected, Serial0/1/0
R 10.1.5.0 [120/1] via 10.1.8.2, 00:00:07, Serial0/1/1
R 10.1.4.0 [120/1] via 10.1.8.2, 00:00:07, Serial0/1/1
R 10.1.20.0 [120/3] via 10.1.8.2, 00:00:07, Serial0/1/1
4. Configure all the routers for PIM-SM. First enable multicast on a router using
the global command ip multicast-routing; then configure PIM-SM on every
interface using the interface command ip pim sparse-mode. Alternatively, you
can also configure PIM using ip pim sparse-dense-mode. This will allow the
router to switch to pim-dense mode if it doesn’t find RP.
Configuration at R1:
R1(config)# ip multicast-routing
R1(config)# interface fastEthernet 0/0
R1(config-if)# ip pim sparse-mode
R1(config-if)# ip pim sparse-mode
R1(config-if)# int se 0/1/0
R1(config-if)# ip pim sparse-mode
R1(config-if)# int se 0/1/1
R1(config-if)# ip pim sparse-mode
Page No. 6 of 19
Running config at R1 Running config at R2
! !
ip multicast-routing ip multicast-routing
! !
interface FastEthernet0/0 interface FastEthernet0/0
ip address 10.1.20.1 255.255.255.0 ip address 10.1.5.2 255.255.255.0
ip pim sparse-mode ip pim sparse-mode
! duplex auto
interface Serial0/1/0 speed auto
ip address 10.1.3.2 255.255.255.0 !
ip pim sparse-mode interface Serial0/1/0
encapsulation frame-relay ip address 10.1.1.1 255.255.255.0
! ip pim sparse-mode
interface Serial0/1/1 encapsulation frame-relay
ip address 10.1.1.2 255.255.255.0
ip pim sparse-mode
encapsulation frame-relay
Running config at R3 Running config at R4
! !
ip multicast-routing ip multicast-routing
! !
interface FastEthernet0/0 interface Serial0/1/0
ip address 10.1.2.1 255.255.255.0 ip address 10.1.7.2 255.255.255.0
ip pim sparse-mode ip pim sparse-mode
encapsulation frame-relay
! !
interface Serial0/1/1 interface Serial0/1/1
ip address 10.1.3.1 255.255.255.0 ip address 10.1.8.1 255.255.255.0
ip pim sparse-mode ip pim sparse-mode
encapsulation frame-relay encapsulation frame-relay
! !
Running config at R5 Running config at R6
! !
ip multicast-routing ip multicast-routing
! !
interface FastEthernet0/0 !
ip address 10.1.4.2 255.255.255.0 interface FastEthernet0/1
ip pim sparse-mode ip address 10.1.10.1 255.255.255.0
! ip pim sparse-mode
interface FastEthernet0/1 duplex auto
ip address 10.1.5.1 255.255.255.0 speed auto
ip pim sparse-mode !
! interface Serial0/1/0
interface Serial0/1/0 no ip address
ip address 10.1.8.2 255.255.255.0 !
ip pim sparse-mode interface Serial0/1/1
encapsulation frame-relay ip address 10.1.7.1 255.255.255.0
ip pim sparse-mode
encapsulation frame-relay
Page No. 7 of 19
Running config at R7
!
ip multicast-routing
!
interface FastEthernet0/0
ip address 10.1.2.2 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.1.4.1 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
6. Set the threshold at PnR1 using the global command ip pim spt-threshold
infinity so that R2 remains connected to RPT.
We set the SPT-Threshold is infinity so that R1 (PnR1) would never switch to Shortest Path
Tree (SPT) to source regardless how big the multicast traffic of its Receiver 2(10.1.20.2).
Page No. 8 of 19
7. Use show ip mroute to view the multicast routing table. What group addresses
appear in the routing table? Turn on debugging using global command debug ip
pim <group address> to view the activities related to the group address. You can
also view the multicast group information using show ip igmp group. You can
view PIM related information using sh ip pim [neighbor | rp ]
(*, 224.0.1.40), 00:08:19/00:02:33, RP 0.0.0.0, flags: (*, 224.0.1.40), 00:07:14/00:02:08, RP 0.0.0.0, flags:
DCL DCL
Incoming interface: Null, RPF nbr 0.0.0.0 Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list: Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:08:19/00:02:33 FastEthernet0/0, Forward/Sparse, 00:07:14/00:02:08
(*, 224.0.1.40), 00:07:43/00:02:47, RP 0.0.0.0, flags: DPL (*, 224.0.1.40), 00:07:57/00:02:55, RP 0.0.0.0, flags: DPL
Page No. 9 of 19
Incoming interface: Null, RPF nbr 0.0.0.0 Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list: Null Outgoing interface list: Null
(*, 224.0.1.40), 00:08:19/00:02:45, RP 0.0.0.0, flags: DCL (*, 224.10.1.2), 00:20:37/00:02:46, RP 10.1.5.2, flags: SP
Incoming interface: Null, RPF nbr 0.0.0.0 Incoming interface: Serial0/1/1, RPF nbr 10.1.7.2
Outgoing interface list: Outgoing interface list: Null
Serial0/1/0, Forward/Sparse, 00:08:19/00:02:29
FastEthernet0/0, Forward/Sparse, 00:08:19/00:02:20 (*, 224.0.1.40), 00:08:36/00:02:43, RP 0.0.0.0, flags: DPL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list: Null
R7# sh 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
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
Page No. 10 of 19
IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter Group Accounted
224.0.1.40 FastEthernet0/0 04:35:31 00:02:15 10.1.2.1
Page No. 11 of 19
10.1.1.2 Serial0/1/0 04:27:12/00:01:17 v2 1 / DR S
Page No. 12 of 19
Debug ip pim 224.10.1.2 at R1:
*Dec 18 07:54:52.170: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 224.10.1.2
*Dec 18 07:54:52.170: PIM(0): Insert (*,224.10.1.2) join in nbr 10.1.1.1's queue
*Dec 18 07:54:52.170: PIM(0): Building Join/Prune packet for nbr 10.1.1.1
*Dec 18 07:54:52.170: PIM(0): Adding v2 (10.1.5.2/32, 224.10.1.2), WC-bit, RPT-bit, S-bit Join
*Dec 18 07:54:52.170: PIM(0): Send v2 join/prune to 10.1.1.1 (Serial0/1/1)
*Dec 18 07:55:30.442: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
*Dec 18 07:55:30.442: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
*Dec 18 07:55:30.446: for group 224.10.1.2
*Dec 18 07:55:30.446: PIM(0): Forward RP-reachability for 224.10.1.2 on FastEthernet0/0
*Dec 18 07:55:50.874: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for
224.10.1.2
*Dec 18 07:55:50.874: PIM(0): Insert (*,224.10.1.2) join in nbr 10.1.1.1's queue
*Dec 18 07:55:50.874: PIM(0): Building Join/Prune packet for nbr 10.1.1.1
*Dec 18 07:55:50.874: PIM(0): Adding v2 (10.1.5.2/32, 224.10.1.2), WC-bit, RPT-bit, S-bit Join
*Dec 18 07:55:50.874: PIM(0): Send v2 join/prune to 10.1.1.1 (Serial0/1/1)
*Dec 18 07:56:49.894: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 224.10.1.2
*Dec 18 07:56:49.894: PIM(0): Insert (*,224.10.1.2) join in nbr 10.1.1.1's queue
*Dec 18 07:56:49.894: PIM(0): Building Join/Prune packet for nbr 10.1.1.1
*Dec 18 07:56:49.894: PIM(0): Adding v2 (10.1.5.2/32, 224.10.1.2), WC-bit, RPT-bit, S-bit Join
*Dec 18 07:56:49.894: PIM(0): Send v2 join/prune to 10.1.1.1 (Serial0/1/1)
*Dec 18 07:57:00.454: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
*Dec 18 07:57:00.454: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
*Dec 18 07:57:00.454: for group 224.10.1.2
*Dec 18 07:57:00.454: PIM(0): Forward RP-reachability for 224.10.1.2 on FastEthernet0/0
R1#
*Dec 18 07:57:48.994: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 224.10.1.2
*Dec 18 07:57:48.994: PIM(0): Insert (*,224.10.1.2) join in nbr 10.1.1.1's queue
*Dec 18 07:57:48.994: PIM(0): Building Join/Prune packet for nbr 10.1.1.1
*Dec 18 07:57:48.994: PIM(0): Adding v2 (10.1.5.2/32, 224.10.1.2), WC-bit, RPT-bit, S-bit Join
*Dec 18 07:57:48.994: PIM(0): Send v2 join/prune to 10.1.1.1 (Serial0/1/1)
*Dec 18 07:58:30.442: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
*Dec 18 07:58:30.442: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
*Dec 18 07:58:30.442: for group 224.10.1.2
*Dec 18 07:58:30.442: PIM(0): Forward RP-reachability for 224.10.1.2 on FastEthernet0/0
*Dec 18 07:58:47.594: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 224.10.1.2
*Dec 18 07:58:47.594: PIM(0): Insert (*,224.10.1.2) join in nbr 10.1.1.1's queue
*Dec 18 07:58:47.594: PIM(0): Building Join/Prune packet for nbr 10.1.1.1
*Dec 18 07:58:47.594: PIM(0): Adding v2 (10.1.5.2/32, 224.10.1.2), WC-bit, RPT-bit, S-bit Join
*Dec 18 07:58:47.594: PIM(0): Send v2 join/prune to 10.1.1.1 (Serial0/1/1)
*Dec 18 07:59:46.394: PIM(0): Building Periodic (*,G) Join / (S,G,RP-bit) Prune message for 224.10.1.2
*Dec 18 07:59:46.394: PIM(0): Insert (*,224.10.1.2) join in nbr 10.1.1.1's queue
*Dec 18 07:59:46.394: PIM(0): Building Join/Prune packet for nbr 10.1.1.1
*Dec 18 07:59:46.394: PIM(0): Adding v2 (10.1.5.2/32, 224.10.1.2), WC-bit, RPT-bit, S-bit Join
*Dec 18 07:59:46.394: PIM(0): Send v2 join/prune to 10.1.1.1 (Serial0/1/1)
*Dec 18 08:00:00.430: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
Page No. 13 of 19
*Dec 18 08:00:00.430: PIM(0): Received RP-Reachable on Serial0/1/1 from 10.1.5.2
*Dec 18 08:00:00.430: for group 224.10.1.2
*Dec 18 08:00:00.430: PIM(0): Forward RP-reachability for 224.10.1.2 on FastEthernet0/0
R1# undebug all
All possible debugging has been turned off
Observation:
From the above debug message, we have observed that the information about group
(224.10.1.2) join message with RP, R1 receives RP reachable message from RP and forwards
it to interface where receiver exists. Afterwards it sends join/prune message for group
(224.10.1.2) to RP.
Page No. 14 of 19
9. Launch vic application on S, R1 and R2. Configure the application on the
source S as follows: Click on settings, click on transmit to select it, then click on
device to select the camera as Microsoft WDM image.
We have configured three Windows XP virtual machines using VMware to make Sender (S)
Receiver R1 and Receiver R2 to attaching with VMnet0, VMnet1 and Vmnet2 respectively.
Each machine was connected using the appropriate Ethernet adapter and assigned IP
addresses.
We installed wbd in three of our VM workstations and launched it from command prompt
using multicast group address (224.10.1.2) as below:
The captured data from the Wireshark packet sniper is given below:
Page No. 15 of 19
Page No. 16 of 19
After lunching WBD application, we drew a picture on Server virtual machine(S) and found that
both receivers under same multicast address ( 224.10.1.2) can receive the picture at the same time
by PIM-sparse mode operation. Again, we added one horizontal line on the top of the figure at R1
and then sender S and other receiver R2 received that.
Page No. 17 of 19
Picture on Server virtual machine:
Page No. 18 of 19
Picture on Receiver R2 VM:
Conclusion:
In this lab, we have observed the Multicast operations using PIM-SM protocol. This lab has
helped us to analyze and understand how the multicast table, shared tree is being built
through RP. The debug output confirmed us to observe the whole process of multicasting
starting from initial source registration with RP and followed by building the shared tree and
how the receivers get multicast packets through RP. We also used the wireshark tool for
packet snipping as part of the lab completion.
Page No. 19 of 19