[RouterA]
ip route-static 0.0.0.0 0 1.1.1.2 track bfd-session aa
Step 4
Verify the configuration.
# After the configuration, run the
display bfd session
all
command on Router A and Router B.
The command output shows that a BFD session has been established and is in the Up state. Then,
run the
display current-configuration | include bfd
command in the system view. The
command output shows that the default static route has been bound to the BFD session.
Take the display on Router A as an example.
[RouterA]
display bfd session all
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
10 20 1.1.1.2 Up S_IP_PEER -
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
[RouterA]
display current-configuration | include bfd
bfd
bfd aa bind peer-ip 1.1.1.2
ip route-static 0.0.0.0 0.0.0.0 1.1.1.2 track bfd-session aa
# Check the IP routing table of Router A. The command output shows that the static route exists
in the routing table.
[RouterA]
display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 1.1.1.2 GigabitEthernet1/0/0
1.1.1.0/24 Direct 0 0 D 1.1.1.1 GigabitEthernet1/0/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet1/0/0
# Run the
shutdown
command on GE 1/0/0 of Router B to simulate a link fault.
[RouterB]
interface GigabitEthernet 1/0/0
[RouterB-GigabitEthernet1/0/0]
shutdown
# Check the IP routing table of Router A. The command output shows that default route 0.0.0.0/0
does not exist. This is because the default static route is bound to a BFD session. When BFD
detects a link fault, BFD rapidly notifies that the bound static route becomes unavailable. If the
static route is not bound to a BFD session, the default route 0.0.0.0/0 will always exist in IP
routing table, this may cause traffic loss.
[RouterA]
display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 GigabitEthernet1/0/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet1/0/0
----End
Configuration Files
l
Configuration file of Router A
#
sysname RouterA
#
HUAWEI NetEngine80E/40E Router
Configuration Guide - IP Routing
2 IP Static Route Configuration
Issue 02 (2014-09-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
130