Example for Configuring BFD for BGP


Networking Requirements

As shown in Figure 1,  BGP is established between SwitchA and SwitchB, and the L2 switch between SwitchA and SwitchB only provides the transparent transmission function. Users can configure BFD sessions on SwitchA and SwitchB so that faults on the link between SwitchA and SwitchB can be detected rapidly. 

Figure 1 Configuring BFD for BGP

Procedure

Switch A

Step1          Configure VLAN interface.

admin@SwitchA# set vlans vlan-id 13
admin@SwitchA# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 13
admin@SwitchA# set l3-interface vlan-interface vlan13 address 10.10.13.1 prefix-length 24
admin@SwitchA# set vlans vlan-id 13 l3-interface vlan13

Step2          Configure basic BGP functions.

admin@SwitchA# set protocols bgp local-as 100
admin@SwitchA# set protocols bgp router-id 1.1.1.1
admin@SwitchA# set protocols bgp neighbor 10.10.13.3 remote-as 100

Step3          Enable BFD and create a BFD session for BGP on SwitchA.

admin@SwitchA# set protocols bgp neighbor 10.10.13.3 bfd

Step4          Commit the configuration.

admin@SwitchA# commit

L2 Switch

Step1          Configure the VLAN.

admin@L2Switch# set vlans vlan-id 13
admin@L2Switch# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 13
admin@L2Switch# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 13

Step2          Commit the configuration.

admin@L2Switch# commit

Switch B

Step1          Configure VLAN interface.

admin@SwitchB# set vlans vlan-id 13
admin@SwitchB# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 13
admin@SwitchB# set l3-interface vlan-interface vlan13 address 10.10.13.3 prefix-length 24
admin@SwitchB# set vlans vlan-id 13 l3-interface vlan13

Step2          Configure basic BGP functions.

admin@SwitchB# set protocols bgp local-as 100
admin@SwitchB# set protocols bgp router-id 3.3.3.3
admin@SwitchB# set protocols bgp neighbor 10.10.13.1 remote-as 100

Step3          Enable BFD and create a BFD session for BGP on SwitchB.

admin@SwitchB# set protocols bgp neighbor 10.10.13.1 bfd

Step4          Commit the configuration.

admin@SwitchB# commit

Verify the Configuration

  • After the configuration is complete, run the command run show bfd peers brief on SwitchA and SwitchB. You can see that a BFD session between SwitchA and SwitchB is set up and its status is up.
admin@SwitchA# run show bfd peers brief 
Session count: 1
SessionId  LocalAddress                             PeerAddress                             Status         
=========  ============                             ===========                             ======         
2732266946 10.10.13.1                                10.10.13.3                              up

admin@SwitchB# run show bfd peers brief 
Session count: 1
SessionId  LocalAddress                             PeerAddress                             Status         
=========  ============                             ===========                             ======         
570407432 10.10.13.3                                10.10.13.1                              up
  • Run the set interface gigabit-ethernet ge-1/1/2 disable true command on the GE-1/1/2 interface of SwitchB to simulate a link fault.
admin@SwitchB# set interface gigabit-ethernet ge-1/1/2 disable true
admin@SwitchB# commit
  • After the configuration is complete, run the command run show bfd peers brief on SwitchA and SwitchB. You can see that a BFD session between SwitchA and SwitchB is set up but its status is down.
admin@SwitchA# run show bfd peers brief 
Session count: 1
SessionId  LocalAddress                             PeerAddress                             Status         
=========  ============                             ===========                             ======         
2732266946 10.10.13.1                                10.10.13.3                              down

admin@SwitchB# run show bfd peers brief 
Session count: 1
SessionId  LocalAddress                             PeerAddress                             Status         
=========  ============                             ===========                             ======         
570407432 10.10.13.3                                10.10.13.1                              down








Copyright © 2024 Pica8 Inc. All Rights Reserved.