Example: Configuring Anycast RP
Understanding RP Mapping with Anycast RP
Having a single active rendezvous point (RP) per multicast group is much the same as having a single server providing any service. All traffic converges on this single point, although other servers are sitting idle, and convergence is slow when the resource fails. In multicast specifically, there might be closer RPs on the shared tree, so the use of a single RP is suboptimal.
For the purposes of load balancing and redundancy, you can configure anycast RP. You can use anycast RP within a domain to provide redundancy and RP load sharing. When an RP fails, sources and receivers are taken to a new RP by means of unicast routing. When you configure anycast RP, you bypass the restriction of having one active RP per multicast group, and instead deploy multiple RPs for the same group range. The RP routers share one unicast IP address. Sources from one RP are known to other RPs that use the Multicast Source Discovery Protocol (MSDP). Sources and receivers use the closest RP, as determined by the interior gateway protocol (IGP).
Anycast means that multiple RP routers share the same unicast IP address. Anycast addresses are advertised by the routing protocols. Packets sent to the anycast address are sent to the nearest RP with this address. Anycast addressing is a generic concept and is used in PIM sparse mode to add load balancing and service reliability to RPs.
Anycast RP is defined in RFC3446 , Anycast RP Mechanism Using PIM and MSDP, and can be found here: https://www.ietf.org/rfc/rfc3446.txt .
See Also
Example: Configuring Multiple RPs in a Domain with Anycast RP
This example shows how to configure anycast RP on each RP router in the PIM-SM domain. With this configuration you can deploy more than one RP for a single group range. This enables load balancing and redundancy.
Requirements
Before you begin:
Configure the router interfaces.
Configure an interior gateway protocol or static routing. See the Junos OS Routing Protocols Library for Routing Devices.
Configure PIM Sparse Mode on the interfaces. See Enabling PIM Sparse Mode.
Overview
When you configure anycast RP, the RP routers in the PIM-SM domain use a shared address. In this example, the shared address is 10.1.1.2/32. Anycast RP uses Multicast Source Discovery Protocol (MSDP) to discover and maintain a consistent view of the active sources. Anycast RP also requires an RP selection method, such as static, auto-RP, or bootstrap RP. This example uses static RP and shows only one RP router configuration.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit]
hierarchy
level, and then enter commit
from configuration mode.
RP Routers
set interfaces lo0 unit 0 family inet address 192.168.132.1/32 primary set interfaces lo0 unit 0 family inet address 10.1.1.2/32 set protocols msdp local-address 192.168.132.1 set protocols msdp peer 192.168.12.1 set protocols pim rp local address 10.1.1.2 set routing-options router-id 192.168.132.1
Non-RP Routers
set protocols pim rp static address 10.1.1.2
Procedure
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure anycast RP:
On each RP router in the domain, configure the shared anycast address on the router’s loopback address.
[edit interfaces] user@host# set lo0 unit 0 family inet address 10.1.1.2/32
On each RP router in the domain, make sure that the router’s regular loopback address is the primary address for the interface, and set the router ID.
[edit interfaces] user@host# set lo0 unit 0 family inet address 192.168.132.1/32 primary [edit routing-options] user@host# set router-id 192.168.132.1
On each RP router in the domain, configure the local RP address, using the shared address.
[edit protocols pim] user@host# set rp local address 10.1.1.2
On each RP router in the domain, create MSDP sessions to the other RPs in the domain.
[edit protocols msdp] user@host# set local-address 192.168.132.1 user@host# set peer 192.168.12.1
On each non-RP router in the domain, configure a static RP address using the shared address.
[edit protocols pim] user@host# set rp static address 10.1.1.2
If you are done configuring the devices, commit the configuration.
user@host# commit
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@host# show interfaces lo0 { unit 0 { family inet { address 192.168.132.1/32 { primary; } address 10.1.1.2/32; } } }
On the RP routers:
user@host# show protocols msdp { local-address 192.168.132.1; peer 192.168.12.1; } pim { rp { local { address 10.1.1.2; } } }
On the non-RP routers:
user@host# show protocols pim { rp { static { address 10.1.1.2; } } }
user@host# show routing-options router-id 192.168.132.1;
Verification
To verify the configuration, run the show pim rps extensive inet command.
Example: Configuring PIM Anycast With or Without MSDP
When you configure anycast RP, you bypass the restriction of having one active rendezvous point (RP) per multicast group, and instead deploy multiple RPs for the same group range. The RP routers share one unicast IP address. Sources from one RP are known to other RPs that use the Multicast Source Discovery Protocol (MSDP). Sources and receivers use the closest RP, as determined by the interior gateway protocol (IGP).
You can use anycast RP within a domain to provide redundancy and RP load sharing. When an RP stops operating, sources and receivers are taken to a new RP by means of unicast routing.
You can configure anycast RP to use PIM and MSDP for IPv4, or PIM alone for both IPv4 and IPv6 scenarios. Both are discussed in this section.
We recommend a static RP mapping with anycast RP over a bootstrap router and auto-RP configuration because it provides all the benefits of a bootstrap router and auto-RP without the complexity of the BSR and auto-RP mechanisms.
Starting in Junos OS Release 16.1, all systems on a subnet must run the same version of PIM.
The default PIM version can be version 1 or version 2, depending on the mode you are configuring. PIMv1 is the default RP mode (at the [edit protocols pim rp static address address] hierarchy level). However, PIMv2 is the default for interface mode (at the [edit protocols pim interface interface-name] hierarchy level). Explicitly configured versions override the defaults. This example explicitly configures PIMv2 on the interfaces.
The following example shows an anycast RP configuration for the RP routers, first with MSDP and then using PIM alone, and for non-RP routers.
For a network using an RP with MSDP, configure the RP using the lo0 loopback interface, which is always up. Include the address statement and specify the unique and routable router ID and the RP address at the [edit interfaces lo0 unit 0 family inet] hierarchy level. In this example, the router ID is 198.51.100.254 and the shared RP address is 198.51.100.253. Include the primary statement for the first address. Including the primary statement selects the router’s primary address from all the preferred addresses on all interfaces.
interfaces { lo0 { description "PIM RP"; unit 0 { family inet { address 198.51.100.254/32; primary; address 198.51.100.253/32; } } } }
Specify the RP address. Include the address statement at the [edit protocols pim rp local] hierarchy level (the same address as the secondary lo0 interface).
For all interfaces, include the mode statement to set the mode to sparse and the version statement to specify PIM version 2 at the [edit protocols pim rp local interface all] hierarchy level. When configuring all interfaces, exclude the fxp0.0 management interface by including the disable statement for that interface.
protocols { pim { rp { local { family inet; address 198.51.100.253; } interface all { mode sparse; version 2; } interface fxp0.0 { disable; } } } }
Configure MSDP peering. Include the peer statement to configure the address of the MSDP peer at the [edit protocols msdp] hierarchy level. For MSDP peering, use the unique, primary addresses instead of the anycast address. To specify the local address for MSDP peering, include the local-address statement at the [edit protocols msdp peer] hierarchy level.
protocols { msdp { peer 198.51.100.250 { local-address address 198.51.100.254; } } }
Configure an RP using the lo0 loopback interface, which is always up. Include the address statement to specify the unique and routable router address and the RP address at the [edit interfaces lo0 unit 0 family inet] hierarchy level. In this example, the router ID is 198.51.100.254 and the shared RP address is 198.51.100.253. Include the primary statement on the first address. Including the primary statement selects the router’s primary address from all the preferred addresses on all interfaces.
interfaces { lo0 { description "PIM RP"; unit 0 { family inet { address 198.51.100.254/32 { primary; } address 198.51.100.253/32; } } } }
Include the address statement at the [edit protocols pim rp local] hierarchy level to specify the RP address (the same address as the secondary lo0 interface).
For all interfaces, include the mode statement to set the mode to sparse, and the version statement to specify PIM version 2 at the [edit protocols pim rp local interface all] hierarchy level. When configuring all interfaces, exclude the fxp0.0 management interface by Including the disable statement for that interface.
Include the anycast-pim statement to configure anycast RP without MSDP (for example, if IPv6 is used for multicasting). The other RP routers that share the same IP address are configured using the rp-set statement. There is one entry for each RP, and the maximum that can be configured is 15. For each RP, specify the routable IP address of the router and whether MSDP source active (SA) messages are forwarded to the RP.
MSDP configuration is not necessary for this type of IPv4 anycast RP configuration.
protocols { pim { rp { local { family inet { address 198.51.100.253; anycast-pim { rp-set { address 198.51.100.240; address 198.51.100.241 forward-msdp-sa; } local-address 198.51.100.254; #If not configured, use lo0 primary } } } } interface all { mode sparse; version 2; } interface fxp0.0 { disable; } } }
Configure the non-RP routers. The anycast RP configuration for a non-RP router is the same whether MSDP is used or not. Specify a static RP by adding the address at the [edit protocols pim rp static] hierarchy level. Include the version statement at the [edit protocols pim rp static address] hierarchy level to specify PIM version 2.
protocols { pim { rp { static { address 198.51.100.253 { version 2; } } } } }
Include the mode statement at the [edit protocols pim interface all] hierarchy level to specify sparse mode on all interfaces. Then include the version statement at the [edit protocols pim rp interface all mode] to configure all interfaces for PIM version 2. When configuring all interfaces, exclude the fxp0.0 management interface by including the disable statement for that interface.
protocols { pim { interface all { mode sparse; version 2; } interface fxp0.0 { disable; } } }
Configuring a PIM Anycast RP Router Using Only PIM
In this example, configure an RP using the lo0 loopback interface, which is always up. Use the address statement to specify the unique and routable router address and the RP address at the [edit interfaces lo0 unit 0 family inet] hierarchy level. In this case, the router ID is 198.51.100.254/32 and the shared RP address is 198.51.100.253/32. Add the flag statement primary to the first address. Using this flag selects the router's primary address from all the preferred addresses on all interfaces.
interfaces { lo0 { description "PIM RP"; unit 0 { family inet { address 198.51.100.254/32 { primary; } address 198.51.100.253/32; } } } }
Add the address statement at the [edit protocols pim rp local] hierarchy level to specify the RP address (the same address as the secondary lo0 interface).
For all interfaces, use the mode statement to set the mode to sparse, and include the version statement to specify PIM version 2 at the [edit protocols pim rp local interface all] hierarchy level. When configuring all interfaces, exclude the fxp0.0 management interface by adding the disable statement for that interface.
Use the anycast-pim statement to configure anycast RP without MSDP (for example, if IPv6 is used for multicasting). The other RP routers that share the same IP address are configured using the rp-set statement. There is one entry for each RP, and the maximum that can be configured is 15. For each RP, specify the routable IP address of the router and whether MSDP source active (SA) messages are forwarded to the RP.
protocols { pim { rp { local { family inet { address 198.51.100.253; anycast-pim { rp-set { address 198.51.100.240; address 198.51.100.241 forward-msdp-sa; } local-address 198.51.100.254; #If not configured, use lo0 primary } } } } interface all { mode sparse; version 2; } interface fxp0.0 { disable; } } }
MSDP configuration is not necessary for this type of IPv4 anycast RP configuration.
Use the show pim join
and show pim rps
commands to
confirm:
user@device> show pim join extensive Instance: PIM.master Family: INET R = Rendezvous Point Tree, S = Sparse, W = Wildcard Group: <group IP> Source: <source IP> Flags: sparse,spt Upstream interface: lo0 Upstream neighbor: Direct Upstream state: Local Source Keepalive timeout: 357 Uptime: 00:00:03 Downstream neighbors: Number of downstream interfaces: 0 Number of downstream neighbors: 0
user@device> show pim rps extensive Instance: PIM.master address-family INET RP: 198.51.100.253 Learned via: static configuration Mode: Sparse Time Active: 00:24:14 Holdtime: 150 Device Index: 150 Subunit: 32700 Interface: Static RP Override: Off Group Ranges: <group IP> Register State for RP: Group Source FirstHop RP Address State Timeout <group IP> <source IP> <IP address> 198.51.100.253 Receive 170 Anycast PIM local address used: <IP address>
See Also
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.