Configuring Auto-RP Announcement, Mapping, and Discovery
You can configure a mode-dynamic way of assigning RPs in a multicast network by means of auto-RP. When you configure auto-RP for a router, the router learns the address of the RP in the network automatically. Auto-RP operates in PIM version 1 and version 2.
Although auto-RP is a nonstandard (non-RFC-based) function requiring dense mode PIM to advertise control traffic, it provides an important failover advantage that static RP assignment does not: you can configure multiple routers as RP candidates. If the elected RP stops operating, one of the other preconfigured routers takes over the RP functions. This capability is controlled by the auto-RP mapping agent.
If PIM is operating in sparse or sparse-dense mode, configure how the router operates in auto-RP by specifying the following auto-RP options:
- Use the
discoveryoption to let the router receive and process discovery messages from the mapping agent. This is the most basic auto-RP option.- Add the
announceoption on the router to allow the router to send announce messages in the network, advertising itself as a candidate RP. Routers configured with this option should also be configured as RPs, or announce messages will not be sent.- Add the
mappingoption on the router to allow the router to perform the mapping function. If the router is also an RP, themappingoption also allows the router to send auto-RP announcements (mapping on an RP allows the router to perform both the announcement and mapping functions).The router joins the auto-RP groups on the configured interfaces and on the loopback interface
lo0.0. For auto-RP to work correctly, configure a routable IP address on the loopback interface. The router ID will be used as the address for auto-RP updates. You cannot use the loopback address127.0.0.1. Also, you must enable PIM sparse-dense mode on thelo0.0interface if you do not specifyinterface all.In most cases, how the router handles auto-RP discovery, announce, or mapping messages depends on whether the router is an RP (configured as local RP) or not. Table 6 shows how the router behaves depending on the local RP configuration.
Table 6:
Local RP and Auto-RP Message TypesTo configure auto-RP at the main hierarchy level, follow these steps:
- Use the
modestatement, and specify the optionsparse-denseon all interfaces at the[edit protocols pim interfaces]hierarchy level:protocols {pim {interface all {mode sparse-dense;}}}This configuration allows the router to operate in sparse mode for most groups and dense mode for others. The default is to operate in sparse mode unless the router is specifically informed of a dense mode group.
- Configure two multicast dense mode groups (
224.0.1.39and224.0.1.40) using thedense-groupsstatement at the[edit protocols pim]hierarchy level:protocols {pim {dense-groups {224.0.1.39/32;224.0.1.40/32;}}}Auto-RP requires multicast flooding to announce potential RP candidates and to discover the elected RPs in the network. Multicast flooding occurs through a PIM dense mode model where group
224.0.1.39is used forannouncemessages and group224.0.1.40is used fordiscoverymessages.
- Finally, include the
auto-RPstatement at the[edit protocols pim rp]hierarchy level to configure auto-RP on each router in the group. There are four possible categories for each router.
- If the router is not a local RP and will listen only for auto-RP mapping messages, add the
auto-rpdiscoveryoption to the router RP configuration:protocols {pim {rp {auto-rp discovery;}}}- If the router is a local RP and will send auto-RP annoucements and listen for auto-RP mapping messages, configure the router as a local RP and add the
auto-rpannounceoption to the router RP configuration:protocols {pim {rp {local {address 10.0.1.1;}auto-rp announce;}}}- If the router will perform only the mapping function to listen for auto-RP announcements, perform the auto-RP-to-group mapping, and send auto-RP mapping messages, add the
mappingoption to the router in the RP configuration. When multiple candidate RP routers announce their capabilities to support multicast groups, there must be a single router in the network to act as mapping agent. The mapping agent sends out discovery messages to the network, informing all routers in a multicast group of the RP to use:protocols {pim {rp {auto-rp mapping;}}}- If the router will combine the local RP function to send announcements and also perform the mapping function, configure the router as a local RP and add the
mappingoption to the RP configuration:protocols {pim {rp {local {address 10.0.1.1;}auto-rp mapping;}}}All routers must also have routable IP address on the
lo0interface:interface lo0 {unit 0 {family inet {address 127.0.0.1; /* this address cannot be used by auto-rp */address 192.168.27.1 { /* this example uses a private IP address */preferred;}}}}You can configure these statements at the following hierarchy levels (auto-RP
announceis not supported in logical routers):
[edit protocols][edit routing-instancesrouting-instance-nameprotocols][edit logical-routerslogical-router-nameprotocols](all statements exceptauto-rp announce)[edit logical-routerslogical-router-namerouting-instancesrouting-instance-nameprotocols] (all statements exceptauto-rp announce)Use the
show pim rpscommand to verify the auto-RP information:user@host>show pim rpsRP address Type Holdtime Timeout Active groups Group prefixes192.168.5.1 auto-rp 150 123 1 224.0.0.0/4Use the
show pim rps extensivecommand to see information about how an RP is learned, what groups it handles, and the number of groups actively using the RP:user@host>show pim rps extensiveRP: 192.168.5.1Learned from 192.168.5.1 via: auto-rpTime Active: 00:34:29Holdtime: 150 with 108 remainingDevice Index: 6Subunit: 32769Interface: pd-0/0/0.32769Group Ranges:224.0.0.0/4Active groups using RP:224.2.2.100total 1 groups activeRegister State for RP:Group Source FirstHop RP Address StateRP address Type Holdtime TimeoutIn the example, the RP at
192.168.5.1was learned through auto-RP. The RP is able to support all groups in the224.0.0.0/4range (all possible groups). The local router has sent PIM control traffic for the224.2.2.100group to the RP.Additionally, the presence of a Tunnel Physical Interface Card (PIC) in an RP router creates a de-encapsulation interface, which allows the RP to receive multicast traffic from the source. This interface is indicated by
pd-0/0/0.32769.