Example for Configuring Anycast RP in a PIM-SM Domain
Networking Requirements
As shown in Figure 6-12, a Protocol Independent Multicast Sparse Mode (PIM-SM) domain contains multiple multicast sources and receivers. Rendezvous points (RPs) in a PIM-SM domain need to be configured as MSDP peers to perform load balancing.
Configuration Roadmap
Configure anycast RPs. Then the receiver sends a Join message to the closest RP and the multicast source sends a Register message to the closest RP. The configuration roadmap is as follows:
Configure IP addresses for the interfaces on each router and configure Open Shortest Path First (OSPF) in the PIM-SM domain.
Enable multicast on all routers and PIM-SM on all interfaces, and enable Internet Group Management Protocol (IGMP) on interfaces connected to network segments of receiver hosts.
Configure the same Loopback10 address on RouterC and RouterD. Configure Loopback10 as a candidate rendezvous point (C-RP) and Loopback1 as a candidate bootstrap router (C-BSR).
Configure MSDP peers on Loopback0 interfaces of RouterC and RouterD. According to RPF rules, the routers receive SA messages from the source RP.
Procedure
- Configure IP addresses for interfaces and configure a unicast routing protocol on each router.
# According to Figure 6-12, configure IP addresses and masks for the interfaces in the PIM-SM domain. Configure the OSPF protocol between routeres. The configuration details are not mentioned here.
- Enable multicast and configure PIM-SM.
# Enable multicast on all routers and PIM-SM on all interfaces. Enable IGMP on interfaces connected to network segments of receiver hosts. The configurations on other routers are similar to the configuration on RouterC, and are not mentioned here.
[RouterC] multicast routing-enable [RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] pim sm [RouterC-GigabitEthernet1/0/0] quit [RouterC] interface gigabitethernet 2/0/0 [RouterC-GigabitEthernet2/0/0] pim sm [RouterC-GigabitEthernet2/0/0] quit [RouterC] interface gigabitethernet 3/0/0 [RouterC-GigabitEthernet3/0/0] pim sm [RouterC-GigabitEthernet3/0/0] igmp enable [RouterC-GigabitEthernet3/0/0] quit
- Configure Loopback1 interfaces, Loopback10 interfaces, C-BSRs, and C-RPs.
# Configure Loopback1 addresses and the same Loopback10 address for RouterC and RouterD. Configure C-BSRs on Loopback1 interfaces and C-RPs on Loopback10 interfaces. The configuration on RouterD is similar to the configuration on RouterC, and is not mentioned here.
[RouterC] interface loopback 1 [RouterC-LoopBack1] ip address 10.10.1.3 255.255.255.255 [RouterC-LoopBack1] pim sm [RouterC-LoopBack1] quit [RouterC] interface loopback 10 [RouterC-LoopBack10] ip address 10.1.1.1 255.255.255.255 [RouterC-LoopBack10] pim sm [RouterC-LoopBack10] quit [RouterC] pim [RouterC-pim] c-bsr loopback 1 [RouterC-pim] c-rp loopback 10 [RouterC-pim] quit
- Configure MSDP peers on Loopback0 interfaces.
# Configure an MSDP peer on Loopback0 of RouterC.
[RouterC] interface loopback 0 [RouterC-LoopBack0] ip address 10.10.1.1 255.255.255.255 [RouterC-LoopBack0] pim sm [RouterC-LoopBack0] quit [RouterC] msdp [RouterC-msdp] originating-rp loopback0 [RouterC-msdp] peer 10.10.1.2 connect-interface loopback0
[RouterC-msdp] quit
# Configure an MSDP peer on Loopback0 of RouterD.
[RouterD] interface loopback 0 [RouterD-LoopBack0] ip address 10.10.1.2 255.255.255.255 [RouterD-LoopBack0] pim sm [RouterD-LoopBack0] quit [RouterD] msdp [RouterD-msdp] originating-rp loopback0 [RouterD-msdp] peer 10.10.1.1 connect-interface loopback0 [RouterD-msdp] quit
- Verify the configuration.
# Run the display msdp brief command to view the status of the MSDP peers on routers. The following output shows summary information about MSDP peers on RouterC and RouterD:
<RouterC> display msdp brief MSDP Peer Brief Information of VPN-Instance: public net Configured Up Listen Connect Shutdown Down 1 1 0 0 0 0 Peer's Address State Up/Down time AS SA Count Reset Count 10.10.1.2 Up 00:10:17 ? 0 0
<RouterD> display msdp brief MSDP Peer Brief Information of VPN-Instance: public net Configured Up Listen Connect Shutdown Down 1 1 0 0 0 0 Peer's Address State Up/Down time AS SA Count Reset Count 10.10.1.1 Up 00:10:18 ? 0 0
# Run the display pim routing-table command to view the PIM routing table on a router. When S1 (10.110.5.100/24) in the PIM-SM domain sends multicast data to G (225.1.1.1), User1 (Receiver) joins G and receives the multicast data sent to G. Comparing information about the PIM routing tables on RouterC and RouterD, you can find that RouterC is the valid RP. S1 registers to RouterC, and User1 sends a Join message to RouterC.
<RouterC> display pim routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, 225.1.1.1) RP: 10.1.1.1 (local) Protocol: pim-sm, Flag: WC UpTime: 00:28:49 Upstream interface: Register Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet3/0/0 Protocol: static, UpTime: 00:28:49, Expires: - (10.110.5.1, 225.1.1.1) RP: 10.1.1.1 (local) Protocol: pim-sm, Flag: SPT 2MSDP ACT UpTime: 00:02:26 Upstream interface: GigabitEthernet2/0/0 Upstream neighbor: 10.110.1.2 RPF prime neighbor: 10.110.1.2 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet3/0/0 Protocol: pim-sm, UpTime: 00:02:26, Expires: -
<RouterD> display pim routing-table
Not output is displayed.
# User1 exits from G, and S1 stops sending multicast data to G. You can run the reset multicast routing-table all and reset multicast forwarding-table all commands to clear multicast routing entries and multicast forwarding entries on RouterC.
<RouterC> reset multicast routing-table all <RouterC> reset multicast forwarding-table all
# User2 joins G, and S2 (10.110.6.100/24) sends multicast dat to G. Comparing information about the PIM routing tables on RouterC and RouterD, you can find that RouterD is the valid RP. S2 registers to RouterD, and User2 sends a Join message to RouterD.
<RouterC> display pim routing-table
Not output is displayed.
<RouterD> display pim routing-table VPN-Instance: public net Total 1 (*, G) entry; 1 (S, G) entry (*, 225.1.1.1) RP: 10.1.1.1 (local) Protocol: pim-sm, Flag: WC UpTime: 00:07:23 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:07:23, Expires:- (10.110.6.100, 225.1.1.1) RP: 10.1.1.1 (local) Protocol: pim-sm, Flag: SPT 2MSDP ACT UpTime: 00:10:20 Upstream interface: GigabitEthernet2/0/0 Upstream neighbor: 10.110.2.2 RPF prime neighbor: 10.110.2.2 Downstream interface(s) information: Total number of downstreams: 1 1: GigabitEthernet3/0/0 Protocol: pim-sm, UpTime: 00:10:22, Expires: -
Configuration Files
RouterA configuration file
# sysname RouterA # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 10.110.5.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 10.110.1.2 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 10.110.1.0 0.0.0.255 network 10.110.5.0 0.0.0.255 # return
RouterB configuration file
# sysname RouterB # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 10.110.6.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 10.110.2.2 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 10.110.2.0 0.0.0.255 network 10.110.6.0 0.0.0.255 # return
RouterC configuration file
# sysname RouterC # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 192.168.1.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 10.110.1.1 255.255.255.0 pim sm # interface GigabitEthernet3/0/0 ip address 10.110.4.1 255.255.255.0 pim sm igmp enable # interface LoopBack0 ip address 10.10.1.1 255.255.255.255 pim sm # interface LoopBack1 ip address 10.10.1.3 255.255.255.255 pim sm # interface LoopBack10 ip address 10.1.1.1 255.255.255.255 pim sm # ospf 1 area 0.0.0.0 network 10.10.1.1 0.0.0.0 network 10.10.1.3 0.0.0.0 network 10.1.1.1 0.0.0.0 network 10.110.1.0 0.0.0.255 network 10.110.4.0 0.0.0.255 network 192.168.1.0 0.0.0.255 # pim c-bsr LoopBack1 c-rp LoopBack10 # msdp originating-rp LoopBack0 peer 10.10.1.2 connect-interface LoopBack0 # return
RouterD configuration file
# sysname RouterD # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 192.168.3.1 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 10.110.2.1 255.255.255.0 pim sm # interface GigabitEthernet3/0/0 ip address 10.110.3.1 255.255.255.0 pim sm igmp enable # interface LoopBack0 ip address 10.10.1.2 255.255.255.255 pim sm # interface LoopBack1 ip address 10.10.1.4 255.255.255.255 pim sm # interface LoopBack10 ip address 10.1.1.1 255.255.255.255 pim sm # ospf 1 area 0.0.0.0 network 10.10.1.2 0.0.0.0 network 10.10.1.4 0.0.0.0 network 10.1.1.1 0.0.0.0 network 10.110.2.0 0.0.0.255 network 10.110.3.0 0.0.0.255 network 192.168.3.0 0.0.0.255 # pim c-bsr LoopBack1 c-rp LoopBack10 # msdp originating-rp LoopBack0 peer 10.10.1.1 connect-interface LoopBack0 # return
RouterE configuration file
# sysname RouterE # multicast routing-enable # interface GigabitEthernet1/0/0 ip address 192.168.3.2 255.255.255.0 pim sm # interface GigabitEthernet2/0/0 ip address 192.168.1.2 255.255.255.0 pim sm # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.3.0 0.0.0.255 # return