Configuring Basic IP Multicast Routing

Prerequisites for Basic IP Multicast Routing

The following are the prerequisites for configuring basic IP multicast routing:

  • To use this feature, the switch or stack master or active switch must be running the IP services feature set. The IP Services image contains complete 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.

    On a switch running the IP base image, if you try to configure a VLAN interface with PIM dense-mode, sparse-mode, or dense-sparse-mode, the configuration is not allowed.

  • 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.

Restrictions for Basic IP Multicast Routing

The following are the restrictions for IP multicast routing:

  • IP multicast routing is not supported on switches running the LAN base feature set.

Information About Basic 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 switches 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.

To use this feature, the switch or stack master must be running the IP Services feature set. To use the PIM stub routing feature, the switch or stack master can be running the IP Base image.

Multicast Routing and Switch Stacks

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 switch stack, the active switch 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 switch failure.

    If the active switch fails, all stack members delete their multicast routing tables. The newly elected active switch 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 switch.

Default IP Multicast Routing Configuration

This table displays the default IP multicast routing configuration.

Table 1. Default IP Multicast Routing Configuration

Feature

Default Setting

Multicast routing

Disabled on all interfaces.

PIM version

Version 2.

PIM mode

No mode is defined.

PIM stub routing

None configured.

PIM RP address

None configured.

PIM domain border

Disabled.

PIM multicast boundary

None.

Candidate BSRs

Disabled.

Candidate RPs

Disabled.

Shortest-path tree threshold rate

0 kb/s.

PIM router query message interval

30 seconds.

sdr Listener Support

The MBONE is the small subset of Internet routers and hosts that are interconnected and capable of forwarding IP multicast traffic. Other multimedia content is often broadcast over the MBONE. Before you can join a multimedia session, you need to know what multicast group address and port are being used for the session, when the session is going to be active, and what sort of applications (audio, video, and so forth) are required on your workstation. The MBONE Session Directory Version 2 (sdr) tool provides this information. This freeware application can be downloaded from several sites on the World Wide Web, one of which is http://www.video.ja.net/mice/index.html.

SDR is a multicast application that listens to a well-known multicast group address and port for Session Announcement Protocol (SAP) multicast packets from SAP clients, which announce their conference sessions. These SAP packets contain a session description, the time the session is active, its IP multicast group addresses, media format, contact person, and other information about the advertised multimedia session. The information in the SAP packet is displayed in the SDR Session Announcement window.

How to Configure Basic IP Multicast Routing

Configuring Basic IP Multicast Routing

By default, multicast routing is disabled, and there is no default mode setting.

This procedure is required.

Before you begin

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.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. ip multicast-routing distributed
  4. interface interface-id
  5. ip pim version [1 | 2 ]
  6. ip pim {dense-mode | sparse-mode | sparse-dense-mode }
  7. end
  8. show running-config
  9. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Switch> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.
Step 2

configure terminal

Example:


Switch# configure terminal

Enters the global configuration mode.

Step 3

ip multicast-routing distributed

Example:


Switch(config)# ip 
multicast-routing distributed

Enables IP multicast distributed switching

Note 
To disable multicasting, use the no ip multicast-routing distributed global configuration command.
Step 4

interface interface-id

Example:


Switch(config)# interface 
gigabitethernet 1/0/1

Specifies the Layer 3 interface on which you want to enable multicast routing, and enters interface configuration mode.

The specified interface must be one of the following:

  • A routed port—A physical port that has been configured as a Layer 3 port by entering the no switchport interface configuration command. You will also need to enable IP PIM sparse-dense-mode on the interface, and join the interface as a statically connected member to an IGMP static group.

  • An SVI—A VLAN interface created by using the interface vlan vlan-id global configuration command. You will also need to enable IP PIM sparse-dense-mode on the VLAN, join the VLAN as a statically connected member to an IGMP static group, and then enable IGMP snooping on the VLAN, the IGMP static group, and physical interface.

These interfaces must have IP addresses assigned to them.

Step 5

ip pim version [1 | 2 ]

Example:


Switch(config-if)# ip pim version 2

Configures the PIM version on the interface.

By default, Version 2 is enabled and is the recommended setting.

An interface in PIMv2 mode automatically downgrades to PIMv1 mode if that interface has a PIMv1 neighbor. The interface returns to Version 2 mode after all Version 1 neighbors are shut down or upgraded.

Note 

To return to the default PIM version, use the no ip pim version interface configuration command.

Step 6

ip pim {dense-mode | sparse-mode | sparse-dense-mode }

Example:


Switch(config-if)# ip pim 
sparse-dense-mode

Enables a PIM mode on the interface.

By default, no mode is configured.

The keywords have these meanings:

  • dense-mode —Enables dense mode of operation.

  • sparse-mode —Enables sparse mode of operation. If you configure sparse mode, you must also configure an RP.

  • sparse-dense-mode —Causes the interface to be treated in the mode in which the group belongs. Sparse-dense mode is the recommended setting.

Note 

To disable PIM on an interface, use the no ip pim interface configuration command.

Step 7

end

Example:


Switch(config-if)# end

Returns to privileged EXEC mode.

Step 8

show running-config

Example:


Switch# show running-config 

Verifies your entries.

Step 9

copy running-config startup-config

Example:


Switch# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring Optional IP Multicast Routing Features

Defining the IP Multicast Boundary

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.

This procedure is optional.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. access-list access-list-number deny source [source-wildcard]
  4. interface interface-id
  5. ip multicast boundary access-list-number
  6. end
  7. show running-config
  8. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Switch> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Switch# configure terminal

Enters the global configuration mode.

Step 3

access-list access-list-number deny source [source-wildcard]

Example:

Switch(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.

  • For access-list-number , the range is 1 to 99.

  • The deny keyword denies access if the conditions are matched.

  • For source , enter multicast addresses 224.0.1.39 and 224.0.1.40, which carry Auto-RP information.

  • (Optional) For source-wildcard , enter the wildcard bits in dotted decimal notation to be applied to the source. Place ones in the bit positions that you want to ignore.

The access list is always terminated by an implicit deny statement for everything.

Step 4

interface interface-id

Example:


Switch(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:

  • A routed port—A physical port that has been configured as a Layer 3 port by entering the no switchport interface configuration command.

    You will also need to enable IP PIM sparse-dense-mode on the interface, and join the interface as a statically connected member to an IGMP static group.

  • An SVI—A VLAN interface created by using the interface vlan vlan-id global configuration command.

    You will also need to enable IP PIM sparse-dense-mode on the VLAN, join the VLAN as a statically connected member to an IGMP static group, and then enable IGMP snooping on the VLAN, the IGMP static group, and physical interface.

These interfaces must have IP addresses assigned to them.

Step 5

ip multicast boundary access-list-number

Example:


Switch(config-if)# ip multicast boundary 12

Configures the boundary, specifying the access list you created in Step 2.

Note 

To remove the boundary, use the no ip multicast boundary interface configuration command.

Step 6

end

Example:


Switch(config)# end

Returns to privileged EXEC mode.

Step 7

show running-config

Example:


Switch# show running-config 

Verifies your entries.

Step 8

copy running-config startup-config

Example:


Switch# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring Multicast VRFs

For complete syntax and usage information for the commands, see the switch command reference for this release and the Cisco IOS IP Multicast Command Reference.

For more information about configuring a multicast within a Multi-VRF CE, see the IP Routing: Protocol-Independent Configuration Guide, Cisco IOS Release 15S.

Procedure

  Command or Action Purpose
Step 1

configure terminal

Example:


Switch# configure terminal

Enters the global configuration mode.

Step 2

ip routing

Example:


Switch(config)# ip routing

Enables IP routing mode.

Step 3

ip vrf vrf-name

Example:


Switch(config)# ip vrf vpn1

Names the VRF, and enter VRF configuration mode.

Step 4

rd route-distinguisher

Example:


Switch(config-vrf)# rd 100:2

Creates a VRF table by specifying a route distinguisher. Enter either an AS number and an arbitrary number (xxx:y) or an IP address and an arbitrary number (A.B.C.D:y)

Step 5

route-target {export | import | both } route-target-ext-community

Example:


Switch(config-vrf)# route-target import 100:2

Creates a list of import, export, or import and export route target communities for the specified VRF. Enter either an AS system number and an arbitrary number (xxx:y) or an IP address and an arbitrary number (A.B.C.D:y). The route-target-ext-community should be the same as the route-distinguisher entered in Step 4.

Step 6

import map route-map

Example:


Switch(config-vrf)# import map importmap1

(Optional) Associates a route map with the VRF.

Step 7

ip multicast-routing vrf vrf-name distributed

Example:


Switch(config-vrf)# ip multicast-routing vrf vpn1 distributed

(Optional) Enables global multicast routing for VRF table.

Step 8

interface interface-id

Example:


Switch(config-vrf)# interface gigabitethernet 1/0/2

Specifies the Layer 3 interface to be associated with the VRF, and enter interface configuration mode. The interface can be a routed port or an SVI.

Step 9

ip vrf forwarding vrf-name

Example:


Switch(config-if)# ip vrf forwarding vpn1

Associates the VRF with the Layer 3 interface.

Step 10

ip address ip-address mask

Example:


Switch(config-if)# ip address 10.1.5.1 255.255.255.0

Configures IP address for the Layer 3 interface.

Step 11

ip pim sparse-dense mode

Example:


Switch(config-if)# ip pim sparse-dense mode

Enables PIM on the VRF-associated Layer 3 interface.

Step 12

end

Example:


Switch(config)# end

Returns to privileged EXEC mode.

Step 13

show ip vrf [brief | detail | interfaces ] [vrf-name]

Example:


Switch# show ip vrf detail vpn1

Verifies the configuration. Displays information about the configured VRFs.

Step 14

copy running-config startup-config

Example:


Switch# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Advertising Multicast Multimedia Sessions Using SAP Listener

Enable SAP listener support when you want to use session description and announcement protocols and applications to assist the advertisement of multicast multimedia conferences and other multicast sessions and to communicate the relevant session setup information to prospective participants.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. ip sap cache-timeout minutes
  4. interface type number
  5. ip sap listen
  6. end
  7. clear ip sap [group-address | session-name ]
  8. show ip sap [group-address | session-name | detail ]

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Router# configure terminal

Enters global configuration mode.

Step 3

ip sap cache-timeout minutes

Example:


Router(config)# ip sap cache-timeout 600

(Optional) Limits how long a SAP cache entry stays active in the cache.

  • By default, SAP cache entries are deleted 24 hours after they are received from the network.

Step 4

interface type number

Example:


Router(config)# interface ethernet 1

Selects an interface that is connected to hosts on which IGMPv3 can be enabled.

Step 5

ip sap listen

Example:


Router(config-if)# ip sap listen

Enables the software to listen to session directory announcements.

Step 6

end

Example:


Router(config-if)# end

Ends the session and returns to EXEC mode.

Step 7

clear ip sap [group-address | session-name ]

Example:


Router# clear ip sap "Sample Session" 

Deletes a SAP cache entry or the entire SAP cache.

Step 8

show ip sap [group-address | session-name | detail ]

Example:


Router# show ip sap 224.2.197.250 detail

(Optional) Displays the SAP cache.

Monitoring and Maintaining Basic IP Multicast Routing

Clearing Caches, Tables, and Databases

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.

You can use any of the privileged EXEC commands in the following table to clear IP multicast caches, tables, and databases.

Table 2. Commands for Clearing Caches, Tables, and Databases

Command

Purpose

clear ip cgmp

Clears all group entries the Catalyst switches have cached.

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 pim auto-rp rp address

Clears the auto-RP cache.

clear ip sap [group-address | session-name]

Deletes the Session Directory Protocol Version 2 cache or an sdr cache entry.

Displaying System and Network Statistics

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.

You can use any of the privileged EXEC commands in the following table to display various routing statistics.

Table 3. Commands for Displaying System and Network Statistics

Command

Purpose

ping [group-name | group-address]

Sends an ICMP Echo Request to a multicast group address.

show ip igmp groups [group-name|group-address|type-number]

Displays the multicast groups that are directly connected to the switch and that were learned through IGMP.

show ip igmp interface [type number]

Displays multicast-related information about an interface.

show ip mcache [group [source]]

Displays the contents of the IP fast-switching cache.

show ip mpacket [source-address | name] [group-address | name] [detail ]

Displays the contents of the circular cache-header buffer.

show ip mroute [group-name | group-address] [source] [ count | interface | proxy | pruned | summary | verbose ]

Displays the contents of the IP multicast routing table.

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.

show ip pim neighbor [type number]

Lists the PIM neighbors discovered by the switch. This command is available in all software images.

show ip pim rp [group-name | group-address]

Displays the RP routers associated with a sparse-mode multicast group. This command is available in all software images.

show ip rpf {source-address | name}

Displays how the switch is doing Reverse-Path Forwarding (that is, from the unicast routing table, DVMRP routing table, or static mroutes).

Command parameters include:

  • Host name or IP address —IP name or group address.

  • Select —Group-based VRF select information.

  • vrf —Selects VPN Routing/Forwarding instance.

show ip sap [group | session-name | detail ]

Displays the Session Announcement Protocol (SAP) Version 2 cache.

Command parameters include:

  • A.B.C.D —IP group address.

  • WORD —Session name (in double quotes).

  • detail —Session details.

Displaying Multicast Peers, Packet Rates and Loss Information, and Path Tracing

You can use the privileged EXEC commands in the following table to monitor IP multicast routers, packets, and paths.

Table 4. Commands for Displaying Multicast Peers, Packet Rates and Loss Information, and Path Tracing

Command

Purpose

mrinfo [hostname | address] [source-address | interface]

Queries a multicast router or multilayer switch about which neighboring multicast devices are peering with it.

mstat source [destination] [group]

Displays IP multicast packet rate and information loss.

Additional References

Related Documents

Related Topic Document Title

For complete syntax and usage information for the commands used in this chapter.

Command Reference, Cisco IOS Release 15.2(2)E (Catalyst 3750-X and 3560-X Switches)

Cisco IOS commands

Cisco IOS Master Commands List, All Releases

Cisco IOS IP multicast commands

Cisco IOS IP Multicast Command Reference

Error Message Decoder

Description Link

To help you research and resolve system error messages in this release, use the Error Message Decoder tool.

https://www.cisco.com/cgi-bin/Support/Errordecoder/index.cgi

Standards and RFCs

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

MIBs

MIB MIBs Link

All the 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:

http://www.cisco.com/go/mibs

Technical Assistance

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.

http://www.cisco.com/support