interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 12.1.1.1 255.255.255.252
#
interface GigabitEthernet0/1
port link-mode route
combo enable copper
ip address 12.1.1.5 255.255.255.252
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 12.1.1.2 255.255.255.252
#
interface GigabitEthernet0/1
port link-mode route
combo enable copper
ip address 12.1.1.6 255.255.255.252
#
interface GigabitEthernet0/2
port link-mode route
combo enable copper
ip address 24.1.1.1 255.255.255.0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.0
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 24.1.1.2 255.255.255.0
#
nqa schedule admin nqa1 start-time now lifetime forever
nqa entry admin nqa1
type icmp-echo
destination ip 12.1.1.1 //主线目标网关
frequency 5000 //每5秒检测一次
history-record enable
history-record number 10 //每次10个探测包
probe count 10
reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only
source interface GigabitEthernet0/0
nqa schedule admin nqa1 start-time now lifetime forever //启动nqa测试实例
track 1 nqa entry admin nqa1 reaction 1 //配置track项,将NQA测试结果与Track项关联起来,以便在链路故障时能够通知路由模块
#
ip route-static 3.3.3.3 32 12.1.1.2 track 1 description admin nqa1
ip route-static 3.3.3.3 32 12.1.1.6 preference 80
#
#
ip route-static 0.0.0.0 0 24.1.1.2
ip route-static 1.1.1.1 32 12.1.1.1 track 1 description admin nqa1
ip route-static 1.1.1.1 32 12.1.1.5 preference 80
#
#
ip route-static 1.1.1.1 32 24.1.1.1
#
查看NQA测试实例
五、实验验证:
1、查看NQA测试实例,测试成功。
####dis nqa history####
2、在R1使用1.1.1.1 ping R3的3.3.3.3,测试连通性
3、在R1上查看主线正常情况下的路由表
4、进行主线中断测试,在R2上shutdown主线接口测试
5、查看主线中断后路由表项
推荐站内搜索:最好用的开发软件、免费开源系统、渗透测试工具云盘下载、最新渗透测试资料、最新黑客工具下载……
还没有评论,来说两句吧...