当前位置: 首页 > news >正文

华三交换机S5560 NQA测试

文章目录

  • 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]

以上内容均属原创,如有不详或错误,敬请指出。

相关文章:

  • vscode如何使用鼠标滚轮调整字体大小
  • 3D Web轻量化引擎HOOPS Communicator如何赋能航空航天制造?
  • 图神经网络实战(24)——基于LightGCN构建推荐系统
  • PostgreSQL 支持字段类型
  • Windows 11【1001问】Windows 11系统硬件配置要求
  • 特辣的海藻!3
  • C# winfrom 修改系统快捷键 提高效率 把难按的快捷 换成容易按的快捷键 减轻工作难度
  • 【初探数据结构】时间复杂度和空间复杂度
  • 3. Spring Cloud LoadBalancer 入门与使用
  • 快速上手 Unstructured:安装、Docker部署及PDF文档解析示例
  • vue3响应式数据原理
  • 面向机器人操作的协同、泛化和高效的双-系统
  • GoFly框架中集成Bolt 和badfer两个Go语言嵌入式键值数据库
  • uniapp在app下使用mqtt协议!!!支持vue3
  • DeepSeek技术:数字化时代的商业规则重塑者
  • 19、《Springboot+MongoDB整合:玩转文档型数据库》
  • llama.cpp 一键运行本地大模型 - Windows
  • esp工程报错:something went wrong when trying to build the project esp-idf 一种解决办法
  • [AI相关]问问DeepSeek如何基于Python,moviePy实现视频字幕功能
  • 【量化策略】动量反转策略
  • 美国贸易政策|特朗普模式:你想做交易吗?
  • 消息人士称俄方反对美国代表参加俄乌直接会谈
  • 马上评|训斥打骂女儿致死,无暴力应是“管教”底线
  • 网易有道一季度净利润同比增长247%:有能力在今年实现更强劲的利润增长
  • 既是工具又是食物,可食用机器人开启舌尖上的新科技
  • 乌克兰谈判代表团由12人组成,乌防长率领