Configuring NQA For IPv4 Static Routes
Configuring NQA For IPv4 Static Routes
Static Routes
NQA for IPv4 static routes can fast detect network faults and control the
advertisement of static routes.
Networking Requirements
On a simple network or when the router cannot use a dynamic routing protocol to
generate routes, you can configure static routes. Unlike dynamic routing protocols,
static routes do not have a detection mechanism. If a link fails, a network
administrator must manually delete the corresponding static route from the IP
routing table, which delays link switchovers and causes a lengthy service
interruption.
Bidirectional Forwarding Detection (BFD) for static routes is adaptable to link
changes but requires that both ends of a link support BFD. If either end of a link
does not support BFD, configure NQA for IPv4 static routes. If an NQA test instance
detects a link fault, it instructs the routing management module to delete the
associated static route from the IPv4 routing table. Then traffic is switched to a
backup route to prevent lengthy service interruptions.
In Figure 1, backup links are deployed on the IP metropolitan area network (MAN).
• Static routes are configured on Device B and Device C. Device B is the master
device, while Device C is the backup device.
• In most cases, traffic is transmitted over the primary link (Device B -> Switch A).
• If the primary link fails, traffic switches to the backup link (Device C -> Switch
A).
NOTE:
Interfaces 1 through 5 in this example are GE 1/0/0, GE 1/0/1, GE 1/0/2, GE 1/0/3,
GE 2/0/3, respectively.
NOTE:
In this networking, Switch A and Switch B provide access services for users. In actual
networking, optical line terminals (OLTs), digital subscriber line access multiplexers
(DSLAMs), multiservice access nodes (MSANs), or x digital subscriber lines (xDSLs)
can be used for user access.
Configuration Roadmap
Data Preparation
GE 1/0/0 172.16.3.2/24
Device A
GE 2/0/3 172.16.4.1/24
GE 1/0/0 172.16.3.2/24
GE 1/0/3 172.16.5.1/24
GE 1/0/0 172.16.6.1/24
GE 2/0/3 172.16.2.1/24
VLANIF 10 172.16.1.2/24
VLANIF 30 172.16.7.1/24
VLANIF 10 172.16.2.2/24
VLANIF 30 172.16.8.1/24
Item Value
Number of probes 2
• OSPF backbone area (Area 0) of Device A, Device B, and Device C, and their
router IDs (1.1.1.1, 2.2.2.2, and 3.3.3.3)
Procedure
2. Create an NQA test instance on Device B to test the link between Device B and
Switch A.
3. <DeviceB> system-view
4. [~DeviceB] nqa test-instance user test
5. [*DeviceB-nqa-user-test] test-type icmp
6. [*DeviceB-nqa-user-test] destination-address ipv4 172.16.1.2
7. [*DeviceB-nqa-user-test] frequency 10
8. [*DeviceB-nqa-user-test] probe-count 2
9. [*DeviceB-nqa-user-test] interval seconds 5
10. [*DeviceB-nqa-user-test] timeout 4
11. [*DeviceB-nqa-user-test] start now
12. [*DeviceB-nqa-user-test] commit
[~DeviceB-nqa-user-test] quit
# Configure an IPv4 static route on Device B and associate it with the NQA test
instance.
[~DeviceB] ip route-static 172.16.7.0 255.255.255.0 GigabitEthernet 1/0/1
172.16.1.2 track nqa user test
[*DeviceB] commit
# Configure an IPv4 static route on Device C.
[~DeviceC] ip route-static 172.16.7.0 255.255.255.0 GigabitEthernet 1/0/0
172.16.6.2
[*DeviceC] commit
14. Configure a dynamic routing protocol on Device A, Device B, and Device C. OSPF
is used in this example.
# Configure OSPF on Device B to import a static route, and set the cost to 10 for
the static route.
[~DeviceB] ospf 1
[*DeviceB-ospf-1] import-route static cost 10
[*DeviceB-ospf-1] commit
[~DeviceB-ospf-1] quit
# Configure OSPF on Device C to import a static route, and set the cost to 20 for
the static route.
[~DeviceC] ospf 1
[*DeviceC-ospf-1] import-route static cost 20
[*DeviceC-ospf-1] commit
[~DeviceC-ospf-1] quit
The static route has been associated with the NQA test instance on Device B. If
NQA detects a link fault, it rapidly notifies Device B that the associated static route
is unavailable. Device A cannot learn the route to 172.16.7.0/24 from Device B.
However, Device A can learn the route to 172.16.7.0/24 from Device C. The route's
next hop address is 172.16.4.2, and the cost is 20. Traffic switches to the
link Device C -> Switch A.
Configuration Files