Network Requirement
- The whole network runs the PIM-SM protocol.
- Receiver is one receiver of the Device end network.
- Run IGMPv2 between Device and the end network.
- Device interface vlan3 filters the multicast group; the range of the multicast groups Receiver is permitted to add is 225.1.1.0-225.1.1.255.
Network Topology
Figure 5-4 Networking of configuring IGMP multicast group filter
Configuration Steps
Step 1: Configure the IP address of the interface. (omitted)
Step 2: Globally enable the multicast forwarding and enable the multicast protocol PIM-SM on the interface.
#Configure Device.
Globally enable the multicast forwarding and enable the multicast protocol PIM-SM on the related interfaces.
Device(config)#configure terminal
Device(config)#ip multicast-routing
Device(config)#interface vlan2
Device(config-if-vlan2)#ip pim sparse-mode
Device(config-if-vlan2)#exit
Device(config)#interface vlan3
Device(config-if-vlan3)#ip pim sparse-mode
Device(config-if-vlan3)#exit
|
#View the IGMP information of Device interface vlan3.
Device#show ip igmp interface vlan3
Interface vlan3 (Index 50331921)
IGMP Enabled, Active, Querier (3.0.0.1)
Default version 2
IP router alert option in IGMP V2 msgs: EXCLUDE
Internet address is 3.0.0.1
IGMP query interval is 125 seconds
IGMP querier timeout is 255 seconds
IGMP max query response time is 10 seconds
Last member query response interval is 1 seconds
Last member query count is 2
Group Membership interval is 260 seconds
IGMP robustness variable is 2
Step 3: Configure the multicast group filter on Device interface vlan3.
#Configure Device.
Configure the multicast group filter on Device interface vlan3; the range of the multicast groups Receiver is permitted to add is 225.1.1.0-225.1.1.255.
Device(config)#ip access-list standard 1
Device(config-std-nacl)#permit 225.1.1.0 0.0.0.255
Device(config-std-nacl)#commit
Device(config-std-nacl)#exit
Device(config)#interface vlan3
Device(config-if-vlan3)#ip igmp access-group 1
Device(config-if-vlan3)#exit
|
Step4: Check the result.
#Receiver sends the IGMPv2 member relation report to add to multicast group 225.1.1.1 and 226.1.1.1.
#Source sends the multicast packets with multicast group 225.1.1.1 and 226.1.1.1.
#View the multicast member table of Device.
Device#show ip igmp groups
IGMP Connected Group Membership
Total 1 groups
Group Address Interface Uptime Expires Last Reporter V1 Expires V2 Expires
--------------------------------------------------------------------------------
225.1.1.1 vlan3 03:14:59 00:03:05 3.0.0.2 stopped
#View the multicast route table of Device.
Device#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:00:56 RP: 0.0.0.0
RPF nbr: 0.0.0.0 RPF idx: None
Flags:
JOIN DESIRED
Upstream State: JOINED
Local interface list:
vlan3
Joined interface list:
Asserted interface list:
(192.168.1.1, 225.1.1.1)
Up time: 00:00:15
KAT time: 00:03:15
RPF nbr: 0.0.0.0
RPF idx: None
SPT bit: TRUE Flags:
JOIN DESIRED
COULD REGISTER
Upstream State: JOINED
Local interface list:
Joined interface list:
register_vif0
Asserted interface list:
Outgoing interface list:
register_vif0
vlan3
Packet count 1
(192.168.1.1, 225.1.1.1, rpt)
Up time: 00:00:15 RP: 0.0.0.0
Flags:
RPT JOIN DESIRED
RPF SGRPT XG EQUAL
Upstream State: NOT PRUNED
Local interface list:
Pruned interface list:
Outgoing interface list:
vlan3
(192.168.1.1, 226.1.1.1)
Up time: 00:00:15
KAT time: 00:03:15
RPF nbr: 0.0.0.0
RPF idx: None
SPT bit: TRUE
Flags:
JOIN DESIRED
COULD REGISTER
Upstream State: JOINED
Local interface list:
Joined interface list:
register_vif0
Asserted interface list:
Outgoing interface list:
register_vif0
Packet count 1
(192.168.1.1, 226.1.1.1, rpt)
Up time: 00:00:15 RP: 0.0.0.0
Flags:
RPF SGRPT XG EQUAL
Upstream State: RPT NOT JOINED
Local interface list:
Pruned interface list:
Outgoing interface list:
#Receiver can only receive the multicast service packets with multicast group 225.1.1.1 sent by Source.
-
To filter based on multicast source group, use the command ip igmp ssm-access-group to realize. When using the command, it is required that the device runs PIM-SSM and the interface runs IGMPv3.