Multicast cookbook

IOS recipes to implement multicast in your network.
by Marco d'Itri
Did you really like this tutorial?
Buy me a book then! :-)

This document explains how to enable the basic features of multicast routing in your network and how to exchange multicast traffic with other networks.

General configuration

Multicast processing needs to be enabled on routers which will route multicast packets. Also, fast switching or distributed switching should be enabled on each interface to improve performances:

ip multicast routing

interface FastEthernet0/0
 ! choose the right one depending on your platform
 ip mroute-cache                  ! on the RSP (is this useful on others?)
 ip mroute-cache distributed      ! on the GSR

IGMP

IGMP needs to be enabled on every interface to which hosts are connected, but is not needed on backbone links. Support for IGMP Version 2 is enabled by default, but Version 3 (required by SSM) needs to be explicitly configured:

interface FastEthernet0/0
 ip igmp version 3
 ip igmp explicit-tracking

Explicit tracking of hosts, groups, and channels improves the leave latency of groups.

At this point, multicast will work among the hosts directly connected to the router.

PIM

The PIM protocol is used by routers to signal to other routers that they want to receive (or stop receiving) the traffic for a specific multicast group, and must be enabled on all backbone interfaces (i.e. which are not connected to hosts). The recommended variant is PIM-SM (sparse mode) with SSM enabled.

PIM-speaking routers need to know the address of the RP to be used for each group, either on-network or on the network of an upstream provider. The recommended configuration is to use a single RP for all groups and to statically configure it on every multicast router:

ip pim rp-address 213.254.2.3
ip pim ssm default

interface FastEthernet0/0
 ip pim sparse-mode

Configuring a local Rendezvous Point

If your upstream provider does not have a RP usable by customers or you need better performance or reliability, you can use a well-connected router in your network as the local RP. No special configuration is needed for basic operations.

At this point, multicast will work among hosts in your network. ASM will only work if you configured a RP.

If customers are connected to PIM-enabled interfaces it is higly recommended that appropriate filtering is used.

BGP

Multicast routing requires knowing routes for the packets sources, to perform the RPF checks. Multicast BGP neighbor are configured just like unicast neighbors, but using the multicast address-family:

router bgp 12779
 neighbor 194.116.100.1 remote-as 25309
 neighbor 194.116.100.1 peer-group MULTICAST-PEERS
 neighbor 194.116.100.1 description A multicast peer
 address-family ipv4 multicast
 neighbor MULTICAST-PEERS route-map MULTICAST-PEERS-OUT out
 neighbor 194.116.100.1 peer-group MULTICAST-PEERS
 neighbor 194.116.100.1 soft-reconfiguration inbound
 neighbor 194.116.100.1 route-map AS25309-MCAST-IN in

These routes control where multicast traffic will be requested from, so the usual BGP tuning knobs can be used for traffic engineering of inbound multicast data.

At this point interdomain SSM will work. Interdomain ASM will work only if you are using the RP provided by your upstream.

MSDP

The MSDP protocol allows two Rendezvous Points to share their knowledge of multicast sources. It is needed for ASM operations between different PIM domains (and can be used inside a domain to duplicate a RP for redundancy).

If you have a local RP and want to use interdomain ASM (you usually do) then you will use it to peer with the RPs of multicast neigbors:

ip msdp cache-sa-state

ip msdp peer 217.147.96.16 connect-source Loopback1
ip msdp description 217.147.96.16 SPRINT RP

It is strongly recommended that sa-filters are configured to prevent learning and advertising groups or sources which should only be used locally.

Debugging

Display which routers are speaking PIM:

router#show ip pim neighbor

Display all directly connected multicast groups:

router#show ip igmp groups

Advanced topics

  1. Bidirectional PIM
  2. Anycast RP
  3. Secure Multicast Network Configuration Guide

References

  1. Cisco Configuring Source Specific Multicast
  2. Cisco Multicast Quick-Start Configuration Guide
  3. Cisco Tutorials from the SANOG 7 multicast workshop
  4. Jan Novak Debugging Multicast on TEN-155