华三交换机S5560 NQA测试


NQA配置介绍

  • NQA配置
nqa entry admin test
 type icmp-echo    //配置NQA类型
  destination ip 10.1.0.1  //配置探测的目的IP
  source ip 10.1.0.2      //配置探测的源IP
  frequency 6000     //配置两次NQA探测的时间间隔
  history-record enable  //历史探测记录
  history-record number 10  //历史探测记录10条
  probe count 3  //一次探测发送ICMP包个数
  probe timeout 2000  //探测超时时间
  //配置联动项3,连续探测3次失败,会联动协议进行切换
  reaction 3 checked-element probe-fail threshold-type consecutive 3 action-type trigger-only
# 配置track项1,关联NQA测试组(admin为管理员,test为为标签)的联动项3
track 1 nqa entry admin test reaction 3
# 激活NQA
nqa schedule admin test start-time now lifetime forever
  • 如果要修改NQA的参数,需要先停止NQA
  • 静态路由调用track
 ip route-static 1.1.1.1 32 10.1.0.1 track 1
 ip route-static 1.1.1.1 32 10.1.0.1 preference 100
  • 查看NQA状态
[H3C]dis track all 
Track ID: 1
  State: Positive
  Duration: 0 days 0 hours 1 minutes 38 seconds
  Notification delay: Positive 0, Negative 0 (in seconds)
  Tracked object:
    NQA entry: admin test
    Reaction: 3
    Remote IP/URL: 10.1.0.1                                               
    Local IP: 10.1.0.2                                               
    Interface: --
[H3C]
  • 如果状态为NotReady,NQA则不生效,有可能是再配置NQA是,探测类型配置为了trap-only修改为trigger-only即可
    • trap-only:达到探测失败条件之后发trap
    • trigger-only:达到失败条件后给其他协议发一个信号,达到联动
  • 在中间互联的接口down或这探测报文无法通过时,6s后就会进行切换,保证路由从备路由走

实验说明

  • SW1与SW2三层互联,主链路中间串联二层防火墙,备链路直接互通
  • 配置如下
# SW1
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
interface Ten-GigabitEthernet1/0/49
 port link-mode route
 ip address 10.1.0.1 255.255.255.252
interface Ten-GigabitEthernet1/0/50
 port link-mode route
 ip address 10.1.0.5 255.255.255.252
# SW2
interface Ten-GigabitEthernet1/0/49
 port link-mode route
 ip address 10.1.0.2 255.255.255.252
interface Ten-GigabitEthernet1/0/50
 port link-mode route
 ip address 10.1.0.6 255.255.255.252
nqa entry admin test
 type icmp-echo
  destination ip 10.1.0.1
  source ip 10.1.0.2
  frequency 6000
  history-record enable
  history-record number 10
  probe count 3
  probe timeout 2000
  reaction 3 checked-element probe-fail threshold-type consecutive 3 action-type trigger-only
#
track 1 nqa entry admin test reaction 3
#
nqa schedule admin test start-time now lifetime forever
#
ip route-static 1.1.1.1 32 10.1.0.1 track 1
ip route-static 1.1.1.1 32 10.1.0.1 preference 100
  • 防火墙可以用二层交换机代替,可以通过断开中间设备与SW1互联的接口判断NQA是否生效
  • 也可以在中间设备上配置ACL,禁止NQA的探测报文,再查看NQA是否切换
  • 配置如下
acl advanced 3000
 rule 5 deny icmp source 10.1.0.2 0 destination 10.1.0.1
interface Ten-GigabitEthernet 1/0/49
 packet-filter 3000 outbound 
  • 已经完成切换,从备出口(XGE1/0/50)发出
[H3C]dis track all 
Track ID: 1
  State: Positive
  Duration: 0 days 0 hours 1 minutes 38 seconds
  Notification delay: Positive 0, Negative 0 (in seconds)
  Tracked object:
    NQA entry: admin test
    Reaction: 3
    Remote IP/URL: 10.1.0.1                                               
    Local IP: 10.1.0.2                                               
    Interface: --
[H3C]dis ip routing-table 

Destinations : 17	Routes : 17

Destination/Mask   Proto   Pre Cost        NextHop         Interface
0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
1.1.1.1/32         Static  60  0           10.1.0.1        XGE1/0/49
127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
127.0.0.0/32       Direct  0   0           127.0.0.1       InLoop0
127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
10.1.0.0/30        Direct  0   0           10.1.0.2        XGE1/0/49
10.1.0.0/32        Direct  0   0           10.1.0.2        XGE1/0/49
10.1.0.2/32        Direct  0   0           127.0.0.1       InLoop0
10.1.0.3/32        Direct  0   0           10.1.0.2        XGE1/0/49
224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
[H3C]%Jan  1 08:56:49:182 2013 H3C PING/6/PING_STATISTICS: Ping statistics for 10.1.0.1: 4 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.
[H3C]dis track all
Track ID: 1
  State: Negative
  Duration: 0 days 0 hours 0 minutes 19 seconds
  Notification delay: Positive 0, Negative 0 (in seconds)
  Tracked object:
    NQA entry: admin test
    Reaction: 3
    Remote IP/URL: 10.1.0.1                                               
    Local IP: 10.1.0.2                                               
    Interface: --
[H3C]dis ip routing-table 

Destinations : 17	Routes : 17

Destination/Mask   Proto   Pre Cost        NextHop         Interface
0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
1.1.1.1/32         Static  100 0           172.31.16.229   XGE1/0/50
127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
127.0.0.0/32       Direct  0   0           127.0.0.1       InLoop0
127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
10.1.0.0/30        Direct  0   0           10.1.0.2        XGE1/0/49
10.1.0.0/32        Direct  0   0           10.1.0.2        XGE1/0/49
10.1.0.2/32        Direct  0   0           127.0.0.1       InLoop0
10.1.0.3/32        Direct  0   0           10.1.0.2        XGE1/0/49
172.31.16.228/30   Direct  0   0           172.31.16.230   XGE1/0/50
172.31.16.228/32   Direct  0   0           172.31.16.230   XGE1/0/50
172.31.16.230/32   Direct  0   0           127.0.0.1       InLoop0
172.31.16.231/32   Direct  0   0           172.31.16.230   XGE1/0/50
224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
[H3C]

以上内容均属原创,如有不详或错误,敬请指出。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坏坏-5

谢谢支持!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值