• H3C VRRP结合mstp的典型配置


    拓扑

     

    配置步骤

    第一步:配置vlantrunk

    SW3

    #

     sysname SW3

    #

    vlan 10 

     description pc4 //PC4网段

    #

    vlan 20

     description pc6 //PC6网段

    #             

    interface GigabitEthernet1/0/19 //配置trunk链路放通业务vlan 

     port link-mode bridge

     port link-type trunk

     undo port trunk permit vlan 1

     port trunk permit vlan 10 20

    #

    interface GigabitEthernet1/0/9 //配置trunk链路放通业务vlan

     port link-mode bridge

     port link-type trunk

     undo port trunk permit vlan 1

     port trunk permit vlan 10 20

    #

    interface GigabitEthernet1/0/1 //配置acces接口,放通业务vlan

     port link-mode bridge

     port access vlan 10

    #

    interface GigabitEthernet1/0/2 //配置acces接口,放通业务vlan

     port link-mode bridge

     port access vlan 20

    #

     

    SW1:

    #

     sysname SW1

    #

    vlan 10

    #

    vlan 11

    #             

    vlan 20       

    #                                 

    interface GigabitEthernet1/0/1 //在接口上应用vlan虚接口,关闭stp功能

     port link-mode bridge

     port access vlan 11

     combo enable fiber

     undo stp enable

    interface GigabitEthernet1/0/19 / //配置trunk链路放通业务vlan

     port link-mode bridge

     port link-type trunk

     undo port trunk permit vlan 1

     port trunk permit vlan 10 20 

     combo enable fiber

    #

    interface GigabitEthernet1/0/20 //配置trunk链路放通业务vlan

     port link-mode bridge

     port link-type trunk

     undo port trunk permit vlan 1

     port trunk permit vlan 10 20

     combo enable fiber

    #

     

    SW2:

    #

     sysname SW2

    #

    vlan 10

    #

    vlan 20

    #

    vlan 21       

    #             

     

    #

    interface GigabitEthernet1/0/2  //在接口上应用vlan虚接口,关闭stp功能

     port link-mode bridge

     port access vlan 21

     combo enable fiber

     undo stp enable

    #

    interface GigabitEthernet1/0/9 //配置trunk链路放通业务vlan

     port link-mode bridge

     port link-type trunk

     undo port trunk permit vlan 1

     port trunk permit vlan 10 20

     combo enable fiber

    #

    interface GigabitEthernet1/0/20 //配置trunk链路放通业务vlan

     port link-mode bridge

     port link-type trunk

     undo port trunk permit vlan 1

     port trunk permit vlan 10 20

     combo enable fiber

    #

    第二步,配置MSTP

    SW1SW2SW3配置相同:

    SW1:

    #

    stp region-configuration //配置两个实例,并配置激活

     region-name h3c

     instance 1 vlan 10

     instance 2 vlan 20

     active region-configuration

    #

     

    SW2:

    #

    stp region-configuration //配置两个实例,并配置激活

     region-name h3c

     instance 1 vlan 10

     instance 2 vlan 20

     active region-configuration

    #

     

    SW3:

    #

    stp region-configuration //配置两个实例,并配置激活

     region-name h3c

     instance 1 vlan 10

     instance 2 vlan 20

     active region-configuration

    #

     

    B、主备根

    Sw1

    #

     stp instance 0 to 1 root primary //sw1实例1为主根

     stp instance 2 root secondary   //sw1实例2为备根

     stp global enable 

    #

     

    SW2

    #

     stp instance 2 root primary //sw2实例1为主根

     stp instance 0 to 1 root secondary  //sw2实例1为备根

     stp global enable

    #

    查看mstp配置是否正确

    第三步配置VRRP

    SW1:

    #

    interface Vlan-interface10   //进入vlan10虚接口配置ip地址

    ip address 10.1.10.2 255.255.255.0

     vrrp vrid 10 virtual-ip 10.1.10.1 //配置10.1.10.1为虚拟网关

     vrrp vrid 10 priority 120  //配置优先级为120

    #

    interface Vlan-interface20   //进入vlan20虚接口配置ip地址

     ip address 10.1.20.2 255.255.255.0

     vrrp vrid 20 virtual-ip 10.1.20.1 //配置10.1.20.1为虚拟网关

    #

    SW2:

    #

    interface Vlan-interface10   //进入vlan10虚接口配置ip地址

     ip address 10.1.10.3 255.255.255.0

     vrrp vrid 10 virtual-ip 10.1.10.1  //配置10.1.10.1为虚拟网关

    #

    interface Vlan-interface20  //进入vlan20虚接口配置ip地址

     ip address 10.1.20.3 255.255.255.0

     vrrp vrid 20 virtual-ip 10.1.20.1  //配置10.1.20.1为虚拟网关

     vrrp vrid 20 priority 120 //配置优先级为120

    #

     

    查看vrrp状态

    Ping路由器loopback接口测试

    SW1链路断开,发现主备切换

    再次ping,能通链路走SW2

        

  • 相关阅读:
    优步让一切人工智能化
    07——golang标识符、关键字、命名规则
    JVM——类的生命周期(加载阶段,连接阶段,初始化阶段)
    什么是自监督,自监督和有监督的区别什么是SSL
    Perl的LWP::UserAgent库爬虫程序怎么写
    代理模式和单一职责原理一文读懂(设计模式与开发实践 P6)
    【Unity2022】Unity实现手机游戏操控摇杆(实现操控轮盘)
    让Python自动测试更得心应手——认识一下神奇的pytest测试框架
    C语言题解——倒置字符串(剑指Offer 第58题)
    我裂开 求助15题答案--我不会哭死
  • 原文地址:https://blog.csdn.net/m0_60797416/article/details/127627948