Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure DR Switching Convergence of PIM-SM and BFD Linkage

Network Requirements

  • The whole network runs the PIM-SM protocol.
  • Receiver is one receiver of Device3 end network.
  • Device2 and device3 are located in the stub network of the receiver, and device3 is the receiver DR.
  • The line between device2 and device3 enables PIM BFD. When the line between device3 and receiver fails, Device2 will quickly switch to receiver DR.

Network Topology

Networking of configuring the DR switching convergence of PIM-SM and BFD linkage

Figure 7-4 Networking of configuring the DR switching convergence of PIM-SM and BFD linkage

Configuration Steps

Step 1: Configure the IP address of the interface. (omitted)

Step 2: Enable the unicast routing protocol OSPF, so that all devices in the network can communicate with each other.

#Configure Device1.

Device1#configure terminal
Device1(config)#router ospf 100
Device1(config-ospf)#network 2.0.0.0 0.0.0.255 area 0
Device1(config-ospf)#network 3.0.0.0 0.0.0.255 area 0
Device1(config-ospf)#network 192.168.1.0 0.0.0.255 area 0
Device1(config-ospf)#exit

#Configure Device2.

Device2#configure terminal
Device2(config)#router ospf 100
Device2(config-ospf)#network 3.0.0.0 0.0.0.255 area 0
Device2(config-ospf)#network 4.0.0.0 0.0.0.255 area 0
Device2(config-ospf)#exit

#Configure Device3.

Device3#configure terminal
Device3(config)#router ospf 100
Device3(config-ospf)#network 2.0.0.0 0.0.0.255 area 0
Device3(config-ospf)#network 4.0.0.0 0.0.0.255 area 0
Device3(config-ospf)#exit

#Query the route table of Device3.

Device3#show ip route 
Codes: C - connected, S - static, R - RIP, O - OSPF, OE-OSPF External, M - Management 
       D - Redirect, E - IRMP, EX - IRMP external, o - SNSP, B - BGP, i-ISIS  
 
Gateway of last resort is not set 
 
C 2.0.0.0/24 is directly connected, 14:48:47, vlan3 
O 3.0.0.0/24 [110/2] via 2.0.0.1, 14:31:14, vlan3 
             [110/2] via 4.0.0.1, 14:31:04, vlan4
C 4.0.0.0/24 is directly connected, 15:36:57, vlan4 
O 192.168.1.0/24 [110/2] via 2.0.0.1, 00:30:55, vlan3

note


  • The viewing method of Device1 and device2 is the same as that of Device3, so the viewing process is omitted.

Step 3: Globally enable multicast forwarding, and enable multicast protocol PIM-SM on the interface.

#Configure Device1.

Enable multicast forwarding globally and enable multicast protocol PIM-SM on related interfaces.

Device1(config)#ip multicast-routing
Device1(config)#interface vlan2
Device1(config-if-vlan2)#ip pim sparse-mode
Device1(config-if-vlan2)#exit
Device1(config)#interface vlan 3
Device1(config-if-vlan3)#ip pim sparse-mode
Device1(config-if-vlan3)#exit
Device1(config)#interface vlan 4
Device1(config-if-vlan4)#ip pim sparse-mode
Device1(config-if-vlan4)#exit

#Configure Device2.

Enable multicast forwarding globally and enable multicast protocol PIM-SM on related interfaces.

Device2(config)#ip multicast-routing
Device2(config)#interface vlan 4
Device2(config-if-vlan4)#ip pim sparse-mode
Device2(config-if-vlan4)#exit
Device2(config)#interface vlan 5
Device2(config-if-vlan5)#ip pim sparse-mode
Device2(config-if-vlan5)#exit

#Configure Device3.

Enable multicast forwarding globally and enable multicast protocol PIM-SM on related interfaces.

Device3(config)#ip multicast-routing
Device3(config)#interface vlan 3
Device3(config-if-vlan3)#ip pim sparse-mode
Device3(config-if-vlan3)#exit
Device3(config)#interface vlan 4
Device3(config-if-vlan4)#ip pim sparse-mode
Device3(config-if-vlan4)#exit

#View the information of the interface on Device 3 enabled with the PIM-SM protocol and the neighbor information of PIM-SM.

Device3#show ip pim interface
PIM Interface Table: 
PIM VRF Name: Default
Total 2 Interface entries 
Total 0 External Interface entry 
Total 0 Sparse-Dense Mode Interface entry 
 
Address     Interface            VIF      Ver/      VIF      Nbr       DR       DR
BSR CISCO Neighbor 
                                 Index    Mode   Flag              CountPri
Border Neighbor Filter 
2.0.0.2     vlan3                2    v2/S   UP    1       1     
2.0.0.2    FALSE FALSE 
4.0.0.2     vlan4                0    v2/S   UP    1       1     
4.0.0.2    FALSE FALSE 
 
Device3#show ip pim neighbor PIM Neighbor Table: 
PIM VRF Name: Default Total 2 Neighbor entries 
 
NeighborInterface  Uptime/Expires    Ver  DR  Priority/Mode
Address                   
4.0.0.1 vlan4      00:11:26/00:01:19 v2   1   / 
2.0.0.1 vlan3      00:05:57/00:01:18 v2   1   /

#You can see that Device3 is the receiver DR of the stub network where Receiver is located.

note


  • The viewing method of Device1 and device2 is the same as that of Device3, so the viewing process is omitted.

Step 4: Configure C-BSR and C-RP.

#Configure Device1.

Configure VLAN2 of Device1 as C-BSR and C-RP of the whole network, and the multicast group range of C-RP service is 224.0.0.0/8.

Device1(config)#ip pim bsr-candidate vlan 2
Device1(config)#ip pim rp-candidate vlan 2

#View the BSR and RP information of Device3.

Device3#show ip pim bsr-router
PIMv2 Bootstrap information
PIM VRF Name: Default 
  BSR address: 192.168.1.254
  BSR Priority: 0 
  Hash mask length: 10 
  Up time: 00:00:17 
  Expiry time: 00:01:56 
  Role: Non-candidate BSR 
  State: Accept Preferred 

Device3#show ip pim rp mapping  
 
PIM Group-to-RP Mappings Table:
PIM VRF Name: Default 
Total 1 RP set entry
Total 1 RP entry 

  Group(s): 224.0.0.0/4 
  RP count: 1 
    RP: 192.168.1.254 

      Info source: 192.168.1.254, via bootstrap, priority 192 
      Up time: 00:00:16 
      Expiry time: 00:02:14 

note


  • The viewing method of Device1 and device2 is the same as that of Device3, so the viewing process is omitted.

Step 5: On Device2 and Device3, configure PIM and BFD linkage.

#Configure Device2.

Device2(config)#interface vlan 5
Device2(config-if-vlan5)#ip pim bfd
Device2(config-if-vlan5)#exit

#Configure Device3.

Device3(config)#interface vlan 4
Device3(config-if-vlan4)#ip pim bfd
Device3(config-if-vlan4)#exit

#Query the BFD session information of Device3.

Device3#show bfd session detail Total session number: 1 
OurAddr   NeighAddr   LD/RD   State  Holddown Interface            
4.0.0.2	  4.0.0.1     5/1     UP     5000     vlan4 
Type:ipv4 direct 
Local State:UP
Remote State:UP
Up for: 0h:6m:39s
Number of times UP:1
Send Interval:1000ms
Detection time:3000ms(1000ms*3) 
Local Diag:0
Demand mode:0
Poll bit:0
MinTxInt:1000
MinRxInt:1000
Multiplier:5 
Remote MinTxInt:10
Remote MinRxInt:10
Remote Multiplier:3
Registered protocols:PIM 
Agent session info:
Sender:slot 2 Recver:slot 2 

#You can see that PIM is associated with BFD successfully.

note


  • The viewing method of Device2 is the same as that of Device3, so the viewing process is omitted.

Step 6: Check the result.

#Receiver sends the IGMPv2 membership report to join the multicast group 225.1.1.1, and Source sends the multicast service packet with the multicast group 225.1.1.1.

#View the multicast member tables on Device2 and Device3.

Device2#show ip igmp groups
IGMP Connected Group
Membership Total 1 groups 
Group Address   Interface  Uptime    Expires   Last Reporter V1 Expires V2 Expires 
225.1.1.1       vlan5      00:00:56  00:03:25  4.0.0.3         stopped 
  
Device3#show ip igmp groups
IGMP Connected Group
Membership Total 1 groups 
Group Address  Interface   Uptime    Expires    Last Reporter V1 Expires V2 Expires 
225.1.1.1      vlan4       00:00:02  00:04:17   4.0.0.3       stopped 

#View the PIM-SM multicast route tables on Device2 and Device3.

Device2#show ip pim mroute
IP Multicast Routing Table:
PIM VRF Name: Default
Total 0 (*,*,RP) entry
Total 1 (*,G) entry 
Total 0 (S,G) entry
Total 0 (S,G,rpt) entry
Total 0 FCR entry 
Up timer/Expiry timer 
 
(*, 225.1.1.1) 
Up time: 00:04:27
RP: 192.168.1.254 
RPF nbr: 0.0.0.0
RPF idx: None
Flags: 
Upstream State: NOT JOINED 
  Local interface list: 
        vlan5 
  Joined interface list: 
  Asserted interface list: 
 
Device3#show ip pim mroute
IP Multicast Routing Table:
PIM VRF Name: Default
Total 0 (*,*,RP) entry
Total 1 (*,G) entry 
Total 1 (S,G) entry
Total 1 (S,G,rpt) entry
Total 0 FCR entry 
Up timer/Expiry timer 
 
(*, 225.1.1.1) 
Up time: 00:02:10 
RP: 192.168.1.254 
RPF nbr: 2.0.0.1 
RPF idx: vlan3
Flags: 
  JOIN DESIRED 
Upstream State: JOINED 
  Local interface list: 
       vlan4 
  Joined interface list: 
  Asserted interface list: 
 
 
(192.168.1.1, 225.1.1.1) 
Up time: 00:00:37
KAT time: 00:02:53
RPF nbr: 2.0.0.1
RPF idx: vlan3
SPT bit: TRUE
Flags: 
  JOIN DESIRED 
Upstream State: JOINED 
  Local interface list: 
  Joined interface list: 
  Asserted interface list: 
 Outgoing interface list: 
vlan4 
  Packet count 0 
 
(192.168.1.1, 225.1.1.1, rpt) 
Up time: 00:00:37
RP: 192.168.1.254 
Flags: 
  RPT JOIN DESIRED 
  RPF SGRPT XG EQUAL 
Upstream State: NOT PRUNED 
  Local interface list: 
  Pruned interface list: 
  Outgoing interface list

#It can be seen that the upstream state of PIM-SM multicast routing table of Device2 is NOT JOINED, the upstream state of Device3 multicast route is JOINED, and multicast service packets are forwarded to Receiver through Device3.

#When the line between Device3 and Receiver fails, BFD will quickly detect and notify PIM-SM protocol, and Device2 will quickly switch to receiver Dr.

#View the PIM-SM neighbor information, BFD session information and PIM-SM multicast route table of Device2.

Device2#show ip pim neighbor
PIM Neighbor Table: 
PIM VRF Name: Default
Total 1 Neighbor entry 
 
Neighbor    Interface    Uptime/Expires    Ver DR 
Address                                    Priority/Mode
3.0.0.1     vlan4        01:12:27/00:01:31 v2 1 / 
 
Device2#show bfd session detail
Total session number: 0 
 
Device2#show ip pim mroute 
IP Multicast Routing Table:
PIM VRF Name: Default
Total 0 (*,*,RP) entry
Total 1 (*,G) entry 
Total 1 (S,G) entry
Total 1 (S,G,rpt) entry
Total 0 FCR entry 
Up timer/Expiry timer 
 
(*, 225.1.1.1) 
Up time: 00:01:03
RP: 192.168.1.254 
RPF nbr: 3.0.0.1
RPF idx: vlan4
Flags: 
  JOIN DESIRED 
Upstream State: JOINED 
  Local interface list: 
    vlan5 
  Joined interface list: 
  Asserted interface list: 
 
 
(192.168.1.1, 225.1.1.1) 
Up time: 00:00:42
KAT time: 00:02:48
RPF nbr: 3.0.0.1
RPF idx: vlan4
SPT bit: TRUE
Flags: 
  JOIN DESIRED 
Upstream State: JOINED 
  Local interface list: 
  Joined interface list: 
  Asserted interface list: 
  Outgoing interface list: 
    vlan5 
  Packet count 0 
 
(192.168.1.1, 225.1.1.1, rpt) 
Up time: 00:00:42
RP: 192.168.1.254 
Flags: 
  RPT JOIN DESIRED 
  RPF SGRPT XG EQUAL 
Upstream State: NOT PRUNED 
  Local interface list: 
  Pruned interface list: 
  Outgoing interface list:

#View the PIM-SM neighbor, BFD session, and multicast route table of Device3.

Device3#show ip pim neighbor
PIM Neighbor Table: 
PIM VRF Name: Default
Total 1 Neighbor entry 
 
Neighbor   Interface  Uptime/Expires      Ver DR 
Address                                   Priority/Mode
2.0.0.1    vlan3      00:12:27/00:01:20   v2 1 / 
 
Device3#show bfd session detail
Total session number: 0 
 
Device3#show ip pim mroute
IP Multicast Routing Table:
PIM VRF Name: Default
Total 0 (*,*,RP) entry
Total 0 (*,G) entry 
Total 0(S,G) entry
Total 0 (S,G,rpt) entry
Total 0 FCR entry 
Up timer/Expiry timer 

#It can be seen that after the receiver DR Device3 fails, the BFD session responds immediately, and Device2 switches to the receiver DR. the multicast service packet is forwarded to Receiver through Device2.

note


  • BFD and PIM linkage is also applicable to the scenario of Asset campaign on shared network segment. When the interface of Assert Winner fails, Assert Loser can respond quickly and recover forwarding multicast packets.