Example for Configuring OSPF IP FRR
Networking Requirements
- It takes hundreds of milliseconds for the traffic to be switched to a backup link during OSPF fault restoration, which leads to service interruption.
- Traffic may be switched to a link passing through Switch A, but Switch A is an ASBR and is not expected to function as a backup device.
When a fault occurs on the network, OSPF IP FRR can fast switch traffic to a backup link without waiting for route convergence. This ensures uninterrupted traffic transmission. In addition, you can also configure Switch A (ASBR) to detour around the backup link.
- All switches run OSPF.
- Link costs meet the OSPF IP FRR traffic protection inequality.
When the primary link T fails, Switch S immediately switches traffic to the backup link. The traffic is forwarded through Switch N.
- Based on the network plan, the link where Switch A resides does not function as an FRR backup link.
Switch |
Router ID |
Interface |
VLANIF Interface |
IP Address |
---|---|---|---|---|
Switch S |
10.10.10.1 |
10GE1/0/1 |
VLANIF 10 |
10.1.1.1/24 |
10GE1/0/2 |
VLANIF 20 |
10.1.2.1/24 |
||
10GE1/0/3 |
VLANIF 30 |
10.1.3.1/24 |
||
Switch A |
10.10.10.2 |
10GE1/0/1 |
VLANIF 10 |
10.1.1.2/24 |
10GE1/0/2 |
VLANIF 40 |
10.20.1.2/24 |
||
Switch N |
10.10.10.3 |
10GE1/0/1 |
VLANIF 30 |
10.1.3.2/24 |
10GE1/0/2 |
VLANIF 60 |
10.20.3.2/24 |
||
Switch E |
10.10.10.4 |
10GE1/0/1 |
VLANIF 40 |
10.20.1.1/24 |
10GE1/0/2 |
VLANIF 20 |
10.1.2.2/24 |
||
10GE1/0/3 |
VLANIF 60 |
10.20.3.1/24 |
||
10GE1/0/4 |
VLANIF 70 |
172.17.1.1/24 |
Configuration Notes
When configuring OSPF IP FRR, note that:
Before configuring OSPF IP FRR, if an interface is expected not to be an interface of a back link, you need to block FRR on the interface.
During the configuration of OSPF IP FRR, the lower layer needs to fast respond to a link change so that traffic can be rapidly switched to the backup link. After the bfd all-interfaces frr-binding command is run, the BFD session status is associated with the link status of an interface (when the BFD session goes Down, the link status of the interface becomes Down) so that link faults can be rapidly detected.
Configuration Roadmap
Configure basic OSPF functions on each switch.
Configure BFD for OSPF on all devices in Area 0.
Set the costs of links to ensure that link T is preferred to transmit traffic.
Block FRR on a specified interface of Switch S.
- Enable OSPF IP FRR on Switch S to protect the traffic forwarded by Switch S.
Procedure
- Assign an IP address to each interface. The configuration details are not provided here.
- Configure basic OSPF functions. For details, see Example for Configuring Basic OSPF Functions.
- Configure BFD for OSPF on all devices in Area 0. For details, see Example for Configuring BFD for OSPF.
- Set the costs of links to ensure that link T is preferred to transmit traffic.
# Configure Switch S.
[~SwitchS] interface vlanif 10
[*SwitchS-Vlanif10] ospf cost 10
[*SwitchS-Vlanif10] quit
[*SwitchS] interface vlanif 20
[*SwitchS-Vlanif20] ospf cost 15
[*SwitchS-Vlanif20] quit
[*SwitchS] interface vlanif 30
[*SwitchS-Vlanif30] ospf cost 10
[*SwitchS-Vlanif30] quit
[*SwitchS] commit
# Configure Switch A.
[~SwitchA] interface vlanif 40
[*SwitchA-Vlanif40] ospf cost 15
[*SwitchA-Vlanif40] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ospf cost 10
[*SwitchA-Vlanif10] quit
[*SwitchA] commit
# Configure Switch N.
[~SwitchN] interface vlanif 30
[*SwitchN-Vlanif30] ospf cost 10
[*SwitchN-Vlanif30] quit
[*SwitchN] interface vlanif 60
[*SwitchN-Vlanif60] ospf cost 10
[*SwitchN-Vlanif60] quit
[*SwitchN] commit
# Configure Switch E.
[~SwitchE] interface vlanif 20
[*SwitchE-Vlanif20] ospf cost 15
[*SwitchE-Vlanif20] quit
[*SwitchE] interface vlanif 40
[*SwitchE-Vlanif30] ospf cost 15
[*SwitchE-Vlanif30] quit
[*SwitchE] interface vlanif 60
[*SwitchE-Vlanif40] ospf cost 10
[*SwitchE-Vlanif40] quit
[*SwitchE] interface vlanif 70
[*SwitchE-Vlanif70] ospf cost 5
[*SwitchE-Vlanif70] quit
[*SwitchE] commit
- Block FRR on a specified interface of Switch S.
[~SwitchS] interface vlanif 10
[~SwitchS-Vlanif10] ospf frr block
[*SwitchS-Vlanif10] quit
[*SwitchS] commit
- Enable OSPF IP FRR on Switch S.
[~SwitchS] ospf [*SwitchS-ospf-1] frr [*SwitchS-ospf-1-frr] loop-free-alternate [*SwitchS-ospf-1-frr] commit
- Verify the configuration.
# Run the display ospf routing router-id command on Switch S to view routing information.
[~SwitchS-ospf-1-frr] display ospf routing 172.17.1.1
Flags: A - Added to URT, S - Secondary route OSPF Process 1 with Router ID 10.10.10.1 Destination : 10.10.10.4/32 AdverRouter : 10.10.10.4 Area : 0.0.0.0 Cost : 3 Type : Stub NextHop : 10.1.2.2 Interface : Vlanif20 Priority : Low Backup NextHop : 10.1.3.2 Backup Interface : Vlanif30 Backup Type : LFA LINK-NODE Flags : A/-
The preceding display shows that a backup route is generated on Switch S.
Configuration Files
Configuration file of Switch S
#
sysname SwitchS # vlan batch 10 20 30 # bfd # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 ospf cost 10 ospf frr block # interface Vlanif20 ip address 10.1.2.1 255.255.255.0 ospf cost 15 # interface Vlanif30 ip address 10.1.3.1 255.255.255.0 ospf cost 10 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 20 # interface 10GE1/0/3 port link-type trunk port trunk allow-pass vlan 30 # ospf 1 router-id 10.10.10.1 bfd all-interfaces enable bfd all-interfaces frr-binding frr loop-free-alternate area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.1.2.0 0.0.0.255 network 10.1.3.0 0.0.0.255 # return
Configuration file of Switch A
# sysname SwitchA # vlan batch 10 40 # bfd # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 ospf cost 10 # interface Vlanif40 ip address 20.1.1.2 255.255.255.0 ospf cost 15 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 40 # ospf 1 router-id 10.10.10.2 bfd all-interfaces enable bfd all-interfaces frr-binding area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 20.1.1.0 0.0.0.255 # return
Configuration file of Switch N
# sysname SwitchN # vlan batch 30 60 # bfd # interface Vlanif30 ip address 10.1.3.2 255.255.255.0 ospf cost 10 # interface Vlanif60 ip address 20.1.3.2 255.255.255.0 ospf cost 10 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 30 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 60 # ospf 1 router-id 10.10.10.3 bfd all-interfaces enable bfd all-interfaces frr-binding area 0.0.0.0 network 10.1.3.0 0.0.0.255 network 20.1.3.0 0.0.0.255 # return
Configuration file of Switch E
# sysname SwitchE # vlan batch 20 40 60 70 # bfd # interface Vlanif20 ip address 10.1.2.2 255.255.255.0 ospf cost 15 # interface Vlanif40 ip address 20.1.1.1 255.255.255.0 ospf cost 15 # interface Vlanif60 ip address 20.1.3.1 255.255.255.0 ospf cost 10 # interface Vlanif70 ip address 172.17.1.1 255.255.255.0 ospf cost 5 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 40 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 20 # interface 10GE1/0/3 port link-type trunk port trunk allow-pass vlan 60 # interface 10GE1/0/4 port link-type trunk port trunk allow-pass vlan 70 # ospf 1 router-id 10.10.10.4 bfd all-interfaces enable bfd all-interfaces frr-binding area 0.0.0.0 network 10.1.2.0 0.0.0.255 network 20.1.1.0 0.0.0.255 network 20.1.3.0 0.0.0.255 network 172.17.1.0 0.0.0.255 # return