SR66/SR66X系列路由器NQA监测静态路由下一跳不可达时
发送Trap消息的典型配置
一、组网需求:
客户网络中有两台SR6602路由器对接,中间经过二层设备(使用普通二层SW模拟)。SR6602-1上配置静态路由使得其可以访问地址100.0.0.1/32,SR6602-2上配置静态路由使得其可以访问地址200.0.0.1/32。
目前客户欲实现以下功能:在两台SR6602上配置静态路由与NQA联动,使得SW与SR6602-2之间的链路断开时,SR6602-1因为无法监测到10.0.0.2可达而使去往地址100.0.0.1/32的静态路由失效,并向网管服务器发送相关Trap消息。同样,SW与SR6602-1之间的链路断开时,SR6602-2因为无法监测到10.0.0.1可达而使去往地址200.0.0.1/32的静态路由失效,并向网管服务器发送相关Trap消息。
设备及版本:SR6602路由器2台(版本为R2604P10)、普通二层SW 1台。
二、组网图:
三、配置步骤:
SR6602-1 配置
#
sysname SR6602-1
#
interface LoopBack0
ip address 200.0.0.1 255.255.255.255
#
interface GigabitEthernet0/0
ip address 10.0.0.1 255.255.255.0
#
nqa entry h3c 1 //创建NQA测试组,管理员名为h3c,测试操作标签为1
type icmp-echo
destination ip 10.0.0.2
frequency 1000 //测试组连续两次测试开始时间的时间间隔为1000毫秒
probe count 5 //一次NQA测试中进行探测的次数为5
reaction 1 checked-element probe-fail threshold-type consecutive 2 action-type trigger-only //阙值探测次数为2次,达到阙值后触发联动模块
reaction trap test-failure 2 //本次测试中探测失败次数达到2次,则在本次测试完成后发送Trap消息
source ip 10.0.0.1
#
ip route-static 100.0.0.1 255.255.255.255 10.0.0.2 track 1
#
snmp-agent
snmp-agent local-engineid 800063A20300E0FC3A0000
snmp-agent community read public
snmp-agent community write private
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain 192.168.1.2 params securityname h3c
#
track 1 nqa entry h3c 1 reaction 1
#
nqa schedule h3c 1 start-time now lifetime forever
#
SR6602-2 配置
#
sysname SR6602-2
#
interface LoopBack0
ip address 100.0.0.1 255.255.255.255
#
interface GigabitEthernet0/0
ip address 10.0.0.2 255.255.255.0
#
nqa entry h3c 1 //创建NQA测试组,管理员名为h3c,测试操作标签为1
type icmp-echo
destination ip 10.0.0.1
frequency 1000 //测试组连续两次测试开始时间的时间间隔为1000毫秒
probe count 5 //一次NQA测试中进行探测的次数为5
reaction 1 checked-element probe-fail threshold-type consecutive 2 action-type trigger-only //阙值探测次数为2次,达到阙值后触发联动模块
reaction trap test-failure 2 //本次测试中探测失败次数达到2次,则在本次测试完成后发送Trap消息
source ip 10.0.0.2
#
ip route-static 200.0.0.1 255.255.255.255 10.0.0.1 track 1
#
snmp-agent
snmp-agent local-engineid 800063A203000FE2000002
snmp-agent community read public
snmp-agent community write private
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain 192.168.1.2 params securityname h3c
#
track 1 nqa entry h3c 1 reaction 1
#
nqa schedule h3c 1 start-time now lifetime forever
#
四、功能测试:
1、 配置完成后,查看SR6602-1上的NQA 统计:
[SR6602-1]dis nqa statistics
NQA entry (admin h3c, tag 1) test statistics:
NO. : 1
Destination IP address: 10.0.0.2
Start time: 2013-07-21 17:14:40.6
Life time: 3 seconds
Send operation times: 20 Receive response times: 20
Min/Max/Average round trip time: 1/1/1
Square-Sum of round trip time: 60
Extended results:
Packet loss 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
Reaction statistics:
Index Checked Element Threshold Type Checked Num Over-threshold Num
1 probe-fail consecutive 19 0
2、 此时查看SR6602-1的路由表,可以看到去往100.0.0.1/32网段的静态路由:
[SR66-1]dis ip routing-table
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost NextHop Interface
100.0.0.1/32 Static 60 0 10.0.0.2 GE0/0
3、 拔掉SR6602-2和SW的相连的网线后,再次查看去往100.0.0.1/32网段的静态路由,可见静态路由消失了。
4、在SR6602-2和SW未恢复连通的情况下,每隔一段时间可以看到如下Trap信息:
#Jul 21 17:19:20:464 2013 SR66-1 NQA/4/NQA Trap: 1.3.6.1.2.1.80.0.2<pingTestFailed> NQA entry h3c 1 test fail trap information: pingCtlOwnerIndex: h3c, pingCtlTestName: 1, pingCtlTargetAddressType: 1, pingCtlTargetAddress: 10.0.0.2, pingResultsOperStatus: 1, pingResultsIpTargetAddressType: 0, pingResultsIpTargetAddress: , pingResultsMinRtt: 0, pingResultsMaxRtt: 0, pingResultsAverageRtt: 0, pingResultsProbeResponses: 0, pingResultsSentProbes: 5, pingResultsRttSumOfSquares: 0, pingResultsLastGoodProbe: 0.0.0.0.0.0.0.0.0.0.0.
5、SR6602-2和SW恢复连通后,去往100.0.0.1/32网段的静态路由又出现了,且以上Trap信息也无法看到了。
五、配置关键点:
无
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作