H3C的NQA(network quality analyzer)网络质量分析与CISCO的SLA(service-level agreement)服务等级协议相同。主要是用于链路故障诊断,对于双链路或是多链路静态路由环境下,当某条链路出现故障时,下联设备要动态感知,此时需要用到NQA。
举例说明,拓扑环境如下:
简要说明:总部与本单位使用双条MPLS VPN专线,通过专线汇聚透传到核心交换机,本单位均配置静态路由。(不谈论结构的合理性,只说明问题)
问题描述:当MPLS VPN的某条链路故障,核心交换机无感知,还是通过等价静态路由负载到两条链路上。
解决方案:通过配置NQA进行链路监控,当某条链路故障时自动切换。
配置命令:
nqa test-instance root mplsvpn_ce1 监控ce1链路
test-type icmp 使用ICMP协议
destination-address ipv4 100.100.100.37 目的地址为CE1出接口地址或对端PE地址
source-address ipv4 10.10.10.6 源地址为核心与CE1的互联地址
probe-count 2 每次发送2个包
frequency 10 每隔10ms发送一次
start now 现在开始
#
nqa test-instance root mplsvpn_ce2 监控ce2链路,下面雷同
test-type icmp
destination-address ipv4 100.100.100.45
source-address ipv4 10.10.10.2
probe-count 2
frequency 10
start now
ip route-static 172.16.0.0 255.255.0.0 10.10.10.1 track nqa root mplsvpn_ce1 等价路由调用
ip route-static 172.16.0.0 255.255.0.0 10.10.10.5 track nqa root mplsvpn_ce2
可以使用display nqa results查看配置结果,可以看到最近5次的检测结果,以下是某一次的显示结果:
NQA entry(root, mplsvpn_cm): test flag is active, test type is ICMP
1 . Test 111120 result The test is finished
Send operation times: 2 Receive response times: 2
Completion: success RTD over thresholds number: 0
Attempts number: 1 Drop operation number: 0
Disconnect operation number: 0 Operation timeout number: 0
System busy operation number: 0 Connection fail number: 0
Operation sequence errors number: 0 RTT Status errors number: 0
Destination IP address: 100.100.100.37
Min/Max/Average completion time: 27/28/27
Sum/Square-Sum completion time: 55/1513
Last response packet receiving time: 2017-03-15 15:00:57.9
Lost packet ratio: 0 %
对应CISCO的SLA命令如下:
ip sla 100
icmp-echo 100.100.100.37 source-ip 10.10.10.6
timeout 1000
frequency 3
ip sla schedule 100 life forever start-time now
track 1 ip sla 100
ip route 172.16.0.0 255.255.0.0 10.10.10.5 track 1
ip sla 200
icmp-echo 100.100.100.45 source-ip 10.10.10.2
timeout 1000
frequency 3
ip sla schedule 200 life forever start-time now
track 2 ip sla 200
ip route 172.16.0.0 255.255.0.0 10.10.10.1 track 2