组网情况
当前网络如图所示,现要求使用ICMP-echo测试功能测试Switch A发送的报文经过Switch B是否可以到达Switch C,以及报文的往返时间。
配置注意事项
- 进行NQA测试之前,请确保各设备之间路由可达。
- 测试组开始测试后就不能再进入该测试组视图和测试类型视图进行配置修改,测试结束后才可以进入该测试组视图和测试类型视图。
配置步骤
nqa配置
- 创建ICMP-echo类型的NQA测试组并配置测试操作的目的地址
#
system-view
nqa entry admin test # 建立nqa事件组(标记为test线路 名字可按要求设置)
type icmp-echo # 确定检测方式
destination ip 10.3.3.3 # 指定目的地址 (可以是最终的目的地址也可以是下一跳的地址)
- 配置NQA测试报文的下一跳IP地址
next-hop 10.1.1.2
- 配置测试组每次测试之间的时间间隔为5000毫秒,当断线超过5000毫秒开始指定的相关动作 主要指下一步(如果到达frequency指定的时间间隔时,上次测试尚未完成,则不启动新一轮测试)。
frequency 5000
- 配置一次NQA测试中进行探测的次数为10次。
probe count 10
- 配置一个测试组中能够保存的最大历史记录个数为10
history-record enable
history-record number 10
- 设置动作 检测两次后触发条件
reaction 1 checked-element probe-fail threshold-type consecutive 2 action-type trigger-only
- 启动ICMP-echo测试操作
nqa schedule admin test start-time now lifetime forever
配置track 与nqa关联
- 让track1关联nqa admin piaojiaosuo组及检测动作
track 1 nqa entry admin test reaction 1
静态路由绑定track
- 关联完毕 (该条静态路由 关联track1 当该条路由消失或者不通的时候按照track1进行调整)
ip route-static 172.31.72.0 24 10.1.1.2 track 1
验证配置
- 以上配置完成后,显示ICMP-echo测试的结果
SwitchA] display nqa result admin test
NQA entry(admin admin, tag test) test results:
Destination IP address: 10.3.3.3
Send operation times: 10 Receive response times: 10
Min/Max/Average round trip time: 0/16/1
Square-Sum of round trip time: 256
Last succeeded probe time: 2012-08-23 15:00:01.2
Extend results:
Packet lost in test: 0%
Failures due to timeout: 0
Failures due to disconnect: 0
Failures due to no connection: 0
Failures due to sequence error: 0
Failures due to internal error: 0
Failures due to other errors: 0
Packet(s) arrived late: 0
- 显示ICMP-echo测试的历史记录
[SwitchA] display nqa history admin test
NQA entry(admin admin, tag test) history record(s):
Index Response Status Time
370 10 Succeeded 2012-08-23 15:00:01.2
369 10 Succeeded 2012-08-23 15:00:01.2
368 10 Succeeded 2012-08-23 15:00:01.2
367 10 Succeeded 2012-08-23 15:00:01.2
366 4 Succeeded 2012-08-23 15:00:01.2
365 10 Succeeded 2012-08-23 15:00:01.2
364 10 Succeeded 2012-08-23 15:00:01.1
363 10 Succeeded 2012-08-23 15:00:01.1
362 10 Succeeded 2012-08-23 15:00:01.1
361 4 Succeeded 2012-08-23 15:00:01.1
配置文件
#
nqa entry admin test
type icmp-echo
destination ip 10.3.3.3
frequency 5000
history-record enable
history-record number 10
next-hop 10.1.1.2
probe count 10
reaction 1 checked-element probe-fail threshold-type consecutive 2 action-type trigger-only
#
nqa schedule admin test start-time now lifetime forever
#
#
track 1 nqa entry admin test reaction 1
#
#
ip route-static 172.31.72.0 24 10.1.1.2 track 1
#