The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Cisco IOS software supports the following protocols to implement IP multicast routing:
According to IPv4 multicast standards, the MAC destination multicast address begins with 0100:5e and is appended by the last 23 bits of the IP address. For example, if the IP destination address is 239.1.1.39, the MAC destination address is 0100:5e01:0127.
A multicast packet is unmatched when the destination IPv4 address does not match the destination MAC address. The switch forwards the unmatched packet in hardware based on the MAC address table. If the destination MAC address is not in the MAC address table, the switch floods the packet to the all port in the same VLAN as the receiving port.
To participate in IP multicasting, multicast hosts, routers, and multilayer switches must have the Internet Group Management Protocol (IGMP) operating. This protocol defines the querier and host roles:
A set of queriers 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.
The switch supports IGMP version 1, IGMP version 2, and IGMP version 3. These versions are interoperable on the switch. For example, if IGMP snooping is enabled and the querier's version is IGMPv2. and the switch receives an IGMPv3 report from a host, then the switch can forward the IGMPv3 report to the multicast router.
IGMP version 1 (IGMPv1) primarily uses a query-response model that enables the multicast router and multilayer switch to find which multicast groups are active (have one or more hosts interested in a multicast group) on the local subnet. IGMPv1 has other processes that enable a host to join and leave a multicast group. For more information, see RFC 1112.
IGMPv2 extends IGMP functionality by providing such features as the IGMP leave process to reduce leave latency, group-specific queries, and an explicit maximum query response time. IGMPv2 also adds the capability for routers to elect the IGMP querier without depending on the multicast protocol to perform this task. For more information, see RFC 2236.
Note |
IGMP version 2 is the default version for the switch. |
Configuring Optional IGMP Features
You can configure the switch as a member of a multicast group and discover multicast reachability in a network. If all the multicast-capable routers and multilayer switches that you administer are members of a multicast group, pinging that group causes all of these devices to respond. The devices respond to ICMP echo-request packets addressed to a group of which they are members. Another example is the multicast trace-route tools provided in the software.
Caution |
Performing this procedure might impact the CPU performance because the CPU will receive all data traffic for the group address. |
The switch sends IGMP host-query messages to find which multicast groups have members on attached local networks. The switch then forwards to these group members all packets addressed to the multicast group. You can place a filter on each interface to restrict the multicast groups that hosts on the subnet serviced by the interface can join.
This procedure is optional.
2. interface interface-id
3. ip igmp access-group access-list-number
5.
access-list access-list-number {deny | permit} source [source-wildcard]
6. end
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure terminal Example: Switch# configure terminal |
|||
Step 2 | interface interface-id Example:
Switch(config)# interface GigabitEthernet 1/0/12 |
Specifies the interface to be configured, and enters interface configuration mode. |
||
Step 3 | ip igmp access-group access-list-number Example:
Switch(config-if)# ip igmp access-group 10
|
Specifies the multicast groups that hosts on the subnet serviced by an interface can join. By default, all groups are allowed on an interface. For access-list-number, specify an IP standard access list number. The range is 1 to 199.
|
||
Step 4 |
exit Example: Switch(config-if)# exit |
|||
Step 5 |
access-list access-list-number {deny | permit} source [source-wildcard] Example: Switch(config)# access-list 10 permit |
Creates a standard access list.
Recall that the access list is always terminated by an implicit deny statement for everything. |
||
Step 6 | end Example:
Switch(config-igmp-profile)# end
|
Returns to privileged EXEC mode. |
||
Step 7 |
show ip igmp interface [
interface-id] Example: Switch# show ip igmp interface |
By default, the switch uses IGMP Version 2, which provides features such as the IGMP query timeout and the maximum query response time.
All systems on the subnet must support the same version. The switch does not automatically detect Version 1 systems and switch to Version 1. You can mix Version 1 and Version 2 hosts on the subnet because Version 2 routers or switches always work correctly with IGMPv1 hosts.
Configure the switch for Version 1 if your hosts do not support Version 2.
This procedure is optional.
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure terminal Example: Switch# configure terminal |
|||
Step 2 |
interface
interface-id Example: Switch(config)# interface gigabitethernet 1/0/1 |
Specifies the interface to be configured, and enters the interface configuration mode. |
||
Step 3 |
ip igmp version {1 | 2 | 3 } Example: Switch(config-if)# ip igmp version 2 |
Specifies the IGMP version that the switch uses.
To return to the default setting, use the no ip igmp version interface configuration command. |
||
Step 4 |
end Example: Switch(config-if)# end |
|||
Step 5 |
show ip igmp interface [
interface-id] Example: Switch# show ip igmp interface |
|||
Step 6 |
copy running-config startup-config Example: Switch# copy running-config startup-config |
The switch periodically sends IGMP host-query messages to discover which multicast groups are present on attached networks. These messages are sent to the all-hosts multicast group (224.0.0.1) with a time-to-live (TTL) of 1. The switch sends host-query messages to refresh its knowledge of memberships present on the network. If, after some number of queries, the software discovers that no local hosts are members of a multicast group, the software stops forwarding multicast packets to the local network from remote origins for that group and sends a prune message upstream toward the source.
The switch elects a PIM designated router (DR) for the LAN (subnet). The DR is the router or multilayer switch with the highest IP address for IGMPv2. For IGMPv1, the DR is elected according to the multicast routing protocol that runs on the LAN. The designated router is responsible for sending IGMP host-query messages to all hosts on the LAN. In sparse mode, the designated router also sends PIM register and PIM join messages toward the RP router.
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure terminal Example: Switch# configure terminal |
|||
Step 2 |
interface
interface-id Example: Switch(config)# interface gigabitethernet 1/0/1 |
Specifies the interface on which you want to enable multicast routing, and enters interface configuration mode. |
||
Step 3 |
ip igmp query-interval
seconds Example: Switch(config-if)# ip igmp query-interval 75 |
Configures the frequency at which the designated router sends IGMP host-query messages. By default, the designated router sends IGMP host-query messages every 60 seconds to keep the IGMP overhead very low on hosts and networks. The range is 1 to 18000.
|
||
Step 4 |
end Example: Switch(config-if)# end |
|||
Step 5 |
show ip igmp interface [
interface-id] Example: Switch# show ip igmp interface |
|||
Step 6 |
copy running-config startup-config Example: Switch# copy running-config startup-config |
If you are using IGMPv2, you can specify the period of time before the switch takes over as the querier for the interface. By default, the switch waits twice the query interval period controlled by the ip igmp query-interval interface configuration command. After that time, if the switch has received no queries, it becomes the querier.
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure terminal Example: Switch# configure terminal |
|||
Step 2 |
interface
interface-id Example: Switch(config)# interface gigabitethernet 1/0/1 |
Specifies the interface on which you want to enable multicast routing, and enters interface configuration mode. |
||
Step 3 |
ip igmp querier-timeout
seconds Example: Switch(config-if)# ip igmp querier-timeout 120 |
Specifies the IGMP query timeout. The default is 60 seconds (twice the query interval). The range is 60 to 300.
|
||
Step 4 |
end Example: Switch(config-if)# end |
|||
Step 5 |
show ip igmp interface [
interface-id] Example: Switch# show ip igmp interface |
|||
Step 6 |
copy running-config startup-config Example: Switch# copy running-config startup-config |
If you are using IGMPv2, you can change the maximum query response time advertised in IGMP queries. The maximum query response time enables the switch to quickly detect that there are no more directly connected group members on a LAN. Decreasing the value enables the switch to prune groups faster.
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure terminal Example: Switch# configure terminal |
|||
Step 2 |
interface
interface-id Example: Switch(config)# interface gigabitethernet 1/0/1 |
Specifies the interface on which you want to enable multicast routing, and enters interface configuration mode. |
||
Step 3 |
ip igmp query-max-response-time
seconds Example: Switch(config-if)# ip igmp query-max-response-time 15 |
Changes the maximum query response time advertised in IGMP queries. The default is 10 seconds. The range is 1 to 25.
|
||
Step 4 |
end Example: Switch(config-if)# end |
|||
Step 5 |
show ip igmp interface [
interface-id] Example: Switch# show ip igmp interface |
|||
Step 6 |
copy running-config startup-config Example: Switch# copy running-config startup-config |
At various times, either there is not a group member on a network segment or a host that cannot report its group membership by using IGMP. However, you may want multicast traffic to be sent to that network segment. The following commands are used to pull multicast traffic down to a network segment:
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure terminal Example: Switch# configure terminal |
|||
Step 2 |
interface
interface-id Example: Switch(config)# interface gigabitethernet 1/0/1 |
Specifies the interface on which you want to enable multicast routing, and enters interface configuration mode. |
||
Step 3 |
ip igmp static-group
group-address Example: Switch(config-if)# ip igmp static-group 239.100.100.101 |
Configures the switch as a statically connected member of a group. By default, this feature is disabled.
|
||
Step 4 |
end Example: Switch(config-if)# end |
|||
Step 5 |
show ip igmp interface [
interface-id] Example: Switch# show ip igmp interface gigabitethernet 1/0/1 |
|||
Step 6 |
copy running-config startup-config Example: Switch# copy running-config startup-config |
Configuration Examples for IGMP Features
This example shows how to enable the switch to join multicast group 255.2.2.2:
Switch(config)# interface gigabitethernet1/0/1 Switch(config-if)# ip igmp join-group 255.2.2.2 Switch(config-if)#
This example shows how to configure hosts attached to a port as able to join only group 255.2.2.2:
Switch(config)# access-list 1 255.2.2.2 0.0.0.0 Switch(config-if)# interface gigabitethernet1/0/1 Switch(config-if)# ip igmp access-group 1
You can configure the following for your IP multicast configuration:
Related Topic | Document Title |
---|---|
For complete syntax and usage information for the commands used in this book. |
Catalyst 2960-XR Switch IP Multicast Command Reference |
Standard/RFC | Title |
---|---|
RFC 1112 |
Host Extensions for IP Multicasting |
RFC 2236 |
Internet Group Management Protocol, Version 2 |
MIB | MIBs Link |
---|---|
All supported MIBs for this release. |
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Description | Link |
---|---|
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. |