Example for Configuring Anycast RP
Network Requirement
As shown in Figure 1, in the PIM-SM domain, the multicast source sends multicast data to group 238.0.0.1, and Host A and Host B are members of this multicast group.
Figure 1 Network Diagram for Configuring Anycast RP
Apply Anycast RP in the PIM-SM domain to achieve load sharing and backup among multiple RPs.
- Select Switch 2 and Switch 3 as the anycast RPs in the PIM-SM domain.
- Prepare a loopback interface address respectively on Switch 2 and Switch 3 with the same value.
- Configure the RP. Configure static RP on each PIM-SM router in the whole domain, specifying the loopback interface address of Switch 2 and Switch 3 as the RP address.
- Prepare another loopback interface address on Switch 2 and Switch 3 respectively, which will be used to establish MSDP peer connection. Do not use the loopback interface address used for the RP.
- Use the following command lines to establish the MSDP peer connection between Switch 2 and Switch 3.
set protocols msdp mesh-group < mesh-group-name> member <peer-address>
set protocols msdp mesh-group < mesh-group-name> source <source-address>
Procedure
Switch 1
admin@Switch1# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 13 admin@Switch1# set interface gigabit-ethernet ge-1/1/10 family ethernet-switching native-vlan-id 200 admin@Switch1# set interface gigabit-ethernet ge-1/1/23 family ethernet-switching native-vlan-id 12 admin@Switch1# set ip routing enable true admin@Switch1# set l3-interface vlan-interface vlan12 address 10.0.12.1 prefix-length 24 admin@Switch1# set l3-interface vlan-interface vlan200 address 200.200.200.1 prefix-length 24 admin@Switch1# set l3-interface vlan-interface vlan13 address 10.0.13.1 prefix-length 24 admin@Switch1# set protocols ospf router-id 1.1.1.1 admin@Switch1# set protocols ospf network 10.0.12.0/24 area 0.0.0.0 admin@Switch1# set protocols ospf network 200.200.200.0/24 area 0 admin@Switch1# set protocols ospf network 10.0.13.0/24 area 0 admin@Switch1# set protocols ospf interface vlan13 cost 15 admin@Switch1# set protocols pim rp 6.6.6.6 group 224.0.0.0/4 admin@Switch1# set protocols pim interface vlan12 admin@Switch1# set protocols pim interface vlan200 admin@Switch1# set protocols pim interface vlan13 admin@Switch1# set vlans vlan-id 12 l3-interface vlan12 admin@Switch1# set vlans vlan-id 13 l3-interface vlan13 admin@Switch1# set vlans vlan-id 200 l3-interface vlan200 admin@Switch1# commit
Switch 2
admin@Switch2# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 12 admin@Switch2# set interface gigabit-ethernet ge-1/1/5 family ethernet-switching native-vlan-id 24 admin@Switch2# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 23 admin@Switch2# set ip routing enable true admin@Switch2# set l3-interface loopback lo address 2.2.2.2 prefix-length 32 admin@Switch2# set l3-interface loopback lo address 6.6.6.6 prefix-length 32 admin@Switch2# set l3-interface vlan-interface vlan24 address 10.0.24.2 prefix-length 24 admin@Switch2# set l3-interface vlan-interface vlan12 address 10.0.12.2 prefix-length 24 admin@Switch2# set l3-interface vlan-interface vlan23 address 10.0.23.2 prefix-length 24 admin@Switch2# set protocols msdp mesh-group 6.6.6.6 member 3.3.3.3 admin@Switch2# set protocols msdp mesh-group 6.6.6.6 source 2.2.2.2 admin@Switch2# set protocols spanning-tree enable false admin@Switch2# set protocols ospf router-id 2.2.2.2 admin@Switch2# set protocols ospf network 10.0.12.0/24 area 0 admin@Switch2# set protocols ospf network 10.0.24.0/24 area 0 admin@Switch2# set protocols ospf network 2.2.2.2/32 area 0 admin@Switch2# set protocols ospf network 10.0.23.0/24 area 0 admin@Switch2# set protocols ospf network 6.6.6.6/32 area 0 admin@Switch2# set protocols pim rp 6.6.6.6 group 224.0.0.0/4 admin@Switch2# set protocols pim interface vlan12 admin@Switch2# set protocols pim interface vlan24 admin@Switch2# set protocols pim interface lo admin@Switch2# set protocols pim interface vlan23 admin@Switch2# set vlans vlan-id 12 l3-interface vlan12 admin@Switch2# set vlans vlan-id 23 l3-interface vlan23 admin@Switch2# set vlans vlan-id 24 l3-interface vlan24 admin@Switch2# commit
Switch 3
admin@Switch3# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 13 admin@Switch3# set interface gigabit-ethernet ge-1/1/5 family ethernet-switching native-vlan-id 34 admin@Switch3# set interface gigabit-ethernet ge-1/1/7 family ethernet-switching native-vlan-id 35 admin@Switch3# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 23 admin@Switch3# set ip routing enable true admin@Switch3# set l3-interface loopback lo address 3.3.3.3 prefix-length 32 admin@Switch3# set l3-interface loopback lo address 6.6.6.6 prefix-length 32 admin@Switch3# set l3-interface vlan-interface vlan34 address 10.0.34.3 prefix-length 24 admin@Switch3# set l3-interface vlan-interface vlan13 address 10.0.13.3 prefix-length 24 admin@Switch3# set l3-interface vlan-interface vlan23 address 10.0.23.3 prefix-length 24 admin@Switch3# set l3-interface vlan-interface vlan35 address 10.0.35.3 prefix-length 24 admin@Switch3# set protocols msdp mesh-group 6.6.6.6 member 2.2.2.2 admin@Switch3# set protocols msdp mesh-group 6.6.6.6 source 3.3.3.3 admin@Switch3# set protocols ospf router-id 3.3.3.3 admin@Switch3# set protocols ospf network 10.0.34.0/24 area 0.0.0.0 admin@Switch3# set protocols ospf network 6.6.6.6/32 area 0 admin@Switch3# set protocols ospf network 3.3.3.3/32 area 0 admin@Switch3# set protocols ospf network 10.0.13.0/24 area 0 admin@Switch3# set protocols ospf network 10.0.23.0/24 area 0 admin@Switch3# set protocols ospf network 10.0.35.0/24 area 0 admin@Switch3# set protocols pim rp 6.6.6.6 group 224.0.0.0/4 admin@Switch3# set protocols pim interface vlan34 admin@Switch3# set protocols pim interface lo admin@Switch3# set protocols pim interface vlan13 admin@Switch3# set protocols pim interface vlan23 admin@Switch3# set protocols pim interface vlan35 admin@Switch3# set vlans vlan-id 13 l3-interface vlan13 admin@Switch3# set vlans vlan-id 23 l3-interface vlan23 admin@Switch3# set vlans vlan-id 34 l3-interface vlan34 admin@Switch3# set vlans vlan-id 35 l3-interface vlan35 admin@Switch3# commit
Switch 4
admin@Switch4# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 24 admin@Switch4# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 34 admin@Switch4# set interface gigabit-ethernet te-1/1/10 family ethernet-switching native-vlan-id 100 admin@Switch4# set ip routing enable true admin@Switch4# set l3-interface vlan-interface vlan24 address 10.0.24.4 prefix-length 24 admin@Switch4# set l3-interface vlan-interface vlan34 address 10.0.34.4 prefix-length 24 admin@Switch4# set l3-interface vlan-interface vlan100 address 100.100.100.1 prefix-length 24 admin@Switch4# set protocols igmp interface vlan100 admin@Switch4# set protocols ospf router-id 4.4.4.4 admin@Switch4# set protocols ospf network 10.0.24.0/24 area 0 admin@Switch4# set protocols ospf network 10.0.34.0/24 area 0 admin@Switch4# set protocols ospf network 100.100.100.0/24 area 0 admin@Switch4# set protocols ospf interface vlan34 cost 15 admin@Switch4# set protocols pim rp 6.6.6.6 group 224.0.0.0/4 admin@Switch4# set protocols pim interface vlan24 admin@Switch4# set protocols pim interface vlan34 admin@Switch4# set protocols pim interface vlan100 admin@Switch4# set vlans vlan-id 24 l3-interface vlan24 admin@Switch4# set vlans vlan-id 34 l3-interface vlan34 admin@Switch4# set vlans vlan-id 100 l3-interface vlan100 admin@Switch4# commit
Switch 5
admin@Switch5# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 101 admin@Switch5# set interface gigabit-ethernet ge-1/1/7 family ethernet-switching native-vlan-id 35 admin@Switch5# set l3-interface vlan-interface vlan35 address 10.0.35.5 prefix-length 24 admin@Switch5# set l3-interface vlan-interface vlan101 address 101.101.101.1 prefix-length 24 admin@Switch5# set protocols igmp interface vlan101 admin@Switch5# set protocols ospf router-id 5.5.5.5 admin@Switch5# set protocols ospf network 10.0.35.0/24 area 0 admin@Switch5# set protocols pim rp 6.6.6.6 group 224.0.0.0/4 admin@Switch5# set protocols pim interface vlan35 admin@Switch5# set protocols pim interface vlan101 admin@Switch5# set vlans vlan-id 35 l3-interface vlan35 admin@Switch5# set vlans vlan-id 101 l3-interface vlan101 admin@Switch5# commit
Verify the Configuration
- You can use command run show msdp mesh-group to check the establishment state for MSDP peers.
admin@Switch2# run show msdp mesh-group Mesh group : 6.6.6.6 Source : 2.2.2.2 Member State 3.3.3.3 established
- You can use command run show msdp peer command to view the detail information about the remote MSDP peer.
admin@Switch2# run show msdp peer detail Peer : 3.3.3.3 Local : 2.2.2.2 Mesh Group : 6.6.6.6 State : established Uptime : 06:10:52 Keepalive Timer : 00:00:08 Conn Retry Timer : --:--:-- Hold Timer : 00:00:46 Last Reset : - Conn Attempts : 22 Established Changes : 1 SA Count : 2 Statistics : Sent Rcvd Keepalives : 371 4 SAs : 0 748
- You can view PIM routes on the switches by using the run show mroute Multicast source 200.200.200.2 in the PIM-SM domain sends multicast data to multicast group 238.0.0.1, and Host A joins multicast group 238.0.0.1 to receive multicast data sent to group 238.0.0.1.
By comparing the PIM routes on Switch 2, Switch 3 and Switch 4, we can see that the current valid RP is Switch 2: the multicast source registers with Switch 2 and Host A joins Switch 2. No PIM routes are displayed on Switch 3.
admin@Switch2# run show mroute IP Multicast Routing Table Flags: S - Sparse, C - Connected, P - Pruned R - RP-bit set, F - Register flag, T - SPT-bit set Source Group Flags Proto Input Output TTL Uptime * 238.0.0.1 S PIM lo vlan24 1 00:04:35 200.200.200.2 238.0.0.1 ST STAR vlan12 vlan24 1 00:04:37 admin@Switch3# run show mroute IP Multicast Routing Table Flags: S - Sparse, C - Connected, P - Pruned R - RP-bit set, F - Register flag, T - SPT-bit set Source Group Flags Proto Input Output TTL Uptime admin@Switch4# run show mroute IP Multicast Routing Table Flags: S - Sparse, C - Connected, P - Pruned R - RP-bit set, F - Register flag, T - SPT-bit set Source Group Flags Proto Input Output TTL Uptime * 238.0.0.1 SC IGMP vlan24 vlan100 1 02:00:31
- You can view the RP information by using the run show pim rp-info command.
admin@Switch2# run show pim rp-info RP address group/prefix-list OIF I am RP Source 6.6.6.6 224.0.0.0/4 lo yes Static admin@Switch3#run show pim rp-info RP address group/prefix-list OIF I am RP Source 6.6.6.6 224.0.0.0/4 lo yes Static admin@Switch4#run show pim rp-info RP address group/prefix-list OIF I am RP Source 6.6.6.6 224.0.0.0/4 vlan24 no Static
Copyright © 2024 Pica8 Inc. All Rights Reserved.