Example for Configuring Multi-Hop BFD

Example for Configuring Multi-Hop BFD


Networking Requirements

As shown in Figure 1, SwitchA and SwitchC are connected through the Layer 3 switch SwitchB. Users can configure multi-hop BFD session on SwitchA and SwitchC so that faults on the multi-hop link between SwitchA and SwitchC can be detected rapidly. 

Figure 1 Multi-hop BFD for detecting faults



Procedure

Switch A

Step1          Configure VLAN interface.

admin@SwitchA# set vlans vlan-id 12 admin@SwitchA# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 12 admin@SwitchA# set l3-interface vlan-interface vlan12 address 10.10.12.1 prefix-length 24 admin@SwitchA# set vlans vlan-id 12 l3-interface vlan12

Step2         Configure a static route for connection between SwitchA and SwitchC.

admin@SwitchA# set protocols static route 10.10.23.0/24 next-hop 10.10.12.2

Step3 Enable BFD and create a multi-hop BFD session on SwitchA.

admin@SwitchA# set protocols bfd multihop peer 10.10.23.1 local-address 10.10.12.1

Step4 Enable IP routing function.

admin@SwitchA# set ip routing enable true

Step5          Commit the configurations.

admin@SwitchA# commit

Switch B

Step1          Configure VLAN interface.

admin@SwitchB# set vlans vlan-id 12 admin@SwitchB# set vlans vlan-id 23 admin@SwitchB# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 12 admin@SwitchB# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 23 admin@SwitchB# set l3-interface vlan-interface vlan12 address 10.10.12.2 prefix-length 24 admin@SwitchB# set l3-interface vlan-interface vlan23 address 10.10.23.2 prefix-length 24 admin@SwitchB# set vlans vlan-id 12 l3-interface vlan12 admin@SwitchB# set vlans vlan-id 23 l3-interface vlan23 admin@SwitchB# set ip routing enable true

Step2          Commit the configurations.

admin@SwitchB# commit

Switch C

Step1          Configure VLAN interface.

admin@SwitchC# set vlans vlan-id 23 admin@SwitchC# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 23 admin@SwitchC# set l3-interface vlan-interface vlan23 address 10.10.23.1 prefix-length 24 admin@SwitchC# set vlans vlan-id 23 l3-interface vlan23 admin@SwitchC# set ip routing enable true

Step2         Configure a static route for connection between SwitchA and SwitchC.

admin@SwitchC# set protocols static route 10.10.12.0/24 next-hop 10.10.23.2

Step3          Enable BFD and create a multi-hop BFD session on SwitchC.

admin@SwitchC# set protocols bfd multihop peer 10.10.12.1 local-address 10.10.23.1

Step4          Commit the configurations.

admin@SwitchC# commit

Verify the Configuration

  • After the configuration is complete, run the command run show bfd peers brief on SwitchA and SwitchC. You can see that a multi-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 ========= ============ =========== ====== 2486827319 10.10.12.1 10.10.23.1 up admin@SwitchC# run show bfd peers brief Session count: 1 SessionId LocalAddress PeerAddress Status ========= ============ =========== ====== 1810426318 10.10.23.1 10.10.12.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 SwitchC. You can see that a multi-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 ========= ============ =========== ====== 2486827319 10.10.12.1 10.10.23.1 down admin@SwitchC# run show bfd peers brief Session count: 1 SessionId LocalAddress PeerAddress Status ========= ============ =========== ====== 1810426318 10.10.23.1 10.10.12.1 down

















Copyright © 2026 Pica8 Inc. All Rights Reserved.