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

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

提示

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

升级

S7700, S9700 V200R010C00 配置指南-可靠性

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

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

组网需求

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

用户希望当SwitchC到SwitchE之间路由撤销或者状态变为非激活时,VRRP备份组能感知并进行主备切换。启用SwitchB承担业务转发,以减小链路故障对业务转发的影响。

说明:

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

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

设备

接口

对应的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上配置较高优先级和20秒抢占延时,作为Master设备承担流量转发;SwitchB上配置较低优先级,作为备用交换机,实现冗余备份。
  3. SwitchA上配置VRRP与路由联动功能,实现所监控路由撤销或状态变为非激活时,触发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
    

  2. 配置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

  3. 配置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

  4. 配置IS-IS路由协议。以SwitchA、SwitchC和SwitchE为例,SwitchB和SwitchD的配置与SwitchA类似,详见配置文件。

    # 配置SwitchA上IS-IS实体名称为10.0000.0000.0001.00,级别为1。

    [SwitchA] isis 1
    [SwitchA-isis-1] is-level level-1 
    [SwitchA-isis-1] network-entity 10.0000.0000.0001.00
    [SwitchA-isis-1] quit
    [SwitchA] interface vlanif 300
    [SwitchA-Vlanif300] isis enable 1
    [SwitchA-Vlanif300] quit
    

    # 配置SwitchC上IS-IS实体名称为10.0000.0000.0002.00,级别为1。

    [SwitchC] isis 1
    [SwitchC-isis-1] is-level level-1 
    [SwitchC-isis-1] network-entity 10.0000.0000.0002.00
    [SwitchC-isis-1] quit
    [SwitchC] interface vlanif 300
    [SwitchC-Vlanif300] isis enable 1
    [SwitchC-Vlanif300] quit
    [SwitchC] interface vlanif 500
    [SwitchC-Vlanif500] isis enable 1
    [SwitchC-Vlanif500] quit
    

    # 配置SwitchE上IS-IS实体名称为10.0000.0000.0003.00和20.0000.0000.0003.00,级别为1。

    [SwitchE] isis 1
    [SwitchE-isis-1] is-level level-1 
    [SwitchE-isis-1] network-entity 10.0000.0000.0003.00
    [SwitchE-isis-1] quit
    [SwitchE] interface vlanif 500
    [SwitchE-Vlanif500] isis enable 1
    [SwitchE-Vlanif500] quit
    [SwitchE] isis 2
    [SwitchE-isis-2] is-level level-1 
    [SwitchE-isis-2] network-entity 20.0000.0000.0003.00
    [SwitchE-isis-2] quit
    [SwitchE] interface vlanif 400
    [SwitchE-Vlanif400] isis enable 2
    [SwitchE-Vlanif400] quit
    

  5. SwitchA上配置VRRP与路由联动功能,当联动的路由撤销时,SwitchA的优先级降低40。

    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] vrrp vrid 1 track ip route 172.16.1.0 24 reduced 40
    [SwitchA-Vlanif100] quit

  6. 验证配置结果

    # 完成上述配置后,在SwitchA上执行display isis route命令,可以看到存在一条去往172.16.1.0/24网段的路由。

    [SwitchA] display isis route
                                                                                    
                             Route information for ISIS(1)                          
                             -----------------------------                          
                                                                                    
                            ISIS(1) Level-1 Forwarding Table                        
                            --------------------------------                        
                                                                                    
    IPV4 Destination     IntCost    ExtCost ExitInterface   NextHop         Flags   
    ------------------------------------------------------------------------------- 
    192.168.1.0/24       10         NULL    Vlanif300       Direct          D/-/L/- 
    172.16.1.0/24        20         NULL    Vlanif300       192.168.1.2     A/-/-/- 
         Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,     
                                   U-Up/Down Bit Set                                

    # 分别在SwitchA和SwitchB上执行display vrrp命令,可以看到SwitchA的状态为Master,联动的路由状态为Reachable,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 IP route : 172.16.1.0/24  Priority reduced : 40                         
        IP route state : Reachable                                                  
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:25:51      
    [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-29 21:25:47                                           
        Last change time : 2012-05-29 21:25:51      

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

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

    # 在SwitchA上执行display isis route命令,可以看到去往172.16.1.0/24网段的路由被撤销了。

    [SwitchA] display isis route
                                                                                    
                             Route information for ISIS(1)                          
                             -----------------------------                          
                                                                                    
                            ISIS(1) Level-1 Forwarding Table                        
                            --------------------------------                        
                                                                                    
    IPV4 Destination     IntCost    ExtCost ExitInterface   NextHop         Flags   
    ------------------------------------------------------------------------------- 
    192.168.1.0/24       10         NULL    Vlanif300       Direct          D/-/L/- 
         Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,     
                                   U-Up/Down Bit Set                                

    # 分别在SwitchA和SwitchB上执行display vrrp命令,可以看到SwitchA的状态切换为Backup,联动的路由状态为Unreachable,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 IP route : 172.16.1.0/24  Priority reduced : 40                         
        IP route state : Unreachable                                                  
        Create time : 2012-05-29 21:25:47                                           
        Last change time : 2012-05-29 21:25:51      
    [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-29 21:25:47                                           
        Last change time : 2012-05-29 21:25:51      

    # 在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,联动的路由状态恢复为Reachable,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 IP route : 172.16.1.0/24  Priority reduced : 40                         
        IP route state : Reachable                                                  
        Create time : 2012-05-29 21:27:47                                           
        Last change time : 2012-05-29 21:27:51      
    [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-29 21:27:47                                           
        Last change time : 2012-05-29 21:27:51      

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    isis 1
     is-level level-1
     network-entity 10.0000.0000.0001.00
    #
    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 ip route 172.16.1.0 255.255.255.0 reduced 40
    #
    interface Vlanif300
     ip address 192.168.1.1 255.255.255.0
     isis enable 1
    #
    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
    #
    return
    
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    vlan batch 100 200
    #
    isis 2
     is-level level-1
     network-entity 20.0000.0000.0001.00
    #
    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
     isis enable 2
    #
    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
    #
    return
    
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 300 500
    #
    isis 1
     is-level level-1
     network-entity 10.0000.0000.0002.00
    #
    interface Vlanif300
     ip address 192.168.1.2 255.255.255.0
     isis enable 1
    #
    interface Vlanif500
     ip address 172.16.1.1 255.255.255.0
     isis enable 1
    #
    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
    #
    return 
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    vlan batch 200 400
    #
    isis 2
     is-level level-1
     network-entity 20.0000.0000.0002.00
    #
    interface Vlanif200
     ip address 192.168.2.2 255.255.255.0
     isis enable 2
    #
    interface Vlanif400
     ip address 172.16.2.1 255.255.255.0
     isis enable 2
    #
    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
    #
    return 
  • SwitchE的配置文件

    #
    sysname SwitchE
    #
    vlan batch 400 500
    #
    isis 1
     is-level level-1
     network-entity 10.0000.0000.0003.00
    #
    isis 2
     is-level level-1
     network-entity 20.0000.0000.0003.00
    #
    interface Vlanif400
     ip address 172.16.2.2 255.255.255.0
     isis enable 2
    #
    interface Vlanif500
     ip address 172.16.1.2 255.255.255.0
     isis enable 1
    #
    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
    #
    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-18

文档编号:EDOC1000141468

浏览量:8940

下载量:784

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