Dynamic BGP failover on Huawei router using NQA

Same as usual, before going directly to the configuration, iNET9 would like to give some tips about what, why, how, etc. ūüėȬ†

  • BGP (Border Gateway Protocol): is a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems on the Internet. The protocol is classified as a path vector protocol.
  • NQA (Network Quality Analysis): is a feature of Huawei that monitors network performance in real time and helps diagnose faults occurring on the network. Similarly, it’s IP SLA in Cisco world and RPM in Juniper world. Below are the functionalities that NQA supports:
    • DNS test
    • FTP test
    • HTTP test
    • ICMP test
    • ICMP Jitter test
    • SNMP test
    • TCP test
    • Trace test
    • UDP test
    • UDP Jitter test
    • MAC ping test
    • LSP ping test
    • LSP Jitter test
    • LSP trace test
    • Mtrace test
    • PWE3 ping test on a single-hop PW
    • PWE3 ping test on a multi-hop PW
    • PWE3 trace test on a single-hop PW
    • PWE3 trace test on a multi-hop PW
    • RTP Test test
    • RTP Snoop test

Network Connectivity

At some certain points or commercial related, you might have ability to use one pipe at a time only but still in physical redundancy. So, in case one link is down or not available, you might prefer your router to automatically establish/switching routing path without bothering your evening or weekend time.

 

Here how it works,

  • we have to get everything ready including P2P connectivity and both BGP sessions.
  • Configure NQA to track ICMP to IP address of ISP-A (10.1.1.1)
  • Then we configure null0 static route to IP address of ISP-B (10.2.2.1/32) and trace it with NQA.
  • When ICMP to ISP-A is unreachable, NQA will active then it will remove static route. As a result, BGP with ISP-B will be established.

Network Configuration

  1. Get the P2P up

#Assign IP to ISP-A facing interface
#
interface GigabitEthernet0/0/1
 undo portswitch
 description ISP-A_Active
 ip address 10.1.1.2 255.255.255.252
#

#Assign IP to ISP-B facing interface
#
interface GigabitEthernet0/0/2
 undo portswitch
 description ISP-B_Passive
 ip address 10.2.2.2 255.255.255.252
#

  1. Establish the BGP sessions

#
bgp 30
 peer 10.1.1.1 as-number 10
 peer 10.1.1.1 description ISP-A_Active
 peer 10.2.2.1 as-number 20
 peer 10.2.2.1 description ISP-B_Passive
 #
 ipv4-family unicast
  undo synchronization
  peer 10.1.1.1 enable
  peer 10.2.2.1 enable
#

  1. Do the NQA using ICMP

nqa test-instance ISPA ICMP
 test-type icmp
 destination-address ipv4 10.1.1.1
 source-address ipv4 10.1.1.2
 frequency 20
 interval seconds 5
 timeout 4
 probe-count 2
 source-interface GigabitEthernet0/0/1
 start now

#
ip route-static 10.2.2.1 255.255.255.255 NULL0 track nqa ISPA ICMP
#

That’s it! Let us know in the comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *