Huawei nqa and bfd practical application configuration cases

nqa is a real-time network performance detection and statistics technology, which can collect statistics on network information such as response time, network jitter, and packet loss rate. As shown in Figure 1, the configuration of the interface backup and NQA linkage function is relatively simple. You only need to configure the NQA test instance on the local RouterA, and configure the interface backup and NQA linkage on the backup interface of RouterA to realize the connection to the main link. Real-time detection of status and switching of active and standby links. When NQA detects that the primary link is in good condition, the primary link undertakes service transmission; when NQA detects that the primary link is unreachable or the link quality is poor, it notifies RouterA to activate the backup interface, and the backup link temporarily undertakes service transmission ; When NQA detects that the faulty primary link returns to normal, the service will be switched to the primary link again.
insert image description here
AR1:
[Huawei] dis current-configuration
[V200R003C00]

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0

interface GigabitEthernet0/0/1
ip address 13.1.1.1 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

interface LoopBack0
ip address 1.1.1.1 255.255.255.0

ip route-static 4.4.4.0 255.255.255.0 13.1.1.3 preference 100
ip route-static 4.4.4.0 255.255.255.0 GigabitEthernet0/0/0 12.1.1.2 track nqa ad
min icmp
ip route-static 24.1.1.0 255.255.255.0 12.1.1.2
ip route-static 34.1.1.0 255.255.255.0 13.1.1.2

nqa test-instance admin icmp //Configure the NQA test instance named admin icmp (the name of admin is the administrator meaning, the following icmp is custom) test-type
icmp //Configure the test instance type as ICMP
destination-address ipv4 192.168.3.1 //Configure the destination address of the NQA test instance to 192.168.3.1
frequency 10 //Configure the interval between two tests of the NQA test instance to be 10 seconds
probe-count 2 //Configure the number of test probes for the NQA test instance to 2
start now //Start executing the current NQA test case immediately

return

AR2:
dis cu
dis current-configuration
[V200R003C00]

interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0

interface GigabitEthernet0/0/1
ip address 24.1.1.2 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

ip route-static 1.1.1.0 255.255.255.0 12.1.1.1
ip route-static 4.4.4.0 255.255.255.0 24.1.1.4

return

AR3:

interface GigabitEthernet0/0/0
ip address 13.1.1.3 255.255.255.0

interface GigabitEthernet0/0/1
ip address 34.1.1.3 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

ip route-static 1.1.1.0 255.255.255.0 13.1.1.1
ip route-static 4.4.4.0 255.255.255.0 34.1.1.4

user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20

wool and

return

AR4:

interface GigabitEthernet0/0/0
ip address 24.1.1.4 255.255.255.0

interface GigabitEthernet0/0/1
ip address 34.1.1.4 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

interface LoopBack0
ip address 4.4.4.4 255.255.255.0

ip route-static 1.1.1.0 255.255.255.0 24.1.1.2
ip route-static 1.1.1.0 255.255.255.0 34.1.1.3
ip route-static 12.1.1.0 255.255.255.0 24.1.1.2
ip route-static 13.1.1.0 255.255.255.0 34.1.1.3

return

Run the display nqa results test-instance admin icmp command on RouterA to view the NQA test results. You can see "Lost packet ratio: 0 %", which indicates that the link is in good condition. Then execute the command display ip routing-table to view the routing table, you can see that the destination network segment 4.4.4.0/24, the next static route 12.1.1.2 exists in the routing table, and the configured static route with priority 100 Does not exist in the routing table.

Run the shutdown command in the interface view of any of the two interfaces on RouterB to simulate a link failure. Then run the display nqa results test-instance admin icmp command on RouterA to view the NQA test results. You can see "Completion: failed" and "Lost packet ratio: 100 %", which means that a link failure is detected. Then run the display ip routing-table command to view the routing table. You can see that the static route to the destination network segment 4.4.4.0/24 and the next static route 13.1.1.3 is replaced by the static route with priority 100 in the routing table.


The principle of BFD packet sending: There are direct connection single-hop establishment and cross-hop establishment.
Direct connection single-hop establishment cannot cross Layer 3 devices. When the configuration parameter has interface, it is a direct single-hop establishment, because single-hop can only transmit packets within the broadcast domain.
Created across multiple devices, the interface keyword cannot be added during configuration, and peer-ip is established

Single-hop case:
bfd ar2 bind peer-ip 1.1.1.1 interface g0/0/0
bfd ar1 bind peer-ip 2.2.2.2. interface g0/0/0

There are two types of BFD conference establishment. One is static
establishment, which requires manual configuration of parameters and identifiers . 0 source-ip 1.1.1.1 auto peer: bfd ar1 bind peer-ip 1.1.1.1 interface g0/0/0 source-ip 3.3.3.3 auto




BFD one-arm echo (it can replace nqa on the exit line to detect whether the peer isp outside line ip is disconnected) (this mode is single-hop mode): one-arm echo
configuration:
bfd isp bind peer-ip 1.1.1.1 interface g0/0 /0 one-arm-echo
descriminator local 1
detect-multiplier 4 //Down if not received within 8 seconds
min-echo-rx-interval 2000 //Message sending interval

Guess you like

Origin blog.csdn.net/ydaxia110/article/details/130583112
bfd