IP multicasting is a bandwidth-conserving technology that reduces traffic by simultaneously delivering a single stream of information to thousands of corporate recipients and homes. Applications that take advantage of multicast include video conferencing, corporate communications, distance learning, and distribution of software, stock quotes, and news. This document discusses the basics of configuring multicast for various networking scenarios.
Note: In the examples throughout this document, the "Source" represents the source of multicast traffic and the "Receiver" represents the receiver of multicast traffic.
Router A Configuration |
---|
ip multicast-routing interface ethernet0 ip address <address> <mask> ip pim sparse-dense-mode interface serial0 ip address <address> <mask> ip pim sparse-dense-mode |
Router B Configuration |
---|
ip multicast-routing interface serial0 ip address <address> <mask> ip pim sparse-dense-mode interface ethernet0 ip address <address> <mask> ip pim sparse-dense-mode |
Router A Configuration |
---|
ip multicast-routing interface ethernet0 ip address <address> <mask> ip pim sparse-dense-mode interface serial0 ip address 1.1.1.1 255.255.255.0 ip pim sparse-dense-mode |
Router B Configuration |
---|
ip multicast-routing ip pim rp-address 1.1.1.1 interface serial0 ip address <address> <mask> ip pim sparse-dense-mode interface ethernet0 ip address <address> <mask> ip pim sparse-dense-mode |
RP 1 Configuration |
---|
ip multicast routing ip pim RP-address 2.2.2.2 3 access-list 3 permit 224.2.2.2 access-list 3 permit 224.2.2.3 access-list 3 permit 224.2.2.4 |
RP 2 Configuration |
---|
ip multicast routing ip pim RP-address 1.1.1.1 2 access-list 2 permit 224.1.1.1 access-list 2 permit 224.1.1.2 access-list 2 permit 224.1.1.3 |
Configuration for Routers 3 and 4 |
---|
ip multicast-routing ip pim RP-address 1.1.1.1 2 ip pim RP-address 2.2.2.2 3 access-list 2 permit 224.1.1.1 access-list 2 permit 224.1.1.2 access-list 2 permit 224.1.1.3 access-list 3 permit 224.2.2.2 access-list 3 permit 224.2.2.3 access-list 3 permit 224.2.2.4 |
Router A Configuration |
---|
ip multicast-routing ip pim send-rp-announce ethernet0 scope 16 ip pim send-rp-discovery scope 16 interface ethernet0 ip address <address> <mask> ip pim sparse-dense-mode interface serial0 ip address <address> <mask> ip pim sparse-dense-mode |
Router B Configuration |
---|
ip multicast-routing interface ethernet0 ip address <address> <mask> ip pim sparse-dense-mode interface serial0 ip address <address> <mask> ip pim sparse-dense-mode |
To influence which router is the RP for a particular group, when two RPs are announcing for that group, you can configure each router with a loopback address. Place the higher IP address on the preferred RP, then use the loopback interface as the source of the announce packets; for example, ip pim send-RP-announce loopback0. When multiple mapping agents are used, they listen to each other's discovery packets and the mapping agent with the highest IP address wins and becomes the only forwarder of 224.0.1.40.
RP 1 Configuration |
---|
ip multicast-routing ip pim send-RP-announce ethernet0 scope 16 group-list 1 ip pim send-RP-discovery scope 16 access-list 1 permit 239.0.0.0 0.255.255.255 |
RP 2 Configuration |
---|
ip multicast-routing ip pim send-RP-announce ethernet0 scope 16 group-list 1 ip pim send-RP-discovery scope 16 access-list 1 deny 239.0.0.0 0.255.255.255 access-list 1 permit 224.0.0.0 15.255.255.255 |
Additional details on Auto-RP can be found here: ftp://ftpeng.cisco.com/ipmulticast/autorp.html
Typically, the ISP will have you tunnel to a Unix machine running "mrouted" (DVMRP). If they instead have you tunnel to another Cisco device, use default GRE tunnel mode instead.interface tunnel0 ip unnumbered <any pim interface> tunnel source <address of source> tunnel destination <address of ISPs mrouted box> tunnel mode dvmrp ip pim sparse-dense-mode
If instead of simply receiving multicast packets, you want to generate multicast packets for others on the mbone to see, you need to advertise the source's subnets. If your multicast source host address is 131.108.1.1, you need to advertise the existence of that subnet to the mbone. By default, directly-connected networks are advertised with metric 1. If your source is not directly connected to the router with the DVMRP tunnel, configure the following under interface tunnel0:
If your setup is similar to the one shown below, and you want to propagate DVMRP routes through the domain, configure ip dvmrp unicast-routing on the serial0 interfaces of Routers A and B. This will provide the forwarding of DVMRP routes to PIM neighbors who will then have a DVMRP routing table used for RPF. DVMRP learned routes take Reverse Path Forwarding (RPF) precedence over all other protocols, except for directly-connected routes.ip dvmrp metric 1 list 3 access-list 3 permit 131.108.1.0 0.0.0.255Note: You must include an access list with the above command to prevent advertising the entire unicast routing table to the mbone.
Router A Configuration |
---|
ip multicast-routing interface loopback0 ip pim sparse-dense-mode ip address 192.168.2.2 255.255.255.0 interface serial0 ip address 192.168.100.1 255.255.255.0 interface serial1 ip pim sparse-dense-mode ip address 192.168.200.1 255.255.255.0 router bgp 123 network 192.168.100.0 nlri unicast network 192.168.200.0 nlri multicast neighbor 192.168.1.1 remote-as 321 nlri unicast multicast neighbor 192.168.1.1 ebgp-multihop 255 neighbor 192.168.100.2 update-source loopback0 neighbor 192.168.1.1 route-map setNH out route-map setNH permit 10 match nlri multicast set ip next-hop 192.168.200.1 route-map setNH permit 20 |
Router B Configuration |
---|
ip multicast-routing interface loopback0 ip pim sparse-dense-mode ip address 192.168.1.1 255.255.255.0 interface serial0 ip address 192.168.100.2 255.255.255.0 interface serial1 ip pim sparse-dense-mode ip address 192.168.200.2 255.255.255.0 router bgp 321 network 192.168.100.0 nlri unicast network 192.168.200.0 nlri multicast neighbor 192.168.2.2 remote-as 123 nlri unicast multicast neighbor 192.168.2.2 ebgp-multihop 255 neighbor 192.168.100.1 update-source loopback0 neighbor 192.168.2.2 route-map setNH out route-map setNH permit 10 match nlri multicast set ip next-hop 192.168.200.2 route-map set NH permit 20 |
If your unicast and multicast topologies are congruent (for example, the are going over the same link), the primary difference in the configuration is with the nlri unicast multicast command. And example is shown below:
The benefit of having MBGP running in the case of congruent topologies is that even though the traffic is traversing the same paths, different policies can be applied to unicast BGP versus multicast BGP.network 192.168.100.0 nlri unicast multicast
Additional details on MBGP can be found here: ftp://ftpeng.cisco.com/ipmulticast.html#MBGP
Router A Configuration |
---|
ip multicast-routing ip pim send-RP-announce ethernet0 scope 16 ip pim send-RP-discovery scope 16 ip msdp peer 192.168.100.2 ip msdp sa-request 192.168.100.2 interface serial0 ip address 192.168.100.1 255.255.255.0 ip pim sparse-dense-mode |
Router B Configuration |
---|
ip multicast-routing ip pim send-RP-announce ethernet0 scope 16 group-list 1 ip pim send-RP-discovery scope 16 ip msdp peer 192.168.100.1 ip msdp sa-request 192.168.100.1 interface serial0 ip address 192.168.100.2 255.255.255.0 ip pim sparse-dense-mode |
Router 1 Configuration |
---|
int s0 ip pim sparse-dense-mode ip pim neighbor-filter 1 access-list 1 deny 140.1.1.1 |
The ip pim neighbor-filter command is needed so that Router 1
does not recognize Router 2 as a PIM neighbor. If you configure Router
1 in sparse mode, the neighbor filter is unnecessary. Router 2 must not
run in sparse mode. When in dense mode, the stub multicast sources are
able to flood to the backbone routers.
Router 2 Configuration |
---|
ip multicast-routing int e0 ip pim sparse-dense-mode ip igmp helper-address 140.1.1.2 int s0 ip pim sparse-dense-mode |
Uplink-rtr Configuration |
---|
ip multicast-routing interface Ethernet0 description Typical IP multicast enabled interface ip address 12.0.0.1 255.0.0.0 ip pim sparse-dense-mode interface Ethernet1 description Back channel which has connectivity to downlink-rtr ip address 11.0.0.1 255.0.0.0 ip pim sparse-dense-mode interface Serial0 description Unidirectional to downlink-rtr ip address 10.0.0.1 255.0.0.0 ip pim sparse-dense-mode ip igmp unidirectional-link no keepalive |
Downlink-rtr Configuration |
---|
ip multicast-routing interface Ethernet0 description Typical IP multicast enabled interface ip address 14.0.0.2 255.0.0.0 ip pim sparse-dense-mode ip igmp helper-address udl serial0 interface Ethernet1 description Back channel which has connectivity to downlink-rtr ip address 13.0.0.2 255.0.0.0 ip pim sparse-dense-mode interface Serial0 description Unidirectional to uplink-rtr ip address 10.0.0.2 255.0.0.0 ip pim sparse-dense-mode ip igmp unidirectional-link no keepalive |
Step 1: On the candidate BSRs configure:
Step 2: Configure candidate RP routers. The following example shows a candidate RP, on the interface ethernet0, for the entire admin-scope address range:ip pim bsr-candidate <interface> <hash-mask-len> <pref>Where <interface> contains the candidate BSRs IP address. It is recommended (but not required) that <hash-mask-Len> be the same across all candidate BSRs. A candidate BSR with the largest <pref> value will be elected as the BSR for this domain.Example command usage is shown below:
ip pim bsr-candidate ethernet0 30 4The PIMv2 BSR is used to collect candidate RP information and to disseminate RP-set information associated with each group prefix. To avoid single point of failure, more than one router in a domain can be configured as candidate BSRs.A BSR is elected among the candidate BSRs automatically, based on the preference values configured. The routers to serve as candidate BSRs should be well connected and be in the backbone of the network, as opposed to in the dialup area of the network.
access-list 11 permit 239.0.0.0 0.255.255.255 ip pim rp-candidate ethernet0 group-list 11
Then, configure the following on the switch:ip pim sparse-dense-mode ip cgmp
set cgmp enable
The example below demonstrates how to enable IGMP snooping on the switch:
If you try to enable IGMP but CGMP is already enabled, you will see the following:Console> (enable) set igmp enable IGMP Snooping is enabled. CGMP is disabled.
Console> (enable) set igmp enable Disable CGMP to enable IGMP Snooping feature.
There are no PGM global commands. PGM is configured per interface using
the ip pgm command. Multicast routing must be enabled on the router
along with PIM on the interface.
MRM has two components: MRM tester and MRM manager. MRM Tester is a sender and/or receiver.
MRM is available in Cisco IOS 12.0(5)T and later. Only the MRM testers and managers need to be running the MRM-supported IOS version.
Make sure that the "Multicast Forwarding Network" has no access lists
or boundaries that deny MRM data/control traffic. MRM test data is UDP/RTP
packets addressed to configured group address. MRM control traffic between
sender, receiver, and manager is addressed to 224.0.1.111 group, which
is joined by all three.
Test Sender Configuration |
---|
interface Ethernet0 ip mrm test-sender |
Test Receiver Configuration |
---|
interface Ethernet0 ip mrm test-receiver |
Test Manager Configuration |
---|
ip mrm manager test1 manager e0 group 239.1.1.1 senders 1 receivers 2 sender-list 1 access-list 1 permit 10.1.1.2 access-list 2 permit 10.1.4.2 |
Output from the show ip mrm manager command on Test Manager is shown below:
Start the test using the command shown below. The test manager sends control messages to the test sender and test receiver as configured in the test parameters. The test receiver joins the group and monitors test packets sent from the test sender.Test_Manager# show ip mrm manager Manager:test1/10.1.2.2 is not running Beacon interval/holdtime/ttl:60/86400/32 Group:239.1.1.1, UDP port test-packet/status-report:16384/65535 Test sender: 10.1.1.2 Test receiver: 10.1.4.2
To display a status report for the test manager, enter the following command:Test_Manager# mrm start test1 *Feb 4 10:29:51.798: IP MRM test test1 starts ...... Test_Manager#
The output shows that the receiver sent two status reports (one line each) at given time stamp. Each report contains one packet loss during the interval window (default of one second). The "Ehsr" value shows the estimated next sequence number value from the test sender. If the test receiver saw duplicate packets, it would show a negative number in the "Pkt Loss/Dup" column.Test_Manager# show ip mrm statusIP MRM status report cache: Timestamp Manager Test Receiver Pkt Loss/Dup (%) Ehsr *Feb 4 14:12:46 10.1.2.2 10.1.4.2 1 (4%) 29 *Feb 4 18:29:54 10.1.2.2 10.1.4.2 1 (4%) 15 Test_Manager#
To stop the test, enter the following command:
While running the test, the MRM sender starts sending RTP packets to the configured group address at default interval of 200 ms. The receiver monitors (expects) the same packets at the same default interval. If the receiver detects a packet loss in default window interval of five seconds, it sends a report to the MRM manager. The status report from the receiver can be displayed using the show ip mrm status command on the manager.Test_Manager# mrm stop test1 *Feb 4 10:30:12.018: IP MRM test test1 stops Test_Manager#
For more detailed configuration coverage on any of the above features, refer to ftp://ftpeng.cisco.com/ipmulticast/.