Configuration of Multicast routing
To configure multicast routing, do the following:
Router(config)#ip multicast-routing
...
Router(config-if)#ip pim sparse-mode
...
Router(config)#ip pim rp-address address
The
ip multicast-routing command turns on multicast routing. The
ip pim sparse-mode command should be used on all interfaces on the router that either send or receive multicast packets. Finally,
ip pim rp-address address specifies the address of the PIM Rendezvous Point. This, if you'll recall, is where all multicast join requests are sent.
Alternate to the
ip pim sparse-mode command, you could use the
ip pim sparse-dense-mode command which allows the router to use either sparse or dense mode depending on the existence of RP information. This makes it easier to switch back and forth between the modes.
The
show ip pim interface [
type number] [
count] command shows various information regarding the PIM protocol. It shows next-hop router ip address, the interface type and number (or VLAN on an RSM), the PIM-mode and version, the number of neighbors discovered through the interface, the frequency of PIM router-query messages (in seconds), and the DR's IP address on that LAN.
To display a list of PIM neighbors, issue this command:
show ip pim neighbor type number.
Type and
number refer to a specific interface.
It is possible to automatically configure RPs on a network using the auto-RP command. This is an optional command, as it's possible to manually configure all your RPs. However, auto-rp simplifies the configuration process. Additionally, multiple RPs can be used to serve different multicast groups, implement load splitting, and arrange the placement of RPs depending on client location. Additionally, RPs can be set up as backups.
An RP mapping agent receives RP-announcement messages for a router and then sends a message containing a group-to-RP map. This allows all routers in a multicast environment to discover the proper RP to use. Auto-RP is disabled by default, but can be enabled on a router using the following command line:
Router(config)#ip pim send-rp-announce type number scope ttl group-list access-list-number
Routers with auto-rp configured multicast packets to CISCO-RP-ANNOUNCE (224.0.1.39), which is listened to by a router configured as an RP-mapping agent. This agent assigns multicast groups to these RPs and then sends CISCO-RP-DISCOVERY (224.0.1.40) packets detailing these assignments. PIM DRs listen to these packets to determine which RP to use.
To configure a router as a PIM-mapping agent, use the following command:
Router(config)#ip pim send-rp-discovery scope ttl
The
ttl limits the scope of the discovery message (how many hops the discovery message will travel).
The command to set the max ttl allowed for multicast packets on an interface follows. This was mentioned earlier, but is reprinted here so all the configuration commands are close to one another.
Router(config-if)#ip multicast ttl-threshold ttl
You can also have a router join a specific multicast group. This would then allow the router to ping and traceroute that multicast IP address. All routers that are part of the multicast group will then respond to pings. This could be handy for multicast troubleshooting.
Router(config-if)#ip igmp join-group address
To change the version of igmp that is being used on a network, the following commands can be used:
Router(config-if)#ip igmp version {1 | 2 | 3}
Router#show ip igmp interface type number
The first command will set the igmp version to the number specificied, while the latter will show what the version is. The default version is 2.