所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

S7700, S7900, S9700 V200R011C10 配置指南-可靠性

本文档针对设备可靠性业务,主要包括BFD配置、DLDP配置、VRRP配置、Smart Link和Monitor Link配置、EFM配置、CFM配置、Y.1731配置和MAC Swap配置。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置VRRP与NQA联动监视上行链路示例

配置VRRP与NQA联动监视上行链路示例

组网需求

图3-19所示,局域网内的主机通过Switch双归属到部署了VRRP备份组的SwitchA和SwitchB,其中SwitchA为Master。正常情况下,SwitchA承担网关工作,用户侧流量由Switch → SwitchA → SwitchC → SwitchE进行转发。

用户希望当SwitchC到SwitchE之间的链路故障时,VRRP备份组可以感知故障,进行主备切换,启用SwitchB承担业务转发,以减小链路故障对业务转发的影响。

说明:

请确保该场景下互联接口的STP处于未使能状态。同时将互连接口退出VLAN1,避免形成环路。因为在使能STP的环形网络中,如果用交换机的VLANIF接口构建三层网络,会导致某个端口被阻塞,从而导致三层业务不能正常运行。

图3-19  配置VRRP与NQA联动监视上行链路组网图

设备

接口

对应的Vlanif

IP地址

SwitchA

GE1/0/1

VLANIF100

10.1.1.1/24

GE1/0/2

VLANIF300

192.168.1.1/24

SwitchB

GE1/0/1

VLANIF100

10.1.1.2/24

GE1/0/2

VLANIF200

192.168.2.1/24

SwitchC

GE1/0/1

VLANIF300

192.168.1.2/24

GE1/0/2

VLANIF500

172.16.1.1/24

SwitchD

GE1/0/1

VLANIF200

192.168.2.2/24

GE1/0/2

VLANIF400

172.16.2.1/24

SwitchE

GE1/0/1

VLANIF500

172.16.1.2/24

GE1/0/2

VLANIF400

172.16.2.2/24

配置思路

配置思路如下:

  1. 配置各设备接口IP地址及路由协议,使网络层路由可达。
  2. SwitchA和SwitchB上配置VRRP备份组,其中SwitchA的优先级为120,抢占延时为20秒,作为Master设备;SwitchB的优先级为缺省值,作为Backup设备,实现网关的主备备份。
  3. SwitchA上配置ICMP类型的NQA测试例,配置目的地址为SwitchE上接口GE1/0/1的IP地址,监测SwitchA到SwitchE的接口GE1/0/1间链路的连通性。
  4. SwitchA上配置VRRP和NQA联动,当NQA检测到链路故障时,触发VRRP备份组进行主备切换。

操作步骤

  1. 配置设备间的网络互连

    # 配置设备各接口的IP地址,以SwitchA为例,SwitchB、SwitchC、SwitchD和SwitchE的配置与SwitchA类似,详见配置文件。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 100 300
    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type trunk
    [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 100
    [SwitchA-GigabitEthernet1/0/1] port trunk pvid vlan 100
    [SwitchA-GigabitEthernet1/0/1] undo port trunk allow-pass vlan 1
    [SwitchA-GigabitEthernet1/0/1] quit
    [SwitchA] interface gigabitethernet 1/0/2
    [SwitchA-GigabitEthernet1/0/2] port link-type trunk
    [SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 300
    [SwitchA-GigabitEthernet1/0/2] quit
    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] ip address 10.1.1.1 24
    [SwitchA-Vlanif100] quit
    [SwitchA] interface vlanif 300
    [SwitchA-Vlanif300] ip address 192.168.1.1 24
    [SwitchA-Vlanif300] quit
    

    # 配置Switch的二层转发功能。

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan 100
    [Switch-vlan100] quit
    [Switch] interface gigabitethernet 1/0/0
    [Switch-GigabitEthernet1/0/0] port link-type trunk
    [Switch-GigabitEthernet1/0/0] port trunk allow-pass vlan 100
    [Switch-GigabitEthernet1/0/0] port trunk pvid vlan 100
    [Switch-GigabitEthernet1/0/0] undo port trunk allow-pass vlan 1
    [Switch-GigabitEthernet1/0/0] quit
    [Switch] interface gigabitethernet 2/0/0
    [Switch-GigabitEthernet2/0/0] port link-type trunk
    [Switch-GigabitEthernet2/0/0] port trunk allow-pass vlan 100
    [Switch-GigabitEthernet2/0/0] port trunk pvid vlan 100
    [Switch-GigabitEthernet2/0/0] undo port trunk allow-pass vlan 1
    [Switch-GigabitEthernet2/0/0] quit

    # 配置各设备间采用OSPF协议进行互连。以SwitchA为例,SwitchB、SwitchC、SwitchD和SwitchE的配置与SwitchA类似,详见配置文件。

    [SwitchA] ospf 1
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] quit
    [SwitchA-ospf-1] quit

  2. 配置VRRP备份组

    # 在SwitchA上创建VRRP备份组1,配置SwitchA在该备份组中的优先级为120,并配置抢占时间为20秒。

    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [SwitchA-Vlanif100] vrrp vrid 1 priority 120
    [SwitchA-Vlanif100] vrrp vrid 1 preempt-mode timer delay 20
    [SwitchA-Vlanif100] quit

    # 在SwitchB上创建VRRP备份组1,其在该备份组中的优先级为缺省值100。

    [SwitchB] interface vlanif 100
    [SwitchB-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.10
    [SwitchB-Vlanif100] quit

  3. 配置NQA测试例

    # 在SwitchA上配置目的IP地址为172.16.1.2/24的ICMP类型的NQA测试例。

    [SwitchA] nqa test-instance user test
    [SwitchA-nqa-user-test] test-type icmp
    [SwitchA-nqa-user-test] destination-address ipv4 172.16.1.2
    [SwitchA-nqa-user-test] frequency 15
    [SwitchA-nqa-user-test] start now
    [SwitchA-nqa-user-test] quit

    # 在SwitchA上执行命令display nqa results test-instance user test,可以看到NQA测试实例的状态为success。

    [SwitchA] display nqa results test-instance user test
    NQA entry(user, test) :testflag is active ,testtype is icmp
     1 . Test 1 result   The test is finished                                     
       Send operation times: 3                Receive response times: 2             
       Completion:success                   RTD OverThresholds number: 0         
       Attempts number:1                    Drop operation number:0              
       Disconnect operation number:0        Operation timeout number:1           
       System busy operation number:0       Connection fail number:0             
       Operation sequence errors number:0   RTT Status errors number:0            
       Destination ip address:172.16.1.2                                           
       Min/Max/Average Completion Time: 6/6/6                                       
       Sum/Square-Sum  Completion Time: 12/72                                         
       Last Good Probe Time: 2012-05-22 17:32:56.1             
       Lost packet ratio: 33 % 

  4. 配置VRRP与NQA联动

    # 在SwitchA上配置VRRP与NQA联动,当NQA测试例failed时,SwitchA的优先级降低40。

    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] vrrp vrid 1 track nqa user test reduced 40
    [SwitchA-Vlanif100] quit

  5. 验证配置结果

    # 完成上述配置后,在SwitchA和SwitchB上分别执行display vrrp命令,可以看出SwitchA为Master设备,联动的NQA状态为success,SwitchB为Backup设备。

    [SwitchA] display vrrp
      Vlanif100 | Virtual Router 1
        State          : Master
        Virtual IP       : 10.1.1.10
        Master IP        : 10.1.1.1
        PriorityRun      : 120
        PriorityConfig   : 120
        MasterPriority   : 120
        Preempt          : YES   Delay Time : 20 s 
        TimerRun         : 1 s 
        TimerConfig      : 1 s
        Auth type        : NONE
        Virtual MAC      : 0000-5e00-0101
        Check TTL        : YES
        Config type      : normal-vrrp
        Backup-forward   : disabled
        Track NQA : user  test   Priority reduced : 40
        NQA state : success
        Create time      : 2012-05-22 17:32:56
        Last change time : 2012-05-22 17:33:00
    [SwitchB] display vrrp
      Vlanif100 | Virtual Router 1
        State          : Backup
        Virtual IP       : 10.1.1.10
        Master IP        : 10.1.1.1
        PriorityRun      : 100
        PriorityConfig   : 100
        MasterPriority   : 120
        Preempt          : YES   Delay Time : 0 s 
        TimerRun         : 1 s 
        TimerConfig      : 1 s
        Auth type        : NONE
        Virtual MAC      : 0000-5e00-0101
        Check TTL        : YES
        Config type      : normal-vrrp
        Backup-forward   : disabled
        Create time      : 2012-05-22 17:33:00
        Last change time : 2012-05-22 17:33:04

    # 在SwitchE的接口GE1/0/1上执行shutdown命令,模拟链路故障。

    [SwitchE] interface gigabitethernet 1/0/1
    [SwitchE-GigabitEthernet1/0/1] shutdown
    [SwitchE-GigabitEthernet1/0/1] quit

    # 分别在SwitchA和SwitchB上执行display vrrp命令,可以看到SwitchA的状态切换为Backup,联动的NQA测试例状态为failed,SwitchB的状态切换为Master。

    [SwitchA] display vrrp
      Vlanif100 | Virtual Router 1
        State          : Backup
        Virtual IP       : 10.1.1.10
        Master IP        : 10.1.1.2
        PriorityRun      : 80
        PriorityConfig   : 120
        MasterPriority   : 100
        Preempt          : YES   Delay Time : 20 s 
        TimerRun         : 1 s 
        TimerConfig      : 1 s
        Auth type        : NONE
        Virtual MAC      : 0000-5e00-0101
        Check TTL        : YES
        Config type      : normal-vrrp
        Backup-forward   : disabled
        Track NQA : user  test   Priority reduced : 40
        NQA state : failed
        Create time      : 2012-05-22 17:34:56
        Last change time : 2012-05-22 17:35:00
    [SwitchB] display vrrp
      Vlanif100 | Virtual Router 1
        State          : Master
        Virtual IP       : 10.1.1.10
        Master IP        : 10.1.1.2
        PriorityRun      : 100
        PriorityConfig   : 100
        MasterPriority   : 100
        Preempt          : YES   Delay Time : 0 s 
        TimerRun         : 1 s 
        TimerConfig      : 1 s
        Auth type        : NONE
        Virtual MAC      : 0000-5e00-0101
        Check TTL        : YES
        Config type      : normal-vrrp
        Backup-forward   : disabled
        Create time      : 2012-05-22 17:35:00
        Last change time : 2012-05-22 17:35:04

    # 在SwitchE的接口GE1/0/1上执行undo shutdown命令,恢复链路故障。

    [SwitchE] interface gigabitethernet 1/0/1
    [SwitchE-GigabitEthernet1/0/1] undo shutdown
    [SwitchE-GigabitEthernet1/0/1] quit

    # 等待20秒后,分别在SwitchA和SwitchB上执行display vrrp命令,可以看到SwitchA的状态恢复为Master,联动的NQA测试例状态恢复为success,SwitchB的状态恢复为Backup。

    [SwitchA] display vrrp
      Vlanif100 | Virtual Router 1
        State          : Master
        Virtual IP       : 10.1.1.10
        Master IP        : 10.1.1.1
        PriorityRun      : 120
        PriorityConfig   : 120
        MasterPriority   : 120
        Preempt          : YES   Delay Time : 20 s 
        TimerRun         : 1 s 
        TimerConfig      : 1 s
        Auth type        : NONE
        Virtual MAC      :  0000-5e00-0101
        Check TTL        : YES
        Config type      : normal-vrrp
        Backup-forward   : disabled
        Track NQA : user  test   Priority reduced : 40
        NQA state : success
        Create time      : 2012-05-22 17:36:56
        Last change time : 2012-05-22 17:37:00
    [SwitchB] display vrrp
      Vlanif100 | Virtual Router 1
        State          : Backup
        Virtual IP       : 10.1.1.10
        Master IP        : 10.1.1.1
        PriorityRun      : 100
        PriorityConfig   : 100
        MasterPriority   : 120
        Preempt          : YES   Delay Time : 0 s 
        TimerRun         : 1 s 
        TimerConfig      : 1 s
        Auth type        : NONE
        Virtual MAC      :  0000-5e00-0101
        Check TTL        : YES
        Config type      : normal-vrrp
        Backup-forward   : disabled
        Create time      : 2012-05-22 17:37:00
        Last change time : 2012-05-22 17:37:04

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    interface Vlanif100
     ip address 10.1.1.1 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.10
     vrrp vrid 1 priority 120
     vrrp vrid 1 preempt-mode timer delay 20
     vrrp vrid 1 track nqa user test reduced 40
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    nqa test-instance user test
     test-type icmp
     destination-address ipv4 172.16.1.2
     frequency 15
     start now
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    vlan batch 100 200
    #
    interface Vlanif100
     ip address 10.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 10.1.1.10
    #
    interface Vlanif200
     ip address 192.168.2.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 300 500
    #
    interface Vlanif300
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif500
     ip address 172.16.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    ospf 1
     area 0.0.0.0
      network 172.16.1.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    return
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    vlan batch 200 400
    #
    interface Vlanif200
     ip address 192.168.2.2 255.255.255.0
    #
    interface Vlanif400
     ip address 172.16.2.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 200
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 172.16.2.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • SwitchE的配置文件

    #
    sysname SwitchE 
    #
    vlan batch 400 500
    #
    interface Vlanif400
     ip address 172.16.2.2 255.255.255.0
    #
    interface Vlanif500
     ip address 172.16.1.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 500
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 400
    #
    ospf 1
     area 0.0.0.0
      network 172.16.1.0 0.0.0.255
      network 172.16.2.0 0.0.0.255
    #
    return
  • Switch的配置文件

    #
    sysname Switch 
    #
    vlan batch 100
    #
    interface GigabitEthernet1/0/0
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet2/0/0
     port link-type trunk
     port trunk pvid vlan 100
     undo port trunk allow-pass vlan 1
     port trunk allow-pass vlan 100
    #
    return
翻译
下载文档
更新时间:2019-04-17

文档编号:EDOC1000178275

浏览量:30624

下载量:318

平均得分:
本文档适用于这些产品
相关文档
相关版本
分享
上一页 下一页