Example for Configuring IPv6 PIM for Anycast RP
Networking Requirements
In a traditional IPv6 PIM-SM domain, all multicast groups map to only one RP. When the network is overloaded or traffic is concentrated on the RP, the RP may be overburdened. If the RP fails, routes are converged slowly or multicast data are forwarded over non-optimal paths. Configuring Anycast RP in a single IPv6 PIM-SM domain can address this problem. IP routing will automatically select the closest RP for each source and receiver. This releases burdens on a single RP, implements RP backup, and optimizes multicast forwarding paths.
As shown in Figure 5-4, Receiver2 wants to receive multicast data from Source. You need to configure Anycast RP peering between RouterC and RouterD, so that Receiver2 can send a Join message to the closest RouterD. After RouterA receives multicast data from Source, it encapsulates the multicast data in a Register message and sends it to RouterC. On receiving the Register message, RouterC forwards it to RouterD, and Receiver2 can receive the multicast data from Source.
Configuration Roadmap
The configuration roadmap is as follows:
Configure IPv6 addresses for interfaces of each router, and configure OSPFv3 to implement IP interworking.
Enable the multicast function and enable IPv6 PIM-SM on each interface.
Enable MLD on the interfaces that connect router to hosts.
Configure loopback 0 on RouterC and RouterD as C-RP and C-BSR respectively.
Configure loopback 0 on RouterC and RouterD as Anycast RPs.
Configure the addresses of loopback 1 on RouterC and RouterD as local addresses of Anycast RPs.
Set an Anycast RP peer relationship between RouterC and RouterD.
Procedure
- Configure an IPv6 address for each interface and configure
the unicast routing protocol.
# Configure an IPv6 address and mask for each interface according to Figure 5-4. Configure OSPFv3 on each router to ensure IP connectivity between them, and enable them to dynamically update routing information. The configuration of RouterB, RouterC, and RouterD are similar to the configuration of RouterA, and are not provided here.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] ipv6 [RouterA] ospfv3 100 [RouterA-ospfv3-100] router-id 1.1.1.1 [RouterA-ospfv3-100] quit [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] ipv6 enable [RouterA-GigabitEthernet1/0/0] ipv6 address 3001::1 64 [RouterA-GigabitEthernet1/0/0] ospfv3 100 area 0 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] ipv6 enable [RouterA-GigabitEthernet2/0/0] ip address 2001::1 64 [RouterA-GigabitEthernet2/0/0] ospfv3 100 area 0 [RouterA-GigabitEthernet2/0/0] quit
- Enable IPv6 multicast routing on all routers and IPv6 PIM-SM
on all interfaces.
# Enable IPv6 multicast routing on all routers and enable IPv6 PIM-SM on all interfaces. The configurations of RouterB, RouterC, and RouterD are similar to the configuration of RouterA, and are not provided here.
[RouterA] multicast ipv6 routing-enable [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] pim ipv6 sm [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] pim ipv6 sm [RouterA-GigabitEthernet2/0/0] quit
- Enable MLD on the interfaces that connect the router to hosts.
# Enable MLD on the interfaces that connect RouterC and RouterD to hosts.
# Configure RouterC.
[RouterC] interface gigabitethernet 3/0/0 [RouterC-GigabitEthernet3/0/0] mld enable [RouterC-GigabitEthernet3/0/0] quit
# Configure RouterD.
[RouterD] interface gigabitethernet 2/0/0 [RouterD-GigabitEthernet2/0/0] mld enable [RouterD-GigabitEthernet2/0/0] quit
- Configure loopback 0 on RouterC and RouterD as the C-RP
and C-BSR respectively.
# Configure RouterC.
[RouterC] pim-ipv6 [RouterC-pim6] c-bsr 1::1 [RouterC-pim6] c-rp 1::1 [RouterC-pim6] quit
# Configure RouterD.
[RouterD] pim-ipv6 [RouterD-pim6] c-bsr 1::1 [RouterD-pim6] c-rp 1::1 [RouterD-pim6] quit
- Configure loopback 0 on RouterC and RouterD as Anycast
RPs.
# Configure RouterC.
[RouterC] pim-ipv6 [RouterC-pim6] anycast-rp 1::1 [RouterC-pim6-anycast-rp-1::1] quit [RouterC-pim6] quit
# Configure RouterD.
[RouterD] pim-ipv6 [RouterD-pim6] anycast-rp 1::1 [RouterD-pim6-anycast-rp-1::1] quit [RouterD-pim6] quit
- Configure the addresses of loopback 1 on RouterC and RouterD
as local addresses of Anycast RPs.
# Configure RouterC.
[RouterC] pim-ipv6 [RouterC-pim6] anycast-rp 1::1 [RouterC-pim6-anycast-rp-1::1] local-address 2::2 [RouterC-pim6-anycast-rp-1::1] quit [RouterC-pim6] quit
# Configure RouterD.
[RouterD] pim-ipv6 [RouterD-pim6] anycast-rp 1::1 [RouterD-pim6-anycast-rp-1::1] local-address 3::3 [RouterD-pim6-anycast-rp-1::1] quit [RouterD-pim6] quit
- Set an Anycast RP peer relationship between RouterC and
RouterD.
# Configure RouterC.
[RouterC] pim-ipv6 [RouterC-pim6] anycast-rp 1::1 [RouterC-pim6-anycast-rp-1::1] peer 3::3 [RouterC-pim6-anycast-rp-1::1] quit [RouterC-pim6] quit
# Configure RouterD.
[RouterD] pim-ipv6 [RouterD-pim6] anycast-rp 1::1 [RouterD-pim6-anycast-rp-1::1] peer 2::2 [RouterD-pim6-anycast-rp-1::1] quit [RouterD-pim6] quit
- Verify the configuration.
# Run the display pim ipv6 rp-info command on RouterC and RouterD to check RP information.
<RouterC> display pim ipv6 rp-info VPN-Instance: public net PIM-SM BSR RP Number:1 Group/MaskLen: FF00::/8 RP: 1::1 (local) Priority: 192 Uptime: 00:06:34 Expires: 00:01:56
<RouterD> display pim ipv6 rp-info VPN-Instance: public net PIM-SM BSR RP Number:1 Group/MaskLen: FF00::/8 RP: 1::1 (local) Priority: 192 Uptime: 00:06:34 Expires: 00:01:56
The command output shows that RouterC and RouterD serve as RPs and forward the Register message from the multicast source to each other.
# Run the display pim ipv6 routing-table command to check PIM entries on each router. Source (3001::2/64) in the PIM-SM domain sends multicast data to multicast group G (FF2E::1). Receiver2 joins G and receives the multicast data sent to G. Source sends a Register message to RouterC and Receiver2 sends a Join message to RouterD.
<RouterC> display pim ipv6 routing-table VPN-Instance: public net Total 0 (*, G) entry; 1 (S, G) entry (3001::2, FF2E::1) RP: 1::1 (local) Protocol: pim-sm, Flag: SPT ACT UpTime: 00:00:38 Upstream interface: Register Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet3/0/0 Protocol: pim-sm, UpTime: 00:01:25, Expires: -
<RouterD> display pim ipv6 routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entries (*, FF2E::1) RP: 1::1 (local) Protocol: pim-sm, Flag: WC UpTime: 00:01:25 Upstream interface: Register Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: mld, UpTime: 00:01:25, Expires: - (3001::2, FF2E::1) RP: 1::1 (local) Protocol: pim-sm, Flag: SPT ACT UpTime: 00:00:02 Upstream interface: GigabitEthernet3/0/0 Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet2/0/0 Protocol: pim-sm, UpTime: 00:00:02, Expires: -
Configuration Files
RouterA configuration file
# sysname RouterA # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 1.1.1.1 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address 3001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet2/0/0 ipv6 enable ip address 2001::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # return
RouterB configuration file
# sysname RouterB # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 2.2.2.2 # interface GigabitEthernet1/0/0 ipv6 enable ip address 2002::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # return
RouterC configuration file
# sysname RouterC # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 3.3.3.3 # interface GigabitEthernet1/0/0 ipv6 enable ip address 2003::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet2/0/0 ipv6 enable ip address 2001::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet3/0/0 ipv6 enable ip address 3002::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm mld enable # interface LoopBack0 ipv6 enable ip address 1::1/128 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface LoopBack1 ipv6 enable ip address 2::2/128 ospfv3 100 area 0.0.0.0 pim ipv6 sm # pim-ipv6 c-bsr 1::1 c-rp 1::1 anycast-rp 1::1 local-address 2::2 peer 3::3 # return
RouterD configuration file
# sysname RouterD # ipv6 # multicast ipv6 routing-enable # ospfv3 100 router-id 4.4.4.4 # interface GigabitEthernet1/0/0 ipv6 enable ip address 2002::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface GigabitEthernet2/0/0 ipv6 enable ip address 3003::1/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm mld enable # interface GigabitEthernet3/0/0 ipv6 enable ip address 2003::2/64 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface LoopBack0 ipv6 enable ip address 1::1/128 ospfv3 100 area 0.0.0.0 pim ipv6 sm # interface LoopBack1 ipv6 enable ip address 3::3/128 ospfv3 100 area 0.0.0.0 pim ipv6 sm # pim-ipv6 c-bsr 1::1 c-rp 1::1 anycast-rp 1::1 local-address 3::3 peer 2::2 # return