組網情況
當前網絡如圖所示,現要求使用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
#