Example for Configuring Single-Hop BFD

Example for Configuring Single-Hop BFD


Networking Requirements

As shown in Figure 1, SwitchA and SwitchB are connected through the Layer 2 switch. Users can configure BFD sessions on SwitchA and SwitchB so that faults on the link between SwitchA and SwitchB can to be detected rapidly. 

Figure 1 Single-hop BFD for detecting faults

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          Enable BFD and create a single-hop BFD session on SwitchA.

admin@SwitchA# set protocols bfd interface vlan13 peer 10.10.13.3

Step3 Enable IP routing function.

admin@SwitchA# set ip routing enable true

Step4          Commit the configurations.

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 configurations.

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          Enable BFD and create a BFD session on SwitchB.

admin@SwitchB# set protocols bfd interface vlan13 peer 10.10.13.1

Step3 Enable IP routing function.

admin@SwitchB# set ip routing enable true

Step4          Commit the configurations.    

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 single-hop BFD session is set up and its status is up.

admin@SwitchA# run show bfd peers brief Session count: 1 SessionId LocalAddress PeerAddress Status ========= ============ =========== ====== 2107973506 10.10.13.1 10.10.13.3 up admin@SwitchB# run show bfd peers brief Session count: 1 SessionId LocalAddress PeerAddress Status ========= ============ =========== ====== 1620807635 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 single-hop BFD session is set up and its status is down.

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















Related content

Copyright © 2025 Pica8 Inc. All Rights Reserved.