By default, a Layer 3 device will isolate multicast traffic to the
segment on which it was generated, not forwarding it across the router to other
network segments. Enabling IP multicast routing allows a Layer 3 device to
forward multicast packets based upon the configuration of the Multicast routing
protocol. The general steps to enabling and verifying multicast routing are
outlined:

1.
Enable IP Multicast Routing
A single command is used from global
configuration to enable multicast routing:
Switch(config)#ip
multicast-routing
2. Enable a Multicast Routing
Protocol
The multicast routing protocol, which is PIM on a campus
network, establishes the rules by which multicast traffic will be forwarded
onto various network segments by the Layer 3 device. An interface can be
configured to operate in PIM dense mode, sparse mode, or sparse-dense mode. The
mode determines how the Layer 3 device populates its multicast routing table
and how it forwards multicast packets received from directly connected
segments. Enabling PIM on an interface also enables IGMP operation on that
interface.
At interface configuration mode, configure the PIM mode of
operation for the interface. 
When the switch populates 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 routers, or when
there is a directly connected member on the interface. If configured for sparse
or sparse-dense mode, multicast sparse mode operation will occur if there is a
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. By
default, multicast routing is disabled on an interface.
3. Configure
the RP for Sparse Mode Operation
Routers with group members on its
direction-connected interfaces as the RP address to send PIM register messages
up the tree. On routers in the tree that are closest to the RP, the RP address
is used to send PIM join and prune messages to the RP, and to inform it about
group membership down the tree from that point. The RP address must be
configured on all routers anywhere in the tree that will carry traffic from a
source to its member (including the RP router). 
4. Verify IP Multicast Operations
These commands are available to
verify and monitor IP multicast operations such as; operational statistics,
resource utilization, multicast database content, troubleshooting information,
node reachability and Multicast routing paths. Some of the commands are further
delineated in the lesson.

5. Verify PIM
Figure
shows output
from the show ip pim interface command.
Figure
shows output
from the show ip pim interface command with a
count.
Figure
shows sample
output from the show ip pim interface command with a count
when IP multicast is enabled. The example lists the PIM interfaces that are
fast switched and process switched, and lists the packet counts for these. H
indicates that multicast enabled interfaces.
6. Verify Multicast Routing & Clearing the Routing Table
Figure
shows the output
from several iterations of the show ip mroute command.
 |
NOTE:
Output interface timers are not updated for hardware-forwarded
packets. Entry timers are updated approximately every 5 seconds.
|
Figure
shows sample output from the show ip mroute
command with the summary keyword.
Figure
shows
sample output from the show ip mroute command with the
active keyword.
Figure
shows
sample output from the show ip mroute command with the
count keyword:
Clearing the Multicast Routing
Table
After configuration changes are made, the IP multicast tables may
need to be cleared before accurate table information will display. This is
particularly true when changes are made at several contiguous routers. Use the
following EXEC mode command to clear the tables:
Switch#clear ip mroute
After
executing this command, use the show ip mroute command to
display new multicast routing table information built after the clear command
was executed.