Network Requirements
- The whole network runs the PIM-SM protocol.
- Receiver is one receiver of Device3 end network.
- Device2 is C-BSR and C-RP.
- On Device2 and Device3, control the multicast source, making Receiver only receive the multicast service packet sent by Source1.
- Run IGMPv2 between Device3 and the end network.
Network Topology
![Networking of configuring PIM-SM multicast forwarding control](/storage/images/Document/Maipu/multicast/config-pim-sm-multicast-forwarding-control.jpg)
Figure 7-3 Networking of configuring PIM-SM multicast forwarding control
Configuration Steps
Step 1: Configure the IP address of the interface. (omitted)
Step 2: Enable the unicast route protocol OSPF so that all devices in the network can communicate with each other.
#Configure Device1.
Device1#configure terminal
Device1(config)#router ospf 100
Device1(config-ospf)#network 2.0.0.0 0.0.0.255 area 0
Device1(config-ospf)#network 3.0.0.0 0.0.0.255 area 0
Device1(config-ospf)#network 10.0.0.0 0.0.255.255 area 0
Device1(config-ospf)#exit
|
#Configure Device2.
Device2#configure terminal
Device2(config)#router ospf 100
Device2(config-ospf)#network 3.0.0.0 0.0.0.255 area 0
Device2(config-ospf)#network 4.0.0.0 0.0.0.255 area 0
Device2(config-ospf)#exit
|
#Configure Device3.
Device3#configure terminal
Device3(config)#router ospf 100
Device3(config-ospf)#network 2.0.0.0 0.0.0.255 area 0
Device3(config-ospf)#network 4.0.0.0 0.0.0.255 area 0
Device3(config-ospf)#exit
|
#View the route table of Device3.
Device3#show ip route
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M - Management
D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B - BGP, i-ISIS
Gateway of last resort is not set
C 2.0.0.0/24 is directly connected, 15:51:07, vlan6
O 3.0.0.0/24 [110/2] via 2.0.0.1, 15:33:34, vlan6
[110/2] via 4.0.0.1, 15:33:24, vlan8
C 4.0.0.0/24 is directly connected, 16:39:17, vlan8
C 5.0.0.0/24 is directly connected, 15:11:38, vlan9
O 10.0.0.0/24 [110/2] via 2.0.0.1, 00:06:32, vlan6
O 10.0.1.0/24 [110/2] via 2.0.0.1, 00:06:32, vlan6
O 10.0.2.0/24 [110/2] via 2.0.0.1, 00:06:32, vlan6
O 10.0.3.0/24 [110/2] via 2.0.0.1, 00:06:32, vlan6
![note](/storage/images/Document/Maipu/note-icon.jpg)
-
The viewing method of Device1 and device2 is the same as that of Device3, so the viewing process is omitted.
Step 3: Globally enable the multicast forwarding and enable the multicast protocol PIM-SM on the interface.
#Configure Device1.
Globally enable the multicast forwarding and enable the multicast protocol PIM-SM on the related interfaces.
Device1(config)#ip multicast-routing
Device1(config)#interface vlan2
Device1(config-if-vlan2)#ip pim sparse-mode
Device1(config-if-vlan2)#exit
Device1(config)#interface vlan3
Device1(config-if-vlan3)#ip pim sparse-mode
Device1(config-if-vlan3)#exit
Device1(config)#interface vlan4
Device1(config-if-vlan4)#ip pim sparse-mode
Device1(config-if-vlan4)#exit
Device1(config)#interface vlan5
Device1(config-if-vlan5)#ip pim sparse-mode
Device1(config-if-vlan5)#exit
Device1(config)#interface vlan6
Device1(config-if-vlan6)#ip pim sparse-mode
Device1(config-if-vlan6)#exit
Device1(config)#interface vlan7
Device1(config-if-vlan7)#ip pim sparse-mode
Device1(config-if-vlan7)#exit
|
#Configure Device2.
Globally enable the multicast forwarding and enable the multicast protocol PIM-SM on the related interfaces.
Device2(config)#ip multicast-routing
Device2(config)#interface vlan7
Device2(config-if-vlan7)#ip pim sparse-mode
Device2(config-if-vlan7)#exit
Device2(config)#interface vlan8
Device2(config-if-vlan8)#ip pim sparse-mode
Device2(config-if-vlan8)#exit
|
#Configure Device3.
Globally enable the multicast forwarding and enable the multicast protocol PIM-SM on the related interfaces.
Device3(config)#ip multicast-routing
Device3(config)#interface vlan6
Device3(config-if-vlan6)#ip pim sparse-mode
Device3(config-if-vlan6)#exit
Device3(config)#interface vlan8
Device3(config-if-vlan8)#ip pim sparse-mode
Device3(config-if-vlan8)#exit
Device3(config)#interface vlan9
Device3(config-if-vlan9)#ip pim sparse-mode
Device3(config-if-vlan9)#exit
|
#View the information of the interface enabled with the PIM-SM protocol on Device3 and the PIM-SM neighbor information.
Device3#show ip pim interface PIM Interface Table:
PIM VRF Name: Default Total 3 Interface entries
Total 0 External Interface entry
Total 0 Sparse-Dense Mode Interface entry
Address Interface VIF Ver/ VIF Nbr DR DR
BSR CISCO Neighbor
Index Mode Flag Count Priority
Border Neighbor Filter
2.0.0.2 vlan6 2 v2/S UP 1 1 2.0.0.2
FALSE FALSE
4.0.0.2 vlan8 0 v2/S UP 1 1
4.0.0.2 FALSE FALSE
5.0.0.1 vlan9 3 v2/S UP 0 1
5.0.0.1 FALSE FALSE
Device3#show ip pim neighbor
PIM Neighbor Table:
PIM VRF Name: Default
Total 2 Neighbor entries
Neighbor Interface Uptime/Expires Ver DR Priority/Mode
Address
2.0.0.1 vlan6 00:50:29/00:01:19 v2 1 /
4.0.0.1 vlan8 00:57:58/00:01:33 v2 1 /
![note](/storage/images/Document/Maipu/note-icon.jpg)
-
The viewing method of Device1 and device2 is the same as that of Device3, so the viewing process is omitted.
Step 4: Configure vlan7 of Device2 as C-BSR and C-RP of the whole network and the multicast group range of the C-RP service is 224.0.0.0/4.
#Configure Device2.
Device2(config)#ip pim bsr-candidate vlan7
Device2(config)#ip pim rp-candidate vlan7
|
#View the BSR and RP information of Device3.
Device3#show ip pim bsr-router
PIMv2 Bootstrap information
PIM VRF Name: Default
BSR address: 3.0.0.2
BSR Priority: 0
Hash mask length: 10
Up time: 00:10:37
Expiry time: 00:01:33
Role: Non-candidate BSR
State: Accept Preferred
Device3#show ip pim rp mapping
PIM Group-to-RP Mappings Table:
PIM VRF Name: Default
Total 1 RP set entry
Total 1 RP entry
Group(s): 224.0.0.0/4
RP count: 1
RP: 3.0.0.2
Info source: 3.0.0.2, via bootstrap, priority 192
Up time: 03:59:59
Expiry time: 00:01:49
![note](/storage/images/Document/Maipu/note-icon.jpg)
-
The viewing method of Device1 and device2 is the same as that of Device3, so the viewing process is omitted.
Step 5: On Device2 and Device3, control for the multicast source, making Receiver only receive the multicast service packet sent by Source1
#On Device2, configure the accepted register message access list, filtering the register message of Source4.
Device2(config)#ip access-list standard 1
Device2(config-std-nacl)#deny 10.0.3.0 0.0.0.255
Device2(config-std-nacl)#permit any
Device2(config-std-nacl)#commit
Device2(config-std-nacl)#exit
Device2(config)#ip pim accept-register list 1
|
#On interface vlan6 and vlan8 of Device3, configure the ingress ACL, filtering the multicast service packets of Source3.
Device3(config)#ip access-list extended 1001
Device3(config-ext-nacl)#deny ip 10.0.2.0 0.0.0.255 224.0.0.0 31.255.255.255
Device3(config-ext-nacl)#permit igmp any any
Device3(config-ext-nacl)#permit pim any any
Device3(config-ext-nacl)#permit ospf any any
Device3(config-ext-nacl)#permit ip any any
Device2(config-std-nacl)#commit
Device3(config-ext-nacl)#exit
Device3(config)#interface vlan6
Device3(config-if-vlan6)#ip access-group 1001 in
Device3(config-if-vlan6)#exit
Device3(config)#interface vlan8
Device3(config-if-vlan8)#ip access-group 1001 in
Device3(config-if-vlan8)#exit
|
#On interface vlan9 of Device3, configure the ingress ACL, filtering the multicast service packets of Source2.
Device3(config)#ip access-list extended 1002
Device3(config-ext-nacl)#deny ip 10.0.1.0 0.0.0.255 224.0.0.0 31.255.255.255
Device3(config-ext-nacl)#permit igmp any any
Device3(config-ext-nacl)#permit pim any any
Device3(config-ext-nacl)#permit ip any any
Device3(config-ext-nacl)#commit
Device3(config-ext-nacl)#exit
Device3(config)#interface vlan9
Device3(config-if-vlan9)#ip access-group 1002 out
Device3(config-if-vlan9)#exit
|
Step 6: Check the result.
#Receiver sends the IMGPv2 member relation report to add to multicast group 225.1.1.1.
# Source1, Source2, Source3, and Source4 send the multicast packets with multicast group 225.1.1.1.
#View the multicast member table of Device2.
Device2#show ip igmp groups IGMP Connected Group Membership Total 1 groups
Group Address Interface Uptime Expires Last Reporter V1 Expires
225.1.1.1 vlan9 00:00:38 00:03:45 5.0.0.2 stopped
#View the multicast route table of Device3.
Device3#show ip pim mroute
IP Multicast Routing Table:
PIM VRF Name: Default
Total 0 (*,*,RP) entry
Total 1 (*,G) entry
Total 2 (S,G) entries
Total 2 (S,G,rpt) entries
Total 0 FCR entry
Up timer/Expiry timer
(*, 225.1.1.1)
Up time: 00:07:55
RP: 3.0.0.2
RPF nbr: 4.0.0.1
RPF idx: vlan8
Flags:
JOIN DESIRED
Upstream State: JOINED
Local interface list:
Vlan9
Joined interface list:
Asserted interface list:
(10.0.0.1, 225.1.1.1)
Up time: 00:07:49
KAT time: 00:03:17
RPF nbr: 2.0.0.1
RPF idx: vlan6
SPT bit: TRUE
Flags:
JOIN DESIRED
Upstream State: JOINED
Local interface list:
Joined interface list:
Asserted interface list:
Outgoing interface list:
vlan9
Packet count 268411
(10.0.0.1, 225.1.1.1, rpt)
Up time: 00:07:49
RP: 3.0.0.2
Flags:
RPT JOIN DESIRED
PRUNE DESIRED
RPF SGRPT XG EQUAL
Upstream State: PRUNED
Local interface list:
Pruned interface list:
Outgoing interface list:
Vlan9
(10.0.1.1, 225.1.1.1)
Up time: 00:07:49
KAT time: 00:03:17
RPF nbr: 2.0.0.1
RPF idx: vlan6
SPT bit: TRUE
Flags:
JOIN DESIRED
Upstream State: JOINED
Local interface list:
Joined interface list:
Asserted interface list:
Outgoing interface list:
Vlan9
Packet count 268237
(10.0.1.1, 225.1.1.1, rpt)
Up time: 00:07:49
RP: 3.0.0.2
Flags:
RPT JOIN DESIRED
PRUNE DESIRED
RPF SGRPT XG EQUAL
Upstream State: PRUNED
Local interface list:
Pruned interface list:
Outgoing interface list:
Vlan9
![note](/storage/images/Document/Maipu/note-icon.jpg)
-
The viewing method of Device1 and device2 is the same as that of Device3, so the viewing process is omitted.
#View the matching of ACL on Device2.
Device2#show ip access-list 1
ip access-list standard 1
10 deny 10.0.3.0 0.0.0.255 32 matches
20 permit any 2767 matches
#View the matching of ACL on Device3.
Device3#show ip access-list 1001
ip access-list extended 1001
10 deny ip 10.0.2.0 0.0.0.255 224.0.0.0 31.255.255.255 671545 matches
20 permit igmp any any 19 matches
30 permit pim any any 119 matches
40 permit ospf any any 252 matches
50 permit ip any any 1343339 matches
Device3#show ip access-list 1002
ip access-list extended 1002
10 deny ip 10.0.1.0 0.0.0.255 224.0.0.0 31.255.255.255 672358 matches
20 permit igmp any any 10 matches
30 permit pim any any 40 matches
40 permit ip any any 672532 matches
#Receive end can only receive the multicast service packets sent by Source1.
![caution](/storage/images/Document/Maipu/caution.jpg)
-
When performing the multicast source control, you’d better first configure the multicast source control and then on-demand multicast source, because by default, after receiving the multicast service packet, the receiving end DR performs the SPT switching. If first on-demanding multicast source and then performing the multicast forwarding control, the multicast forwarding control does not take function. To prevent the multicast forwarding control from not taking function, you can configure not permitting SPT switching on the receiving end DR.