Example for Configuring BFD for OSPF


Networking Requirements

As shown in Figure 1,  OSPF 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 OSPF

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 OSPF functions.

admin@SwitchA# set protocols ospf router-id 1.1.1.1
admin@SwitchA# set protocols ospf interface vlan13 area 0

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

admin@SwitchA# set protocols ospf interface vlan13 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 OSPF functions.

admin@SwitchB# set protocols ospf router-id 3.3.3.3
admin@SwitchB# set protocols ospf interface vlan13 area 0

Step3          Enable BFD and create a BFD session for OSPF on SwitchC.

admin@SwitchB# set protocols ospf interface vlan13 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         
=========  ============                             ===========                             ======         
1116990599 10.10.13.1                                10.10.13.3                              up

admin@SwitchB# run show bfd peers brief 
Session count: 1
SessionId  LocalAddress                             PeerAddress                             Status         
=========  ============                             ===========                             ======         
1078838095 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         
=========  ============                             ===========                             ======         
1116990599 10.10.13.1                                10.10.13.3                              down

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








Copyright © 2024 Pica8 Inc. All Rights Reserved.