全是锐捷的命令采用生成树协议只能做到链路级备份,无法做到网关级备份. MSTP与VRRP结合可以同时做到链路备份与网关级备份,极大地提高了网络的健壮性.配置要求:vlan10以SW1为根桥,并且相应的VRRPMaster也在SW1上,vlan20以SW2为根桥,并且相应的VRRPMaster也在SW2上。配置VRRP+MSTP的重要原则是:在进行MSTP和VRRP结合配置使用时,需要注意的就是保持各VLAN的根桥与各自的VRRPMaster需要保持在同一台三层交换机上。SW1相关配置 spanning-tree spanning-treemstconfiguration instance1vlan10 instance2vlan20 nametest revision1 ! spanning-treemst0priority4096(设置SW1的实例1优先级最高,手动指定实例1的根桥为SW1) spanning-treemst1priority4096(设置SW1的实例1优先级最高,手动指定实例1的根桥为SW1) spanning-treemst2priority8192interfaceFastEthernet0/1 switchportmodetrunkinterfaceFastEthernet0/2 switchportmodetrunkinterfaceVlan10(设置SW1上VLAN10的VRRP的优先级为150,高于默认的100-SW2上的VLAN10的VRRP优先级为100) ipaddress192.168.10.2255.255.255.0 standby10ip192.168.10.1 standby10priority150 ! interfaceVlan20 ipaddress192.168.20.3255.255.255.0 standby20ip192.168.20.1SW2相关配置spanning-tree spanning-treemstconfiguration instance1vlan10 instance2vlan20 nametest revision1 ! spanning-treemst0priority8192 spanning-treemst1priority8192 spanning-treemst2priority4096(设置SW1的实例1优先级最高,手动指定实例1的根桥为SW1)interfaceFastEthernet0/1 switchportmodetrunkinterfaceFastEthernet0/2 switchportmodetrunkinterfaceVlan10 ipaddress192.168.10.3255.255.255.0 standby10ip192.168.10.1 ! interfaceVlan20(设置SW1上VLAN10的VRRP的优先级为150,高于默认的100) ipaddress192.168.20.2255.255.255.0 standby20ip192.168.20.1 standby20priority150SW3相关配置spanning-tree spanning-treemstconfiguration instance1vlan10 instance2vlan20 nametest revision1 ! interfacefastEthernet0/1 switchportmodetrunk ! interfacefastEthernet0/2 switchportmodetrunkVRRP协议状态检查SW1#shstandbyIfGroupStatePriorityPreemptIntervalVirtualIPAuth ---------------------------------------------------------------- VL1010master150may1192.168.10.1 VL2020backup100may1192.168.20.1SW2#shstandbyIfGroupStatePriorityPreemptIntervalVirtualIPAuth ---------------------------------------------------------------- VL1010backup100may1192.168.10.1 VL2020master150may1192.168.20.1生成树协议状态检查实例1的根桥在SW1上,实例2的根桥在SW2上。各端口的生成树状态 SW1上的两个接口F0/1和F0/2的生成树协议状态SW2上各接口的生成树协议状态SW3的各接口的生成树协议状态确认状态无误后,那么这种VRRP+MSTP的协议组合将可以实现冗余备份和负载均衡的双重功能。