前言
MSTP(每个VLAN多生成树)或者VLAN拥有生成树,基于实例的生成树。实例1、实例2实例拥有一颗生成树。MSTP可以实现多VLAN的负载分担,可以实现多进口进口。
VRRP虚拟路由协议协议(Virtual Router Redundancy Protocol)是由IETF提出的解决中线网关出现单点故障的路由协议。
正文
:当MSTP和VRRP共同存在时,我们必须实施MSTP的区域设置以及实例级别,网络中二层MSTP的Vlan主和VRRP的主网关注意根要同一台设备上。在下面的图中,我们把Vlan10的实例1的根桥设置为LSW1,Vlan10的网关设备也设置为LSW1。Vlan20的实例2的根桥设置为LSW2,Vlan20的网关设备也为LSW2。
PC1、PC2是企业内网的主机,分别是VLAN10和VLAN20,LSW1和LSW2之间的g0/0/2口和g0/0/3口之间形成的一个组合。AR1是企业股东股东,用于和外网通信。AR1、LSW1和LSW2之间运行ospf协议。LSW1、LSW2和LSW3之间运行MSTP协议。要让PC1、PC2出去和回来的流量方向一致,并且形成第一跳网关冗长余,且负载均衡。如下是配置
电脑1
PC>ipconfigIPv4 address......................:192.168.10.10Subnet mask.......................:255.255.255.0Gateway...........................:192.168.10.254Physical address..................:54-89-98-55-50-74VLAN..............................:10电脑2
PC>ipconfigIPv4 address......................:192.168.20.10Subnet mask.......................:255.255.255.0Gateway...........................:192.168.20.254Physical address..................:54-89-98-85-59-50Vlan..............................:20LSW1
[LSW1]displaycurrent-configurationvlanbatch1020100stpinstance1priority4096stpinstance2priority8192stpregion-configurationregion-nameMSTPinstance1vlan10instance2vlan20activeregion-configurationinterfaceVlanif10ipaddress192.168.10.1255.255.255.0vrrpvrid10virtual-ip192.168.10.254vrrpvrid10priority150vrrpvrid10preempt-modetimerdelay10vrrpvrid10trackinterfaceGigabitEthernet0/0/4reduced60vrrpvrid10authentication-modemd5GX2lR,}C+Ky~t+Byca8YR(interfaceVlanif20ipaddress192.168.20.1255.255.255.0vrrpvrid20virtual-ip192.168.20.254vrrpvrid20authentication-modemd5L>YKS.jKJu:|l3M^3"$finterfaceVlanif100ipaddress192.168.30.1255.255.255.0interfaceEth-Trunk1portlink-typetrunkporttrunkallow-passvlan1020interfaceGigabitEthernet0/0/1portlink-typetrunkporttrunkallow-passvlan1020interfaceGigabitEthernet0/0/2eth-trunk1interfaceGigabitEthernet0/0/3eth-trunk1interfaceGigabitEthernet0/0/4portlink-typeaccessportdefaultvlan100ospf100router-id192.168.30.1import-routedirectroute-policyPOLICYarea0.0.0.0network192.168.30.10.0.0.0route-policyPOLICYpermitnode10if-matchip-prefixFapplycost10route-policyPOLICYpermitnode20if-matchip-prefixF2applycost20ipip-prefixFindex10permit192.168.10.024ipip-prefixF2index10permit192.168.20.024LSW2
[LSW2]displaycurrent-configurationvlanbatch1020100stpinstance1priority8192stpinstance2priority4096stpregion-configurationregion-nameMSTPinstance1vlan10instance2vlan20activeregion-configurationinterfaceVlanif10ipaddress192.168.10.2255.255.255.0vrrpvrid10virtual-ip192.168.10.254vrrpvrid10authentication-modemd5CN7EFU,9+,eKRQqbl+O/%;interfaceVlanif20ipaddress192.168.20.2255.255.255.0vrrpvrid20virtual-ip192.168.20.254vrrpvrid20priority150vrrpvrid20preempt-modetimerdelay60vrrpvrid20trackinterfaceGigabitEthernet0/0/4reduced60vrrpvrid20authentication-modemd5:||$@<`|wYu:|l3M^36%LinterfaceVlanif100ipaddress192.168.40.2255.255.255.0interfaceEth-Trunk1portlink-typetrunkporttrunkallow-passvlan1020interfaceGigabitEthernet0/0/1portlink-typetrunkporttrunkallow-passvlan1020interfaceGigabitEthernet0/0/2eth-trunk1interfaceGigabitEthernet0/0/3eth-trunk1interfaceGigabitEthernet0/0/4portlink-typeaccessportdefaultvlan100ospf100router-id192.168.40.2import-routedirectroute-policyPOLICYarea0.0.0.0network192.168.40.20.0.0.0route-policyPOLICYpermitnode10if-matchip-prefixFapplycost20route-policyPOLICYpermitnode20if-matchip-prefixF2applycost10ipip-prefixFindex10permit192.168.10.024ipip-prefixF2index10permit192.168.20.024LSW3
[LSW3]displaycurrent-configurationvlanbatch 10 20stpregion-configurationregion-nameMSTPinstance1 vlan 10instance2 vlan 20activeregion-configurationinterfaceGigabitEthernet0/0/1portlink-type trunkporttrunk allow-pass vlan 10 20interfaceGigabitEthernet0/0/2portlink-type trunkporttrunk allow-pass vlan 10 20interfaceGigabitEthernet0/0/3portlink-type accessportdefault vlan 10stpedged-port enableinterfaceGigabitEthernet0/0/4portlink-type trunkporttrunk allow-pass vlan 20stpedged-port enableAR1
[AR1]displaycurrent-configurationinterfaceGigabitEthernet0/0/0ipaddress192.168.30.2255.255.255.0interfaceGigabitEthernet0/0/1ipaddress192.168.40.1255.255.255.0ospf100router-id111.1.1.1area0.0.0.0network192.168.30.20.0.0.0network192.168.40.10.0.0.0附上ensp源文件:回复MSTP VRRP
免责声明:内容来自用户上传并发布,站点仅提供信息存储空间服务,不拥有所有权,本网站所提供的信息只供参考之用。