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.
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
The following are the prerequisites for configuring basic IP multicast routing:
You must configure the PIM version and the PIM mode in order to perform IP multicast routing. The switch populates its multicast routing table and forwards multicast packets it receives from its directly connected LANs according to the mode setting. You can configure an interface to be in the PIM dense mode, sparse mode, or sparse-dense mode.
Enabling PIM on an interface also enables IGMP operation on that interface. (To participate in IP multicasting, the multicast hosts, routers, and multilayer device must have IGMP operating. )
If you enable PIM on multiple interfaces, when most of these interfaces are not on the outgoing interface list, and IGMP snooping is disabled, the outgoing interface might not be able to sustain line rate for multicast traffic because of the extra replication.
The following are the restrictions for IP multicast routing:
IP multicasting is an efficient way to use network resources, especially for bandwidth-intensive services such as audio and video. IP multicast routing enables a host (source) to send packets to a group of hosts (receivers) anywhere within the IP network by using a special form of IP address called the IP multicast group address.
The sending host inserts the multicast group address into the IP destination address field of the packet, and IP multicast routers and multilayer devices forward incoming IP multicast packets out all interfaces that lead to members of the multicast group. 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.
The device uses the Multicast Forwarding Information Base (MFIB) architecture and the Multicast Routing Information Base (MRIB) for IP multicast.
The MFIB architecture provides both modularity and separation between the multicast control plane (Protocol Independent Multicast [PIM] and Internet Group Management Protocol [IGMP]) and the multicast forwarding plane (MFIB). This architecture is used in Cisco IOS IPv6 multicast implementations.
MFIB itself is a multicast routing protocol independent forwarding engine; that is, it does not depend on PIM or any other multicast routing protocol. It is responsible for:
Forwarding multicast packets
Registering with the MRIB to learn the entry and interface flags set by the control plane
Handling data-driven events that must be sent to the control plane
Maintaining counts, rates, and bytes of received, dropped, and forwarded multicast packets
The MRIB is the communication channel between MRIB clients. Examples of MRIB clients are PIM, IGMP, the multicast routing (mroute) table, and the MFIB.
For all multicast routing protocols, the entire stack appears as a single router to the network and operates as a single multicast router.
In a device stack, the active device performs these functions:
It is responsible for completing the IP multicast routing functions of the stack. It fully initializes and runs the IP multicast routing protocols.
It builds and maintains the multicast routing table for the entire stack.
It is responsible for distributing the multicast routing table to all stack members.
The stack members perform these functions:
They act as multicast routing standby devices and are ready to take over if there is a active device failure.
If the active device fails, all stack members delete their multicast routing tables. The newly elected active device starts building the routing tables and distributes them to the stack members.
They do not build multicast routing tables. Instead, they use the multicast routing table that is distributed by the active device.
This table displays the default IP multicast routing configuration.
How to Configure Basic IP Multicast Routing
By default, multicast routing is disabled, and there is no default mode setting.
You must configure the PIM version and the PIM mode. The switch populates its multicast routing table and forwards multicast packets it receives from its directly connected LANs according to the mode setting.
In populating the multicast routing table, dense-mode interfaces are always added to the table. Sparse-mode interfaces are added to the table only when periodic join messages are received from downstream devices or when there is a directly connected member on the interface. When forwarding from a LAN, sparse-mode operation occurs if there is an RP known for the group. If so, the packets are encapsulated and sent toward the RP. When no RP is known, the packet is flooded in a dense-mode fashion. If the multicast traffic from a specific source is sufficient, the receiver’s first-hop router might send join messages toward the source to build a source-based distribution tree.
You can use the following procedure to configure IPv4 Multicast Forwarding Information Base (MFIB) interrupt-level IP multicast forwarding of incoming packets or outgoing packets on the device.
Note | After you have enabled IP multicast routing by using the ip multicast-routing command, IPv4 multicast forwarding is enabled. Because IPv4 multicast forwarding is enabled by default, you can use the no form of the ip mfib command to disable IPv4 multicast forwarding. |
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 | configure
terminal
Example: Device# configure terminal | |
Step 3 | ip mfib
Example: Device(config)# ip mfib
|
Enables IP multicast forwarding. |
Step 4 | exit
Example: Device(config)# exit | |
Step 5 | show
running-config
Example: Device# show running-config | |
Step 6 | copy
running-config startup-config
Example: Device# copy running-config startup-config |
You can use the following procedure to configure static mroutes. Static mroutes are similar to unicast static routes but differ in the following ways:
Static mroutes are used to calculate RPF information, not to forward traffic.
Static mroutes cannot be redistributed.
Static mroutes are strictly local to the device on which they are defined. Because Protocol Independent Multicast (PIM) does not have its own routing protocol, there is no mechanism to distribute static mroutes throughout the network. Consequently, the administration of static mroutes tends to be more complicated than the administration of unicast static routes.
When static mroutes are configured, they are stored on the device in a separate table referred to as the static mroute table. When configured, the ip mroute command enters a static mroute into the static mroute table for the source address or source address range specified for the source-address and mask arguments. Sources that match the source address or that fall in the source address range specified for the source-address argument will RPF to either the interface associated with the IP address specified for the rpf-address argument or the local interface on the device specified for the interface-type and interface-number arguments. If an IP address is specified for the rpf-address argument, a recursive lookup is done from the unicast routing table on this address to find the directly connected neighbor.
If there are multiple static mroutes configured, the device performs a longest-match lookup of the mroute table. When the mroute with the longest match (of the source-address) is found, the search terminates and the information in the matching static mroute is used. The order in which the static mroutes are configured is not important.
The administrative distance of an mroute may be specified for the optional distance argument. If a value is not specified for the distance argument, the distance of the mroute defaults to zero. If the static mroute has the same distance as another RPF source, the static mroute will take precedence. There are only two exceptions to this rule: directly connected routes and the default unicast route.
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 | configure
terminal
Example: Device# configure terminal | |
Step 3 | ip mroute [vrf
vrf-name]
source-address mask {
fallback-lookup {global |
vrf
vrf-name }[ protocol ] {rpf-address |
interface-type
interface-number}} [distance]
Example: Device(configure)# ip mroute 10.1.1.1 255.255.255.255 10.2.2.2
|
The source IP address 10.1.1.1 is configured to be reachable through the interface associated with IP address 10.2.2.2. |
Step 4 | exit
Example: Device(config)# exit | |
Step 5 | show
running-config
Example: Device# show running-config | |
Step 6 | copy
running-config startup-config
Example: Device# copy running-config startup-config |
Configuring Optional IP Multicast Routing Features
You define a multicast boundary to prevent Auto-RP messages from entering the PIM domain. You create an access list to deny packets destined for 224.0.1.39 and 224.0.1.40, which carry Auto-RP information.
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. Enter your password if prompted. |
Step 2 | configure
terminal
Example: Device# configure terminal | |
Step 3 | access-list
access-list-number
deny
source [source-wildcard]
Example: Device(config)#
access-list 12 deny 224.0.1.39
access-list 12 deny 224.0.1.40
|
Creates a standard access list, repeating the command as many times as necessary.
The access list is always terminated by an implicit deny statement for everything. |
Step 4 | interface
interface-id
Example:
Device(config)# interface gigabitethernet 1/0/1
|
Specifies the interface to be configured, and enters interface configuration mode. The specified interface must be one of the following:
|
Step 5 | ip multicast
boundary
access-list-number
Example:
Device(config-if)# ip multicast boundary 12
|
Configures the boundary, specifying the access list you created in Step 2. |
Step 6 | end
Example: Device(config)# end | |
Step 7 | show running-config
Example: Device# show running-config | |
Step 8 | copy running-config
startup-config
Example:
Device# copy running-config startup-config
|
(Optional) Saves your entries in the configuration file. |
Configuring sdr Listener Support
By default, the device does not listen to session directory advertisements.
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 | configure
terminal
Example: Device# configure terminal | |
Step 3 | interface
interface-id
Example:
Device(config)# interface
gigabitethernet 1/0/1
|
Specifies the interface to be enabled for sdr, and enters interface configuration mode. The specified interface must be one of the following:
|
Step 4 | ip sap
listen
Example:
Device(config-if)# ip sap listen
|
Enables the device software to listen to session directory announcements. |
Step 5 | end
Example:
Device(config-if)# end
| |
Step 6 | show
running-config
Example:
Device# show running-config
| |
Step 7 | copy
running-config startup-config
Example:
Device# copy running-config
startup-config
|
By default, entries are never deleted from the sdr cache. You can limit how long the entry remains active so that if a source stops advertising SAP information, old advertisements are not unnecessarily kept.
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example:
Device> enable
|
Enables privileged EXEC mode. |
Step 2 | configure
terminal
Example: Device# configure terminal | |
Step 3 | ip sap
cache-timeout
minutes
Example:
Device(config)# ip sap cache-timeout 30
|
Limits how long a Session Announcement Protocol (SAP) cache entry stays active in the cache. |
Step 4 | end
Example: Device(config)# end | |
Step 5 | show
running-config
Example:
Device# show running-config
| |
Step 6 | show ip
sap
Example:
Device# show ip sap
| |
Step 7 | copy
running-config startup-config
Example:
Device# copy running-config
startup-config
|
You can remove all contents of a particular cache, table, or database. Clearing a cache, table, or database might be necessary when the contents of the particular structure are or suspected to be invalid.
Command |
Purpose |
---|---|
clear ip igmp group {group [ hostname | IP address] | vrf name group [ hostname | IP address] } |
Deletes entries from the IGMP cache. |
clear ip mroute { * | [hostname | IP address] | vrf name group [ hostname | IP address] } |
Deletes entries from the IP multicast routing table. |
clear ip sap [group-address | “session-name”] |
Deletes the Session Directory Protocol Version 2 cache or an sdr cache entry. |
You can display specific statistics, such as the contents of IP routing tables, caches, and databases.
Note | This release does not support per-route statistics. |
You can display information to learn resource usage and solve network problems. You can also display information about node reachability and discover the routing path that packets of your device are taking through the network.
Command |
Purpose |
---|---|
ping [group-name | group-address] |
|
show ip igmp groups [group-name|group-address|type-number] |
Displays the multicast groups that are directly connected to the device and that were learned through IGMP. |
Displays multicast-related information about an interface. |
|
show ip mroute [group-name | group-address] [source] [ count | interface | proxy | pruned | summary | verbose] |
|
show ip pim interface [type number] [count | detail | df | stats ] |
Displays information about interfaces configured for PIM. This command is available in all software images. |
Lists the PIM neighbors discovered by the device. This command is available in all software images. |
|
Displays the RP routers associated with a sparse-mode multicast group. This command is available in all software images. |
|
Displays how the device is doing Reverse-Path Forwarding (that is, from the unicast routing table, DVMRP routing table, or static mroutes). Command parameters include: |
|
show ip sap [group | “session-name” | detail] |
Displays the Session Announcement Protocol (SAP) Version 2 cache. Command parameters include: |
Command |
Purpose |
---|---|
Configuration Examples for IP Multicast Routing
This example shows how to set up a boundary for all administratively-scoped addresses:
Device(config)# access-list 1 deny 239.0.0.0 0.255.255.255 Device(config)# access-list 1 permit 224.0.0.0 15.255.255.255 Device(config)# interface gigabitethernet1/0/1 Device(config-if)# ip multicast boundary 1
The software answers mrinfo requests sent by mrouted systems and Cisco routers and multilayer devices. The software returns information about neighbors through DVMRP tunnels and all the routed interfaces. This information includes the metric (always set to 1), the configured TTL threshold, the status of the interface, and various flags. You can also use the mrinfo privileged EXEC command to query the router or device itself, as in this example:
Device# mrinfo 171.69.214.27 (mm1-7kd.cisco.com) [version cisco 11.1] [flags: PMS]: 171.69.214.27 -> 171.69.214.26 (mm1-r7kb.cisco.com) [1/0/pim/querier] 171.69.214.27 -> 171.69.214.25 (mm1-45a.cisco.com) [1/0/pim/querier] 171.69.214.33 -> 171.69.214.34 (mm1-45c.cisco.com) [1/0/pim] 171.69.214.137 -> 0.0.0.0 [1/0/pim/querier/down/leaf] 171.69.214.203 -> 0.0.0.0 [1/0/pim/querier/down/leaf] 171.69.214.18 -> 171.69.214.20 (mm1-45e.cisco.com) [1/0/pim] 171.69.214.18 -> 171.69.214.19 (mm1-45c.cisco.com) [1/0/pim] 171.69.214.18 -> 171.69.214.17 (mm1-45a.cisco.com) [1/0/pim]
Related Topic | Document Title |
---|---|
For complete syntax and usage information for the commands used in this chapter. |
See the IP Multicast Routing Commands section of theCommand Reference, Cisco IOS XE Everest 16.5.1a (Catalyst 9300 Series Switches) ) |
Cisco IOS commands |
Standard/RFC | Title |
---|---|
RFC 1112 |
Host Extensions for IP Multicasting |
RFC 2236 |
Internet Group Management Protocol, Version 2 |
RFC 4601 |
Protocol-Independent Multicast-Sparse Mode (PIM-SM): Protocol Specification |
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. |
Release |
Modification |
---|---|
Cisco IOS XE Everest 16.5.1a |
This feature was introduced. |