PIM-SM is more complicated to configure than PIM-DM because
an RP is required for each group. One RP can handle all groups,
which can be spread across multiple RPs. The first step is to enable
multicast routing in Global Configuration mode using the
command
ip multicast-routing
Next, enable PIM-SM on the router interfaces using the
interface command
ip pim sparse-mode
or
ip pim sparse-dense-mode
PIM-Sparse-Dense-Mode is used when there are groups with no
RP. In this case, groups with an assigned RP are treated as Sparse
Mode groups, and groups without an RP are treated as Dense Mode
groups.
Rendezvous Point Configuration and Static RP
Configuration
There is not a default RP and one or more must be configured
using one of the three methods. For the static case, the RP does not
need to be configured, only the leaf routers. To configure the
static RP, use the global configuration command
ip pim rp-addressip-address [access-list-number] [override]
ip-address
ip address of the RP
group-access-list-number
Optional. Standard IP access list number, 1—100. If no access
list is used, then the RP can handle all groups. Use an access list
to limit the groups that the RP will service.
override
Optional. If there is a conflict between the static RP and
one configured using Auto-RP, then the static RP takes
precedence.
For example, to configure an RP that handles all groups,
use
ip pim rp-address 172.16.1.1
where 172.16.1.1 is the address of the RP. If we want the RP
to only handle a subset of multicast groups, then an access list is
needed. If the RP is to handle only group 239.252.1.1, then we would
use the following commands:
ip pim rp-address 172.16.1.1 1
access-list 1 permit 239.252.1.1
0.0.0.0
If the RP is to service the groups 239.252.1.0 through
239.252.1.255, then the access list would contain
access-list 1 permit 239.252.1.0
0.0.0.255.
Auto-RP Configuration
For Auto-RP, the RPs and a mapping agent need to be
configured. The RPs are configured using the Global Configuration
command:
ip pim send-rp-announceinterface-type interface-numberscopettl
group-listaccess-list-number
interface-type interface-number
The address of the specified interface is used to identify
the RP.
scope
TTL value of the announcements. Limits the distance an RP
announcement can travel.
access-list-number
An access-list determines the groups that the RP is
announcing that it can service.
The router sends RP announcements on all PIM-enabled
interfaces for a maximum number of hops specified by the scope
parameter. The announcements are sent to the group CISCO-RP-ANNOUNCE
(224.0.1.39). To enable the RP to announce all multicast groups, use
the command below.
ip pim send-rp-announce ethernet 0 scope
30 group-list 2
access-list 2 permit 224.0.0.0
15.255.255.255
The next step in configuring Auto-RP is to configure the RP
mapping agent using the global command
ip pim send-rp-discovery
scopettl
TTL of the Discovery messages. Used to limit the scope of the
message.
The router configured as a mapping agent will listen for RP
announcements to group CISCO-RP-ANNOUNCE (224.0.1.39). The RP
mapping agent then sends the RP-to-group mappings to the group
CISCO-RP-DISCOVERY (224.0.1.40), and PIM routers get their RP
information from the Discovery messages.