6.2. Configuring IGMP
Overview
Function Introduction
To participate in IP multicasting, multicast hosts, routers, and multilayer switches must have the IGMP operating. This protocol defines the querier and host roles:
A querier is a network device that sends query messages to discover which network devices are members of a given multicast group.
A host is a receiver that sends report messages (in response to query messages) to inform a querier of a host membership.
A set of queries and hosts that receive multicast data streams from the same source is called a multicast group. Queriers and hosts use IGMP messages to join and leave multicast groups. Any host, regardless of whether it is a member of a group, can send to a group. However, only the members of a group receive the message. Membership in a multicast group is dynamic; hosts can join and leave at any time. There is no restriction on the location or number of members in a multicast group.
A host can be a member of more than one multicast group at a time. How active a multicast group is and what members it has can vary from group to group and from time to time. A multicast group can be active for a long time, or it can be very short-lived. Membership in a group can constantly change. A group that has members can have no activity.
IGMP packets are sent using these IP multicast group addresses:
IGMP general queries are destined to the address 224.0.0.1 (all systems on a subnet).
IGMP group-specific queries are destined to the group IP address for which the switch is querying.
IGMP group membership reports are destined to the group IP address for which the switch is reporting.
IGMP Version 2 (IGMPv2) leave messages are destined to the address 224.0.0.2 (all-multicast-routers on a subnet). In some old host IP stacks, leave messages might be destined to the group IP address rather than to the all-routers address.
Principle Description
Reference to RFC 1112 RFC 2236 RFC 3376.
Configuration
There is no explicit command to enable IGMP, which is always combined with PIM-SM. When PIM-SM is enabled on an interface, IGMP will be enabled automatically on this interface, vice versa. But notice, before IGMP can work, IP Multicast-routing must be enabled globally firstly. We support build IGMP group record by learning IGMP packets or configuring static IGMP group by administrator.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enable ip multicast-routing globally
Switch(config)# ip multicast-routing
step 3 Enter the interface configure mode set the attributes and ip address
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.10.10.10/24
Switch(config-if)# exit
Switch(config)# interface eth-0-2
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.10.11.10/24
Switch(config-if)# exit
step 4 Enable pim-sm on the interface
Switch(config)# interface eth-0-1
Switch(config-if)# ip pim sparse-mode
Switch(config-if)# exit
Switch(config)# interface eth-0-2
Switch(config-if)# ip pim sparse-mode
Switch(config-if)# exit
step 5 Set the attributes for igmp
Switch(config)# interface eth-0-1
Switch(config-if)# ip igmp version 2
Switch(config-if)# ip igmp query-interval 120
Switch(config-if)# ip igmp query-max-response-time 12
Switch(config-if)# ip igmp robustness-variable 3
Switch(config-if)# ip igmp last-member-query-count 3
Switch(config-if)# ip igmp last-member-query-interval 2000
Switch(config-if)# exit
step 6 Set the maxinum igmp group count(optional)
The maxinum igmp group count is limited globally or per-interface.
Switch(config)# ip igmp limit 2000
Switch(config)# interface eth-0-1
Switch(config-if)# ip igmp limit 1000
step 7 Set a static igmp group
Switch(config-if)# ip igmp static-group 228.1.1.1
Switch(config-if)# exit
step 8 Set igmp proxy(optional)
Switch(config)# interface eth-0-1
Switch(config-if)# ip igmp proxy-service
Switch(config-if)# exit
Switch(config)# interface eth-0-2
Switch(config-if)# ip igmp mroute-proxy eth-0-1
Switch(config-if)# exit
step 9 Exit the configure mode
Switch(config)# end
step 10 Validation
Use the following command to display the information of igmp interfaces:
Switch# show ip igmp interface
Interface eth-0-1 (Index 1)
IGMP Inactive, Version 2 (default) proxy-service
IGMP host version 2
IGMP global limit is 2000
IGMP global limit states count is currently 0
IGMP interface limit is 1000
IGMP interface has 0 group-record states
IGMP activity: 0 joins, 0 leaves
IGMP query interval is 120 seconds
IGMP querier timeout is 366 seconds
IGMP max query response time is 12 seconds
Last member query response interval is 2000 milliseconds
Group Membership interval is 372 seconds
Last memeber query count is 3
Robustness Variable is 3
Interface eth-0-2 (Index 2)
IGMP Inactive, Version 2 (default)
IGMP mroute-proxy interface is eth-0-1
IGMP global limit is 2000
IGMP global limit states count is currently 0
IGMP interface limit is 16384
IGMP interface has 0 group-record states
IGMP activity: 0 joins, 0 leaves
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 1000 milliseconds
Group Membership interval is 260 seconds
Last memeber query count is 2
Robustness Variable is 2
Use the following command to display the information of groups:
Switch# show ip igmp groups
IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter
228.1.1.1 eth-0-1 00:00:05 stopped -
Application cases
N/A