The well-known Cisco IP SLA function is also available on Huawei devices and is called NQA (Network Quality Analysis). It allows to configure tests to react on failures. This article shows a simple ICMP IP SLA/NQA example that is attached to a static route.
First the NQA test is created. In this example it is a simple ICMP test that pings an IP address. The NQA test requires both a user (in this example netcamp) and a name (IPSLA). It is important that the test is started with the last command.
[HUAWEI] nqa test-instance netcamp IPSLA
[HUAWEI-nqa-netcamp-IPSLA] test-type icmp
[HUAWEI-nqa-netcamp-IPSLA] destination-address ipv4 192.168.40.1
[HUAWEI-nqa-netcamp-IPSLA] frequency 15
[HUAWEI-nqa-netcamp-IPSLA] probe-count 2
[HUAWEI-nqa-netcamp-IPSLA] start now
You can check whether the test is successful using the display nqa results
command:
In this example, a static host route is created for 8.8.8.8, which should only be present in the routing table until the NQA test fails. To do this, the NQA test is configured with the static route:
[HUAWEI] ip route-static 8.8.8.8 32 NULL 0 track nqa netcamp IPSLA
The route is added to the routing table:
The interface through which the NQA test can reach the IP address 192.168.40.1 will now be shut down. After the configured timeout in the NQA test, the route is removed from the routing table.
The display nqa results
command now also indicates that the NQA test fails:
The IP SLA or NQA is a powerful tool that offers many possibilities. Therefore only a small example was used here to show the simple configuration.