Multicast - IOS

Function: 
Description

Configuring basic multicast forwarding on a Cisco router using IOS requires enabling IP and multicast forwarding, and configuring basic IP and some form of multicast routing on at least two interfaces. A router configured in this manner will use Internet Group Management Protocol (IGMP) to keep track of multicast groups on the network.

WARNING: This page explains how to configure the PIM family of multicast routing protocols. The "PI" in PIM stands for "protocol independent"... referring to the fact that these protocols don't implement a unicast routing protocol to use in the "reverse path forwarding" path selection process used by PIM protocols. This means you need to have some form of unicast routing protocol running for PIM to work. While static unicast routes would probably work in the context of no topology changes... this is a dangerous assumption to make (especially for the multicast lab most people use this page for:).

Enabling IGMP

The following IOS commands are useful when enabling multicast:

ip multicast-routing

no ip multicast-routing

      -The first command enables the forwarding of IP multicast packets, and the second command disables multicast forwarding.

show ip mroute

      -Displays the multicast routing table for all groups.

clear ip mroute *

      -Deletes all multicast routing table entries.

show ip igmp groups

show ip igmp interface interface

      -Displays the multicast groups that have group members on the interfaces of the router. The first command displays information on all multicast groups that have members. The second command displays multicast groups that have group members on the network attached to the given interface.

ip pim dense-mode

ip pim sparse-mode

ip pim sparse-dense-mode

      -Enables IGMP and multicast routing protocols PIM-DM or PIM-SM for an interface. The option sparse-dense-mode uses PIM-SM if a rendezvous point is known and PIM-DM when a rendezvous point is not known.

ip pim rp-address 10.0.3.2

      -Sets the IP address for the PIM-SM rendezvous point.

ip pim spt-threshold infinity

      -Set the PIM-SM shortest-path tree threshold to infininity, forcing PIM-SM to stay in RPT mode.

Example Commands

Enabling multicast on a router

Router1# configure terminal

Router1(config)# no ip routing

Router1(config)# ip routing

Router1(config)# no ip multicast-routing

Router1(config)# ip multicast-routing

Router1(config)# interface Fa0/0 

Router1(config-if)# no shutdown

Router1(config-if)# ip address 10.10.10.20 255.255.255.0

Router1(config-if)# ip pim dense-mode

Router1(config-if)# end

Router1# clear ip route *

Router1# clear ip mroute *

Links

Cisco Multicast documentation (PDF)

PacketLife Cheat Sheets: Multicast