锐捷MSTP+VRRP配置实例
- 格式:doc
- 大小:186.00 KB
- 文档页数:22
mstp加vrrp的实验例子(原创实用版)目录1.MSTP 和 VRRP 的概述2.MSTP 加 VRRP 的实验环境搭建3.实验步骤和过程4.实验结果及分析5.实验结论和展望正文一、MSTP 和 VRRP 的概述1.MSTP(Multiple Spanning Tree Protocol):多实例生成树协议,用于在多个 VLAN(虚拟局域网)之间实现生成树保护。
2.VRRP(Virtual Router Redundancy Protocol):虚拟路由器冗余协议,用于提高网络设备的可靠性和冗余性。
二、MSTP 加 VRRP 的实验环境搭建1.设备:两台路由器(Router1 和 Router2),一台交换机(Switch)2.接口:Router1 的接口 G0/0/1 和 G0/0/2 分别连接到 Switch 的接口 1 和 2;Router2 的接口 G0/0/1 和 G0/0/2 分别连接到Switch 的接口 3 和 4。
3.配置:为每个接口分配不同的 VLAN,如 G0/0/1 为 VLAN10,G0/0/2 为 VLAN20。
三、实验步骤和过程1.在 Router1 上配置 MSTP 和 VRRP:a.配置 MSTP:在 Router1 上启用 MSTP,将 G0/0/1 和 G0/0/2 分别配置为 MSTP 的实例 1 和实例 2。
b.配置 VRRP:在 Router1 上启用 VRRP,将 G0/0/1 和 G0/0/2 分别配置为 VRRP 的虚拟路由器 1 和虚拟路由器 2。
2.在 Router2 上配置 MSTP 和 VRRP:a.配置 MSTP:在 Router2 上启用 MSTP,将 G0/0/1 和 G0/0/2 分别配置为 MSTP 的实例 1 和实例 2。
b.配置 VRRP:在 Router2 上启用 VRRP,将 G0/0/1 和 G0/0/2 分别配置为 VRRP 的虚拟路由器 1 和虚拟路由器 2。
H3C 7503-A<SwitchA> system-view[SwitchA] bfd echo-source-ip 11.11.11.11[SwitchA]vlan 10 20 30 40 50 60 70 80 90 4094[SwitchA] interface GigabitEthernet2[SwitchA-GigabitEthernet2] port link-type trunk[SwitchA-GigabitEthernet2] port trunk permit vlan 10 to 90[SwitchA] interface GigabitEthernet3[SwitchA-GigabitEthernet3] port link-type trunk[SwitchA-GigabitEthernet3] port trunk permit vlan 10 to 90[SwitchA] interface vlan-interface 4094[SwitchA-Vlan-interface4094] ip address 192.168.100.254 24[SwitchA] interface vlan-interface 10[SwitchA-Vlan-interface10] ip address 192.168.10.1 24[SwitchA-Vlan-interface10] vrrp vrid 10 virtual-ip 192.168.10.254 24[SwitchA-Vlan-interface10] vrrp vrid 10 priority 120[SwitchA-Vlan-interface10] vrrp vrid 10 track interface Vlan-interface4094 reduced 255 [SwitchA-Vlan-interface10]quit[SwitchA] interface vlan-interface 20[SwitchA-Vlan-interface20] ip address 192.168.20.1 24[SwitchA-Vlan-interface20] vrrp vrid 20 virtual-ip 192.168.20.254 24[SwitchA-Vlan-interface20] vrrp vrid 20 priority 120[SwitchA-Vlan-interface20] vrrp vrid 20 track interface Vlan-interface4094 reduced 255 [SwitchA-Vlan-interface20]quit[SwitchA] interface vlan-interface 30[SwitchA-Vlan-interface30] ip address 192.168.30.1 24[SwitchA-Vlan-interface30] vrrp vrid 30 virtual-ip 192.168.30.254 24[SwitchA-Vlan-interface30] vrrp vrid 30 priority 120[SwitchA-Vlan-interface30] vrrp vrid 30 track interface Vlan-interface4094 reduced 255 [SwitchA-Vlan-interface30]quit[SwitchA] interface vlan-interface 40[SwitchA-Vlan-interface40] ip address 192.168.40.1 24[SwitchA-Vlan-interface40] vrrp vrid 40 virtual-ip 192.168.40.254 24[SwitchA-Vlan-interface40] vrrp vrid 40 track 1 switchover[SwitchA-Vlan-interface40] bfd min-echo-receive-interval 10[SwitchA-Vlan-interface40] bfd detect-multiplier 3[SwitchA-Vlan-interface40]quit[SwitchA] interface vlan-interface 50[SwitchA-Vlan-interface50] ip address 192.168.50.1 24[SwitchA-Vlan-interface50] vrrp vrid 50 virtual-ip 192.168.50.254 24[SwitchA-Vlan-interface50] vrrp vrid 50 track 1 switchover[SwitchA-Vlan-interface50] bfd min-echo-receive-interval 10[SwitchA-Vlan-interface50] bfd detect-multiplier 3[SwitchA-Vlan-interface50] quit[SwitchA] interface vlan-interface 60[SwitchA-Vlan-interface60] ip address 192.168.60.1 24[SwitchA-Vlan-interface60] vrrp vrid 60 virtual-ip 192.168.60.254 24[SwitchA-Vlan-interface60] vrrp vrid 60 track 1 switchover[SwitchA-Vlan-interface60] bfd min-echo-receive-interval 10[SwitchA-Vlan-interface60] bfd detect-multiplier 3[SwitchA-Vlan-interface60] quit[SwitchA] interface vlan-interface 70[SwitchA-Vlan-interface70] ip address 192.168.70.1 24[SwitchA-Vlan-interface70] vrrp vrid 70 virtual-ip 192.168.70.254 24[SwitchA-Vlan-interface70] vrrp vrid 70 track 1 switchover[SwitchA-Vlan-interface70] bfd min-echo-receive-interval 10[SwitchA-Vlan-interface70] bfd detect-multiplier 3[SwitchA-Vlan-interface70] quit[SwitchA] interface vlan-interface 80[SwitchA-Vlan-interface80] ip address 192.168.80.1 24[SwitchA-Vlan-interface80] vrrp vrid 80 virtual-ip 192.168.80.254 24[SwitchA-Vlan-interface80] vrrp vrid 80 track 1 switchover[SwitchA-Vlan-interface80] bfd min-echo-receive-interval 10[SwitchA-Vlan-interface80] bfd detect-multiplier 3[SwitchA-Vlan-interface80] quit[SwitchA] interface vlan-interface 90[SwitchA-Vlan-interface90] ip address 192.168.90.1 24[SwitchA-Vlan-interface90] vrrp vrid 90 virtual-ip 192.168.90.254 24[SwitchA-Vlan-interface90] vrrp vrid 90 track 1 switchover[SwitchA-Vlan-interface90] bfd min-echo-receive-interval 10[SwitchA-Vlan-interface90] bfd detect-multiplier 3[SwitchA-Vlan-interface90] quit[SwitchA] track 1 bfd echo interface vlan-interface 10 to 90 remote ip 11.0.0.3 local ip 11.0.0.2[SwitchA] stp region-configuration[SwitchA-mst-region] region-name vrrp[SwitchA-mst-region] instance 1 vlan 10 20 30[SwitchA-mst-region] instance 2 vlan 40 50 60[SwitchA-mst-region] instance 3 vlan 70 80 90[SwitchA-mst-region] active region-configuration[SwitchA-mst-region] quit[SwitchA] stp instance 1 root primary[SwitchA] stp instance 2 root secondary[SwitchA] stp instance 3 root secondary[SwitchA] stp enable[SwitchA] port Gigabitethernet 6[SwitchA-GigabitEthernet6] port link-type trunk[SwitchA-GigabitEthernet6] port trunk permit vlan 10 20 30[SwitchA] port Gigabitethernet 5[SwitchA-GigabitEthernet5] port link-type trunk[SwitchA-GigabitEthernet5] port trunk permit vlan 40 50 60[SwitchA] port Gigabitethernet 4[SwitchA-GigabitEthernet4] port link-type trunk[SwitchA-GigabitEthernet4] port trunk permit vlan 70 80 90[SwitchA] port Gigabitethernet 1[SwitchA-GigabitEthernet1] port access vlan 4094[SwitchA-GigabitEthernet1] stp disable[SwitchA]ip route-static 0.0.0.0 0.0.0.0 192.168.100.100 preference 60 //内部所有主机访问外网的下一跳地址为上联设备接口地址H3C 7503-B<SwitchA> system-view[SwitchA] bfd echo-source-ip 11.11.11.11[SwitchA]vlan 10 20 30 40 50 60 70 80 90 4094[SwitchA] interface GigabitEthernet2[SwitchA-GigabitEthernet2] port link-type trunk[SwitchA-GigabitEthernet2] port trunk permit vlan 10 to 90[SwitchA] interface GigabitEthernet3[SwitchA-GigabitEthernet3] port link-type trunk[SwitchA-GigabitEthernet3] port trunk permit vlan 10 to 90[SwitchA] interface vlan-interface 4094[SwitchA-Vlan-interface4094] ip address 192.168.100.253 24。
交换机密码1234(config)#enable secret level 1 0 1001234(config)#enable secret level 15 0 100远程登入密码1234(config)#line vty 0 41234(config-line)#password 1001234(config-line)#end交换机管理IP1234(config)#interface vlan 11234(config-if)#ip address 192.168.1.10 255.255.255.0 1234(config-if)#no shutdown修改交换机老化时间1234(config)#mac-address-table aging-time 201234(config)#end添删vlan1234(config)#vlan 8881234(config-vlan)#name a8881234(config)#no vlan 888添加access口1234(config)#interface gigabitEthernet 0/101234(config-if)#switchport mode access1234(config-if)#switchport access vlan 10切换assess trunk1234(config-if)#switchport mode access1234(config-if)#switchport mode trunk指定特定一个native vlan1234(config-if)#switchport trunk native vlan 10配置trunk口的许可vlan列表1234(config-if)#switchport trunk allowed vlan ?add Add VLANs to the current listall All VLANsexcept All VLANs except the followingremove Remove VLANs from the current list速成树协议1234(config)#spanning-tree1234(config)#spanning-tree mode rstp/stp配置网关:switch(config)#ip default-gateway 192.168.1.254交换机基本配置-常见查看命令查看CPU利用率show cpu查看交换机时钟show clock查看交换机日志show logging查看交换机动态学习到的MAC地址表show mac-address-table dynamic查看当前交换机运行的配置文件show running-config查看交换机硬件、软件信息show version查看交换机的arp表show arp显示接口详细信息的命令show interfaces gigabitEthernet 4/1 counters接口配置Switch(config)#interface gigabitethernet 0/1把接口工作模式改为光口。
Z 端 20.0.1.10/24Z 交换机A 交换机Vlan 2:20.0.1.1/24Vlan 3:30.0.1.1/24Vlan 4:40.0.1.1/24Vlan 5:50.0.1.1/24Vlan 3:30.0.1.3/24Vlan 4:40.0.1.3/24Vlan 5:50.0.1.3/24Mstp 元素:Name:wushan Revision:2Instance 1:vlan3,5Instance 2:vlan2,4Vlan 3,5主用路由Vlan 2,4备用路由Vlan 2:20.0.1.2/24Vlan 3:30.0.1.2/24Vlan 4:40.0.1.2/24Vlan 5:50.0.1.2/24Vlan 2,4主用路由Vlan 3,5备用路由注:mstp 同一区域中,不同交换机mstp 的3大属性(名称、修订号、instance 与vlan 的映射关系)必须完全相同。
Switch A:(config)#int range g0/23-24(config-range-if)#switchport trunk encapusulation dot1q (config-range-if)#switchport allow vlan 1-6 (config-range-if)#switchport mode trunk(config)#int g0/20(config-if)#switchport trunk encapusulation dot1q (config)#switchport allow vlan 1-6 (config-if)#switchport mode trunk(config)#int g0/11(config-if)#switchport mode access (config-if)#switchport access vlan 2(config)#spanning tree mode mst(config-mst)#spanning-tree mst configuration (config-mst)#name wushan (config-mst)#revision 2(config-mst)#instance 1 vlan 3,5(config-mst)#instance 2 vlan 2,4(config)#spanning-tree mst 1 root primary#show spanning-tree mst#show spanning-tree mst 1#show spanning-tree mst 1 detail#show spanning-tree mst int g0/23路由(config)# ip routing(config)# router ospf 1(config-router)#network 10.0.1.0 0.0.0.255 area 0(config-router)# network 20.0.1.0 0.0.0.255 area 0(config-router)#network 30.0.1.0 0.0.0.255 area 0(config-router)#network 40.0.1.0 0.0.0.255 area 0(config-router)#network 50.0.1.0 0.0.0.255 area 0//(config-router)#network 60.0.1.0 0.0.0.255 area 0#show ip ospf interface#show ip ospf database#show ip ospf neighborVrrp配置(config)#int vlan 2(config-if)#vrrp 2 ip 20.0.1.50(config-if)#vrrp 1 priority 90(config-if)#vrrp 1 timer learn(config-if)#end注: 一个vrrp组只有一个主用路由,一个或多个备用路由Vrrp group-number ip x.x.x.x x.x.x.x可以使虚拟的,也可以跟路由器的物理地址。
mstp加vrrp的实验例子(最新版)目录1.实验背景2.实验目的3.实验环境与工具4.实验步骤5.实验结果与分析6.实验结论正文1.实验背景随着科技的发展,虚拟现实技术 (Virtual Reality, VR) 已经被广泛应用在各个领域,如教育、医疗、游戏等。
VR 技术通过计算机模拟生成一个三维虚拟世界,用户可以在其中进行实时、交互式的操作。
为了提高 VR 技术的实用性和沉浸感,许多研究者开始探索如何将 VR 技术与空间定位技术 (Simultaneous Localization and Mapping, SLAM) 相结合。
在这样的背景下,本实验将探讨如何使用 MSTP(MonoSLAM)加 VRRP(VR Robot Positioning)的方法来进行空间定位和导航。
2.实验目的本实验的主要目的是验证 MSTP 加 VRRP 的方法在空间定位和导航方面的准确性和实用性。
通过比较不同的定位和导航算法,找出在 VR 环境下表现最佳的方法,为未来的 VR 应用提供技术支持。
3.实验环境与工具实验环境:计算机实验室实验设备:电脑、VR 头盔、传感器实验软件:MSTP、VRRP4.实验步骤(1)搭建实验环境:将 VR 头盔与电脑连接,启动 MSTP 和 VRRP 软件。
(2)设定实验参数:设置 MSTP 的定位精度、VRRP 的导航精度等参数。
(3)进行实验:分别使用 MSTP、VRRP 及其他算法进行定位和导航实验,记录实验结果。
(4)数据分析:对比不同算法的定位精度、导航速度等指标,分析实验结果。
5.实验结果与分析经过多次实验对比,MSTP 加 VRRP 的组合在定位精度和导航速度方面表现最佳。
与其他算法相比,MSTP 能够实现较高的定位精度,而 VRRP 在导航方面具有较快的速度。
这说明 MSTP 加 VRRP 的方法在 VR 环境下具有较高的实用性。
6.实验结论通过本次实验,我们验证了 MSTP 加 VRRP 的方法在空间定位和导航方面的准确性和实用性。
MSTP+VRRP双核心应用技术白皮书摘要MSTP+VRRP双核心应用方案,是提高网络系统可用性的一个比较优秀的解决方案。
本文在分析系统可用性的基础上,详细分析了VRRP+MSTP双核心应用方案和所采用技术的基本原理,详细分析了如何利用我司产品特性,解决该方案在实际应用中常见的问题,最后给出了该方案在教育和金融市场各一个具体应用案例。
关键词可用性层次化网络设计架构双核心VRRP协议MSTP协议技术白皮书修订记录目录摘要 (1)关键词 (1)1 缩略语 (5)2 概述 (5)2.1 系统可用性的提出 (5)2.2 我们的现状 (5)2.3 产品支持 (6)3 技术介绍 (7)3.1 层次化的网络设计架构 (7)3.1.1 核心层 (8)3.1.2 汇聚层 (8)3.1.3 接入层 (8)3.2 VRRP协议 (9)3.2.1 概述 (9)3.2.2 协议基本原理 (9)3.2.3 应用举例 (10)3.3 MSTP协议 (10)3.3.1 概述 (10)3.3.2 协议基本原理 (11)3.3.3 应用举例 (12)3.4 MSTP+VRRP双核心应用方案 (12)3.4.1 应用说明 (12)3.4.2 常用配置说明 (13)4 锐捷MSTP+VRRP双核心应用技术特点 (13)4.1 配置灵活方便 (13)4.2 功能完备 (13)4.3 适用版本 (14)4.4 注意事项 (14)4.5 常见问题及解决对策 (15)4.5.1 VRRP协议监控主路由设备上行链路 (15)4.5.2 VRRP通告定时设备学习 (16)4.5.3 MSTP防止BPDU攻击 (16)4.6 典型故障排查 (17)4.6.1 同一个备份组出现多个master路由器 (17)4.6.2 核心层设备没有开启MSTP协议却收到大量BPDU报文 (18)4.6.3 双核心拓扑出现广播风暴 (18)4.6.4 双核心网络持续发生MSTP振荡 (18)4.6.5 其他MSTP可能的故障 (18)4.7 配置实例 (19)4.7.1 教育市场应用 (19)4.7.2 金融市场应用 (25)5 结束语 (32)1 缩略语MTBF(Mean Time Between Failure):平均正常运行时间MTTR(Mean Time To Repair):平均故障恢复时间VLAN(Virtual Local Area Network):虚拟局域网VRRP(Virtual Router Redundancy Protocol):虚拟路由冗余协议MSTP(Multiple Spanning Tree Protocol):多生成树协议BPDU(Bridge Protocol Data Unit):网桥协议数据单元2 概述2.1 系统可用性的提出随着社会生产力的提高和信息化技术的发展,数据通信网络在人们日常生产,生活中占据着越来越重要的地位,由于网络通信中断而造成的各种损失十分巨大。
Mstp+Vrrp双核心网络架构:在这个双核心的网络架构中所应用到的技术:1、Mstp,在交换机层开启Mstp,创建实例instance 一个实例就是一棵树,使用Mstp来实现数据分流和备份链路;2、Mstp+Vrrp Vrrp 是虚拟路由冗余协议,Vrrp下的IP是虚拟网关,而VLAN 下的地址是虚拟路由器的物理地址,用户所获取到的网关使Vrrp下的虚拟网关地址;3、Dhcp 动态分配地址,设置在两台核心中,两个地址池要分别排除对面的地址;4、浮动路由,在双核心出接口写默认,一条主,一条加管理距离;5、端口聚合,在双核心之间用若干条线互连,把这些端口加入到聚合端口,打trunk,来作为Vrrp的心跳线;6、ACL 访问控制列表、NAT 网络地址转换,设置在出口路由器中,允许哪些用户上网,创建NAT地址转换池,允许上网的网段调入overload即可。
接下来是我在做这个实验的过程:首先是写好配置模板,写模板的好处是,理清思路,配置有条理,出了问题先看看模板有没有问题,缺少什么等接入层交换机的配置模板:conf tspanning-treespanning-tree mode mstp(开启多生成树Mstp)vlan 2vlan 3vlan 4vlan 5vlan 6vlan 7exitint range f0/1-5spanning-tree portfast (速端口,用户断网和恢复网路切换速度快)spanning-tree bpduguard enable (防自环)sw acc vlan 2int range f0/6-10spanning-tree portfastspanning-tree bpduguard enablesw acc vlan 3int range f0/11-12spanning-tree portfastspanning-tree bpduguard enablesw acc vlan 4int range f0/13-14spanning-tree portfastspanning-tree bpduguard enablesw acc vlan 5int range f0/15-16spanning-tree portfastspanning-tree bpduguard enablesw acc vlan 6int range f0/17-18spanning-tree portfastspanning-tree bpduguard enablesw acc vlan 7exitint gi0/25(上联口)sw mode trunkint gi0/26sw mode trunkexitspanning-tree mst conf(创建多生成树实例)instance 1 vlan 3,5,7instance 2 vlan 2,4,6exitwrite核心1配置模板:conf tip routingint gi0/25(下联口trunk)sw mode trunkexitspanning-treespanning-tree mode mstp(开启Mstp)vlan 2vlan 3vlan 4vlan 5vlan 6vlan 7exitint vlan 2ip add 10.0.2.253 255.255.255.0(虚拟路由器的物理地址)vrrp 2 ip 10.0.2.254(用户的虚拟网关,用户实际获取到的网关)exitint vlan 3ip add 10.0.3.253 255.255.255.0vrrp 3 ip 10.0.3.254vrrp 3 pr 110(Vrrp虚拟路由器的优先级,默认100,0—255,255最高)exitint vlan 4ip add 10.0.4.253 255.255.255.0vrrp 4 ip 10.0.4.254exitint vlan 5ip add 10.0.5.253 255.255.255.0vrrp 5 ip 10.0.5.254vrrp 5 pr 110exitint vlan 6ip add 10.0.6.253 255.255.255.0vrrp 6 ip 10.0.6.254exitint vlan 7ip add 10.0.7.253 255.255.255.0vrrp 7 ip 10.0.7.254vrrp 7 pr 110exitspanning-tree mst conf (创建Mstp instance实例,修改实例优先级)instance 1 vlan 3,5,7instance 2 vlan 2,4,6exitspanning-tree mst 1 p 4096spanning-tree mst 2 p 8192service dhcp(开启并创建Dhcp地址池)ip dhcp pool vlan2network 10.0.2.0 255.255.255.0dns 8.8.8.8default-router 10.0.2.254exitip dhcp ex 10.0.2.100 10.0.2.254ip dhcp pool vlan3network 10.0.3.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.3.254exitip dhcp ex 10.0.3.100 10.0.3.254ip dhcp pool vlan4network 10.0.4.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.4.254exitip dhcp ex 10.0.4.100 10.0.4.254ip dhcp pool vlan5network 10.0.5.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.5.254exitip dhcp ex 10.0.5.100 10.0.5.254ip dhcp pool vlan6network 10.0.6.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.6.254exitip dhcp ex 10.0.6.100 10.0.6.254ip dhcp pool vlan7network 10.0.7.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.7.254exitip dhcp ex 10.0.7.100 10.0.7.254int range f0/1-2(创建端口聚合)port-group 1int aggregateport 1(聚合端口1打trunk)sw mode trunkexitint f0/3spanning-tree bpdufilter enable (不向上一层发送BPDU 桥协议数据单元报文)exitint f0/3no swip add 10.0.8.1 255.255.255.252no shutip route 0.0.0.0 0.0.0.0 10.0.8.2ip route 0.0.0.0 0.0.0.0 10.0.8.6 100(浮动路由)exitwrite核心2配置模板:conf tip routing(下联口trunk)int gi0/25sw mode trunkexitspanning-treevlan 2vlan 3vlan 4vlan 5vlan 6vlan 7exitint vlan 2ip add 10.0.2.252 255.255.255.0 vrrp 2 ip 10.0.2.254vrrp 2 p 110exitint vlan 3ip add 10.0.3.252 255.255.255.0 vrrp 3 ip 10.0.3.254exitint vlan 4ip add 10.0.4.252 255.255.255.0 vrrp 4 ip 10.0.4.254vrrp 4 p 110exitint vlan 5ip add 10.0.5.252 255.255.255.0 vrrp 5 ip 10.0.5.254exitint vlan 6ip add 10.0.6.252 255.255.255.0 vrrp 6 ip 10.0.6.254vrrp 6 p 110exitint vlan 7ip add 10.0.7.252 255.255.255.0 vrrp 7 ip 10.0.7.254exitspanning-tree mst conf instance 1 vlan 3,5,7instance 2 vlan 2,4,6exitspanning-tree mst 1 p 8192service dhcpip dhcp pool vlan2network 10.0.2.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.2.254exitip dhcp ex 10.0.2.1 10.0.2.99ip dhcp ex 10.0.2.252 10.0.2.254ip dhcp pool vlan3network 10.0.3.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.3.254exitip dhcp ex 10.0.3.1 10.0.3.99ip dhcp ex 10.0.3.252 10.0.3.254ip dhcp pool vlan4network 10.0.4.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.3.254exitip dhcp ex 10.0.4.1 10.0.4.99ip dhcp ex 10.0.4.252 10.0.4.254ip dhcp pool vlan5network 10.0.5.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.5.254exitip dhcp ex 10.0.5.1 10.0.5.99ip dhcp ex 10.0.5.252 10.0.5.254ip dhcp pool vlan6network 10.0.6.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.6.254exitip dhcp ex 10.0.6.1 10.0.6.99ip dhcp ex 10.0.6.252 10.0.6.254ip dhcp pool vlan7network 10.0.7.0 255.255.255.0lease 0 12 0dns 8.8.8.8default-router 10.0.7.254exitip dhcp ex 10.0.7.1 10.0.7.99ip dhcp ex 10.0.7.252 10.0.7.254 int range f0/1-2port-group 1int aggregateport 1sw mode trunkexitint f0/3spanning-tree bpdufilter enable exitint f0/3no swip add 10.0.8.5 255.255.255.252 no shutexitip route 0.0.0.0 0.0.0.0 10.0.8.6ip route 0.0.0.0 0.0.0.0 10.0.8.1 100 exitwrite用一台三层做出口路由器:conf tip routingspanning-treespanning-tree mode mstpip route 0.0.0.0 0.0.0.0 172.16.1.2int f0/1no swip add 10.0.8.2 255.255.255.252no shutip nat insideexitint f0/2no swip add 10.0.8.6 255.255.255.252no shutip nat insideexitint f0/3no swip add 172.16.1.1 255.255.255.252no shutip nat outsideexitip route 10.0.0.0 255.255.248.0 172.16.1.1ip nat pool dizhichi 20.0.0.1 20.0.0.254 netmask 255.255.255.0 access-list 1 permit 10.0.0.0 0.0.7.255ip nat inside source list 1 pool dizhichi overloadexitip route 10.0.2.0 255.255.255.0 10.0.8.5ip route 10.0.2.0 255.255.255.0 10.0.8.1 100ip route 10.0.3.0 255.255.255.0 10.0.8.1ip route 10.0.3.0 255.255.255.0 10.0.8.5 100ip route 10.0.4.0 255.255.255.0 10.0.8.5ip route 10.0.4.0 255.255.255.0 10.0.8.1 100ip route 10.0.5.0 255.255.255.0 10.0.8.1ip route 10.0.5.0 255.255.255.0 10.0.8.5 100ip route 10.0.6.0 255.255.255.0 10.0.8.5ip route 10.0.6.0 255.255.255.0 10.0.8.1 100ip route 10.0.7.0 255.255.255.0 10.0.8.1ip route 10.0.7.0 255.255.255.0 10.0.8.5 100exitwrite。
VRRP+MSTP实验拓扑图SWASWB SW3Vlan 10,20Vlan 10,20 1 1 链路聚合 2 2 23-2423-24 Vlan 10,20 Vlan 10 ip:192.168.10.252 虚拟网关地址:192.168.10.254 Vlan 20 ip:192.168.20.252 虚拟网关地址:192.168.20.254 Vlan 10 ip:192.168.10.253虚拟网关地址:192.168.10.254Vlan 20 ip:192.168.20.253虚拟网关地址:192.168.20.254Vlan 10 用户网关地址:192.168.10.254Vlan 20 用户网关地址:192.168.20.254要求vlan10的用户流量在SWA 上,vlan 20的用户流量在SWB 上VRRP 配置SWA 的配置SWA(config)#interface Vlan 10(设置SWA 上VLAN10的VRRP 的优先级为150,高于默认的100-SWB 上的VLAN10的VRRP 优先级为100)SWA(config-if)#ip address 192.168.10.253 255.255.255.0SWA(config-if)#vrrp 10 ip 192.169.10.254SWA(config-if)#vrrp 10 priority 150SWA(config-if)#exitSWA(config)#interface Vlan 20SWA(config-if)#ip address 192.168.20.253 255.255.255.0SWA(config-if)#vrrp 20 ip 192.168.20.254VRRP配置(续)SWB的配置SWB(config)#interface Vlan 10SWB(config-if)#ip address 192.168.10.252 255.255.255.0SWB(config-if)#vrrp 10 ip 192.169.10.254SWB(config-if)#exitSWB(config)#interface Vlan 20SWB(config-if)#ip address 192.168.20.252 255.255.255.0SWB(config-if)#vrrp 20 ip 192.168.20.254(设置SWA上VLAN20的VRRP的优先级为150,高于默认的100-SWB 上的VLAN20的VRRP优先级为100)SWB(config-if)#vrrp 20 priority 150交换机上配置VRRP提问:怎么配置VRRP回答:步骤一:Master:ruijie(config)#track 1 interface f0/0 ---端口追踪ruijie(config)#interface Vlan 10ruijie(config-if)#ip addr 10.10.10.1 255.255.255.0ruijie(config-if)#vrrp 1 priority 120 ---设置优先级,默认100,优先级高的成为主ruijie(config-if)#vrrp 1 ip 10.10.10.10 ---配置虚拟网关ruijie(config-if)#vrrp 1 timer advertise 3 ---调定时器,可选ruijie(config-if)#vrrp 1 preempt ---配抢占ruijie(config-if)#vrrp 1 track 1 100 ---追踪端口优先级降低值步骤二:Backup:ruijie(config)#interface Vlan 10ruijie(config-if)#ip addr 10.10.10.2 255.255.255.0ruijie(config-if)#vrrp 1 priority 100 ---设置优先级,默认100ruijie(config-if)#vrrp 1 ip 10.10.10.10ruijie(config-if)#vrrp 1 timer advertise 3 ---调定时器,可选ruijie(config-if)#vrrp 1 preempt ---配抢占验证:验证结果show vrrp [brief]show vrrp interface 接口show track小结:简单来说 VRRP 是一种容错协议 它为具有组播或广播能力的局域网 如以太网 设计 它保证当局域网内主机的下一跳路由器出现故障时 可以及时的由另一台路由器来代替 从而保持通讯的连续性和可靠性 为了使VRRP 工作 要在路由器上配置虚拟路由器号和虚拟IP 地址 同时产生一个虚拟MAC 地址 这样在这个网络中就加入了一个虚拟路由器 而网络上的主机与虚拟路由器通信 无需了解这个网络上物理路由器的任何信息 一个虚拟路由器由一个主路由器和若干个备份路由器组成 主路由器实现真正的转发功能 当主路由器出现故障时 一个备份路由器将成为新的主路由器 接替它的工作。
交换机vrrp加mstp配置实例一、组网需求1、switch a 、switch b选用两台锐捷的s5750 ;switch c 、shwich d 选用锐捷的s3750和s37602、全网共有两个业务vlan ,为vlan 10 、vlan 203、Switch a 、switch b 都分别对两vlan起用两vrrp组,实现两组的业务的负载分担和备份。
4、Switch a、switch b、switch c、switch d 都起用mstp多生成数协议,并且所有设备都属于同一个mst域,且实例映射一致(vlan 10映射实例1、vlan 20映射实例2 其他vlan映射默认实例0)。
5、Vlan 10业务以switch a为根桥;vlan 20业务以switch b为根桥;实现阻断网络环路,并能实现不同vlan数据流负载分担功能。
二、组网图三、配置步骤Switch a配置:s1#show runBuilding configuration...Current configuration : 1651 bytes!version RGNOS 10.2.00(2), Release(29287)(Tue Dec 25 20:39:14 CST 2007 -ngcf49) hostname s1co-operate enable!!!vlan 1!vlan 10!vlan 20!!no service password-encryption!spanning-tree 开启生成树(默认为mstp)spanning-tree mst configuration 进入mst配置模式revision 1 指定MST revision number 为1name region1 指定mst配置名称instance 0 vlan 1-9, 11-19, 21-4094 缺省情况下vlan都属于实例0instance 1 vlan 10 手工指定vlan10属于实例1instance 2 vlan 20 手工指定vlan20属于实例2spanning-tree mst 1 priority 0 指定实例1的优先级为0(为根桥)spanning-tree mst 2 priority 4096 指定实例2的优先级为4096interface GigabitEthernet 0/1switchport access vlan 10 配置g0/1属于vlan10!interface GigabitEthernet 0/2switchport access vlan 20 配置g0/2属于vlan 20!interface GigabitEthernet 0/3!..interface GigabitEthernet 0/24 设置g0/24为trunk接口且允许vlan10/20通过switchport mode trunk!interface VLAN 10 创建vlan 10 svi接口ip address 192.168.10.1 255.255.255.0 配置ip地址vrrp 1 priority 120 配置vrrp组1 优先级为120vrrp 1 ip 192.168.10.254 配置vrrp组1虚拟ip地址为192.168.10.254!interface VLAN 20 创建vlan 20 svi接口ip address 192.168.20.1 255.255.255.0 配置ip地址vrrp 2 ip 192.168.20.254 配置vrrp组2虚拟ip地址为192.168.20.254默认vrrp组的优先级为100默认不显示!line con 0line vty 0 4logins1#show vlanVLAN Name Status Ports---- -------------------------------- --------- ----------------------------------1 VLAN0001 STATIC Gi0/3, Gi0/4, Gi0/5, Gi0/6Gi0/7, Gi0/8, Gi0/9, Gi0/10Gi0/11, Gi0/12, Gi0/13, Gi0/14Gi0/15, Gi0/16, Gi0/17, Gi0/18Gi0/19, Gi0/20, Gi0/21, Gi0/22Gi0/23, Gi0/2410 VLAN0010 STATIC Gi0/1, Gi0/2420 VLAN0020 STATIC Gi0/2, Gi0/24Switch b配置:s2#show runBuilding configuration...Current configuration : 1607 bytes!version RGNOS 10.2.00(2), Release(27932)(Thu Dec 13 10:32:09 CST 2007 -ngcf31) hostname s2!!!vlan 1!vlan 10!vlan 20!!no service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 4096spanning-tree mst 2 priority 0interface GigabitEthernet 0/1switchport access vlan 10!interface GigabitEthernet 0/2switchport access vlan 20!..interface GigabitEthernet 0/24switchport mode trunk!interface VLAN 10ip address 192.168.10.2 255.255.255.0vrrp 1 ip 192.168.10.254!interface VLAN 20ip address 192.168.20.2 255.255.255.0vrrp 2 priority 120vrrp 2 ip 192.168.20.254!line con 0line vty 0 4login!!ends2#show vlanVLAN Name Status Ports---- -------------------------------- --------- -----------------------------------1 VLAN0001 STATIC Gi0/3, Gi0/4, Gi0/5, Gi0/6Gi0/7, Gi0/8, Gi0/9, Gi0/10Gi0/11, Gi0/12, Gi0/13, Gi0/14Gi0/15, Gi0/16, Gi0/17, Gi0/18Gi0/19, Gi0/20, Gi0/21, Gi0/22Gi0/23, Gi0/2410 VLAN0010 STATIC Gi0/1, Gi0/2420 VLAN0020 STATIC Gi0/2, Gi0/24Switch c配置:s3#show runBuilding configuration...Current configuration : 1540 bytes!version RGNOS 10.2.00(2), Release(28794)(Fri Dec 21 09:27:15 CST 2007 -ngcf32) hostname s3!vlan 1!vlan 10!!service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 0spanning-tree mst 2 priority 4096interface FastEthernet 0/1switchport access vlan 10!interface FastEthernet 0/2switchport access vlan 10!..interface GigabitEthernet 0/25!interface GigabitEthernet 0/26!interface GigabitEthernet 0/27!interface GigabitEthernet 0/28!interface VLAN 10ip address 192.168.10.3 255.255.255.0!ip route 0.0.0.0 0.0.0.0 192.168.10.254!!line con 0line vty 0 4loginSwitch d配置:s4#show runBuilding configuration...Current configuration : 1066 bytes!version RGNOS 10.2.00(2), Release(27932)(Thu Dec 13 10:31:41 CST 2007 -ngcf32) hostname s4!vlan 1!vlan 20!!no service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 4096spanning-tree mst 2 priority 0interface GigabitEthernet 0/1switchport access vlan 20!interface GigabitEthernet 0/2switchport access vlan 20!..interface GigabitEthernet 0/12!interface VLAN 20ip address 192.168.20.3 255.255.255.0!!!!ip route 0.0.0.0 0.0.0.0 192.168.20.254!!line con 0line vty 0 4login!四、查看vrrp、mstp信息Switch a 信息:s1#show vrrp 查看vrrp 信息VLAN 10 - Group 1State is MasterVirtual IP address is 192.168.10.254 configuredVirtual MAC address is 0000.5e00.0101Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 120Master Router is 192.168.10.1 (local), priority is 120Master Advertisement interval is 1 secMaster Down interval is 3 secVLAN 20 - Group 2State is BackupVirtual IP address is 192.168.20.254 configuredVirtual MAC address is 0000.5e00.0102Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 100Master Router is 192.168.20.2 , priority is 120Master Advertisement interval is 1 secMaster Down interval is 3 secs1#s1#s1#s1#show spanning-tree interface gigabitEthernet 0/1 查看g0/1接口stp状态信息PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 6 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8001 PortForwardTransitions : 5 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :1002.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 4 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPorts1#s1#s1#show spanning-tree interface gigabitEthernet 0/2 查看g0/2接口stp状态信息PortAdminPortFast : DisabledPortOperPortFast : DisabledPortAdminAutoEdge : EnabledPortOperAutoEdge : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :8000.00d0.f836.ed70PortDesignatedPort : 8002PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70PortDesignatedPort : 8002PortForwardTransitions : 4PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : discardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :0002.00d0.f8d7.ae12PortDesignatedPort : 8002PortForwardTransitions : 3PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : alternatePorts1#s1#s1#show spanning-tree interface gigabitEthernet 0/24 g0/24接口stp状态信息PortAdminPortFast : DisabledPortOperPortFast : DisabledPortAdminAutoEdge : EnabledPortOperAutoEdge : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :8000.001a.a909.8fe0PortDesignatedPort : 8018PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : rootPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70PortDesignatedPort : 8018PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 4PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : rootPorts1#Switch b 信息:s2#show vrrpVLAN 10 - Group 1State is BackupVirtual IP address is 192.168.10.254 configured Virtual MAC address is 0000.5e00.0101 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 100Master Router is 192.168.10.1 , priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secVLAN 20 - Group 2State is MasterVirtual IP address is 192.168.20.254 configured Virtual MAC address is 0000.5e00.0102 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 120Master Router is 192.168.20.2 (local), priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secs2#s2#s2#s2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/1PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPorts2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :1001.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPorts2#s2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/24 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : discardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70 PortDesignatedPort : 8018 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : alternatePort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPorts2#Switch c 信息:s3#show spanning-tree interface fastEthernet 0/1 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : discardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : alternatePort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : discardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :1002.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 0 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : alternatePorts3#s3#s3#s3#s3#show spanning-tree interface fastEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPorts3#Switch d 信息:s4#show spanning-tree interface gigabitEthernet 0/1 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPort###### MST 1 vlans mapped :10PortState : discardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :1001.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : alternatePort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPorts4#s4#s4#s4#show spanning-tree interface gigabitEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : discardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : alternatePort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f836.ed70 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.00d0.f8d7.ae12 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPorts4#FAQ:1.1 RSTP和MSTP配合为什么有问题1.1.1 原因分析由于RSTP/MSTP的指定端口快速迁移机制,即接收到下游的agreement报文才能进行快速迁移。
一. 实验目的通过这一相对复杂的网络环境的搭建与配置,熟悉与掌握交换路由网络设备的配置,巩固这之一学期所学的知识并发挥应用到具体的实践中。
二. 实验环境(所需设备)3台路由器R1、R2、R3,2台三成交换机S1、S2,两台二层交换机S3、S4,终端服务器一台,PC 机5台,交叉线直连线各若干,DCE-DTE 串行线一条。
三. 实验拓扑结构图R3R2 R1S3S4 S1S2 PC3Fa 0Fa 0Fa 0/4Fa 0/3Fa 0/4Fa 0/3Fa 0/1Fa 0/1Fa 0/5Fa 0/5四.组网概述✓路由器R1启动OSPF路由协议并链接两个网络Fa0连接192.168.1.0 Area 1与Ser0连接192.168.2.0 Area 0,针对Ser 0端口启动认证功能(PPP PAP 认证)。
在Fa0端口启动访问控制功能ACL,允许IP 为192.168.3.1-127的主机访问192.168.1.0网络,但不允许IP为192.168.3.128-254的主机访问。
✓路由器R2 启动OSPF协议及RIP协议,右端Ser0链接192.168.2.0 Area 0 路由协议为OSPF,左端Fa0链接192.168.3.0网络路由协议为RIP2。
✓路由器R3启动RIP协议,上端Fa2连接192.168.3.0网络,左端Fa0连接192.168.4.0网络,右端Fa1链接192.168.5.0网络。
针对Fa0 Fa1为入口Fa3为出口的网络通信启用NAT功能,将来自192.168.10.0网络的源IP地址动态的转换为192.168.3.1-127,来自192.168.20.0网络的源IP地址动态转换为192.168.3.128-254。
✓自R3以下共有两个业务vlan ,为 vlan 10 、vlan 20。
✓S1与S2为三层交换机Fa0/5端口是他们的路由端口,S3与S4为二层交换机。
✓S1 、S2 都分别对两vlan起用两vrrp组,vlan 10的vrrp虚拟IP为192.168.10.254,vlan 20的vrrp 虚拟IP为192.168.20.254实现两组的业务的负载分担和备份。
一、组网需求1、内网有两个路由器连接出口设备2、要求两个路由器做网关备份,要求内网只设置一个网关地址3、要求当两个路由器的上联接口或线路断开后,网络能自动切换,保证网络通畅二、组网拓扑:三、配置要点:1、路由器基本上网配置(参照《上网配置》)2、路由器内网口配置vrrp3、客户机网关地址配置的是虚拟网关四、配置步骤:注意:配置之前建议使用Ruijie#show ip interface brief 查看接口名称,常用接口名称有FastEthernet(百兆)、GigabitEthernet(千兆)和TenGigabitEthernet(万兆)等等,以下配置以百兆接口为例。
路由器R1配置Ruijie>enableRuijie#configure terminalRuijie(config)#interface fastEthernet 0/0Ruijie(config-if-FastEthernet 0/0)#ip address 192.168.1.1 255.255.255.0 ----->配置接口实际ipRuijie(config-if-FastEthernet 0/0)#vrrp 1 ip 192.168.1.254 ----->指定vrrp虚拟地址Ruijie(config-if-FastEthernet 0/0)#vrrp 1 priority 120 ----->指定该接口的vrrp优先级,越大越优先。
默认100Ruijie(config-if-FastEthernet 0/0)#vrrp 1 track FastEthernet 1/0 30 ----->检测上联口f1/0 down掉后优先级降30,切换为备网关Ruijie(config-if-FastEthernet 0/0)#endRuijie#write ------> 确认配置正确,保存配置路由器R2配置Ruijie#configure terminalRuijie(config)#interface fastEthernet 0/0Ruijie(config-if-FastEthernet 0/0)#ip address 192.168.1.2 255.255.255.0Ruijie(config-if-FastEthernet 0/0)#vrrp 1 ip 192.168.1.254Ruijie(config-if-FastEthernet 0/0)#endRuijie#write ------> 确认配置正确,保存配置五、配置验证路由器R1上查看Ruijie#sh vrrp briefInterface Grp Pri timer OwnPre State Master addr GroupaddrFastEthernet 0/0 1 120 3 -P Master 192.168.1.1 192.168.1.254 接口vrrp组优先级保活时间接口地址是是否抢占vrrp状态本地地址虚拟的网关地址否网关地址即vrrp组地址Ruijie#show vrrp 1FastEthernet 0/0 - Group 1State is Master ------>此接口是vrrp主地址Virtual IP address is 192.168.1.254 configured ------->vrrp组ip地址Virtual MAC address is 0000.5e00.0101 ------->vrrp组mac 地址Advertisement interval is 1 sec ------->vrrp 报文发送间隔Preemption is enabled------->vrrp抢占开启min delay is 0 secPriority is 120------->vrrp优先级Master Router is 192.168.1.1 (local), priority is 120 ------->vrrp主地址和优先级Master Advertisement interval is 1 sec------->vrrp主地址的vrrp报文发送间隔Master Down interval is 3 sec------->vrrp主地址的vrrp报文3s没有收到说明vrrp主地址不工作。
vrrp+mstp配置实例1.switch a 、switch b选用两台锐捷的s5750 ;switch c 、shwich d 选2.用锐捷的s3750和s37603.全网共有两个业务vlan ,为vlan 10 、vlan 204.Switch a 、switch b 都分别对两vlan起用两vrrp组,实现两组的业务的负载分担和备份。
5.Switch a、switch b、switch c、switch d 都起用mstp多生成数协议,并且所有设备都属于同一个mst域,且实例映射一致(vlan 10映射实例1、vlan 20映射实例2 其他vlan映射默认实例0)。
6.Vlan 10业务以switch a为根桥;vlan 20业务以switch b为根桥;实现阻断网络环路,并能实现不同vlan数据流负载分担功能。
SW A与SW B配置基本相同第一步:开启生成树MSTP协议第二步:进入生成树配置模式,定义实例,修订号(不理解就当学号),名称(相当于学生名字)第三步:指定实例的优先级第四步:为不同的VLAN划分地址,而且对VLAN的优先级进行设置,以及转换虚拟路由地址SW C 与SW D 配置第一步:开启生成树MSTP协议第二步:进入生成树配置模式,定义实例,修订号(不理解就当学号),名称(相当于学生名字)第三步:指定实例的优先级部分命令如下生成树类spanning-tree 开启生成树(默认为mstp)spanning-tree mst configuration 进入mst配置模式revision 1 指定MST revision number 为1name region1 指定mst配置名称instance 0 vlan 1-9, 11-19, 21-4094 缺省情况下vlan都属于实例0instance 1 vlan 10 手工指定vlan10属于实例1instance 2 vlan 20 手工指定vlan20属于实例2spanning-tree mst 1 priority 0 指定实例1的优先级为0(为根桥)spanning-tree mst 2 priority 4096 指定实例2的优先级为4096VLAN优先级类及转换的IP地址interface VLAN 10 创建vlan 10 svi接口ip address 192.168.10.1 255.255.255.0 配置ip地址vrrp 1 priority 120 配置vrrp组1 优先级为120vrrp 1 ip 192.168.10.254 配置vrrp组1虚拟ip地址为192.168.10.254查看信息show vrrp 查看vrrp 信息show spanning-tree interface gigabitEthernet 0/1 查看g0/1接口stp状态信息链路聚合第一步:F0/23 、F0/24 加入Port-group 1inter range fa 0/23 -24port-group 1第二步:将AG1设为Trunkinter aggregateport 1switchport mode trunk。
mstp加vrrp的实验例子摘要:I.实验背景A.MSTP 介绍B.VRRP 介绍C.MSTP 与VRRP 的结合II.实验目的A.提高网络的可靠性和稳定性B.实现负载均衡C.提高网络的扩展性III.实验环境和工具A.实验环境搭建B.实验工具介绍IV.实验步骤A.配置MSTPB.配置VRRPC.测试和验证V.实验结果与分析A.网络性能测试B.负载均衡测试C.网络稳定性测试VI.结论与展望A.实验结论B.未来发展方向正文:I.实验背景MSTP(Multiple Spanning Tree Protocol,多生成树协议)是一种用于解决以太网环路问题的协议,它可以将多个VLAN 划分为多个生成树,从而避免环路产生。
VRRP(Virtual Router Redundancy Protocol,虚拟路由器冗余协议)是一种用于提高网络可靠性和稳定性的协议,通过将多个路由器组成一个虚拟路由器组,实现路由器的冗余和负载均衡。
本文将介绍如何将MSTP 和VRRP 结合起来,以提高网络的性能和稳定性。
II.实验目的将MSTP 和VRRP 结合的实验主要目的有以下几点:A.提高网络的可靠性和稳定性:通过MSTP 消除以太网环路,保证数据包的正常传输;通过VRRP 实现路由器的冗余,确保网络的持续可用。
B.实现负载均衡:通过VRRP,将流量分担到多个路由器上,从而降低单个路由器的负载,提高整个网络的性能。
C.提高网络的扩展性:MSTP 允许在一个网络中使用多个生成树,使得网络的规模可以得到扩展,而不会引入环路问题。
III.实验环境和工具实验环境搭建如下:A.两台交换机,分别配置MSTP 和VRRP。
B.三台路由器,组成一个虚拟路由器组,并分别配置VRRP。
实验工具介绍:A.思科网络设备,包括交换机和路由器。
B.思科IOS 操作系统。
IV.实验步骤A.配置MSTP:在交换机上创建MST 域,并将各个VLAN 划分为不同的生成树。
mstp加vrrp的实验例子
以下是一个使用MSTP和VRRP的实验例子:
设备1和设备2之间连接了多个交换机,其中设备1运行VRRP,并且是虚拟路由器组的主机,设备2是备用主机。
步骤:
1. 配置设备1上的VRRP:
- 为虚拟路由器组配置一个组ID和虚拟IP地址。
- 设置设备1为虚拟路由器组的主机,优先级较高。
- 配置其他参数,如优先级、优先级降级的阈值等。
2. 配置MSTP:
- 配置多个VLAN,并且将它们绑定到MSTP实例上。
- 在每个交换机上启用MSTP,并设置实例根桥和桥优先级。
- 配置MSTP的端口优先级,用于控制MSTP的选举。
3. 设置MSTP的根桥:
- 在所有交换机上使用根桥优先级来选择根桥。
- 所有其他交换机通过MSTP协议来确定每个VLAN的根桥。
4. 设置VRRP虚拟路由器组的VIP下的MSTP实例的根桥:
- 在虚拟路由器组的VIP所属的MSTP实例上,设置根桥优
先级为最低。
- 这将确保VRRP主机上的MSTP实例被选为根桥。
5. 配置设备2上的VRRP:
- 配置相同的组ID和虚拟IP地址。
- 设置设备2为备用主机。
- 配置优先级较低,以确保设备1成为主机。
6. 测试:
- 断开设备1和设备2之间的连接,观察VRRP主机的切换过程。
- 在交换机上查看MSTP实例的状态,确保根桥已更改,以维持虚拟路由器的正常工作。
通过使用MSTP和VRRP,可以实现对网络中的故障进行快速检测和恢复,提高网络的可靠性和冗余性。
MSTP&VRRP双机热备配置范例1system参数配置system是属于EX交换机基本配置部分,在进行其它配置之前需要先完成该部分内容配置,主要配置工作如下:(1)设置root密码(2)设置主机名(3)设置日期时间(4)添加用户(5)开启ssh/telnet/http服务(6)设置DNS(可选配置)(7)分配新的用户权限(可选配置)(8)设置NTP服务器(可选配置)1.1设置Root密码交换机初始化用户名是root是没有密码的,在进行commit之前必须修改root密码。
1.2设置主机名1.3设置DNS服务器1.4设置日期时间设置命令:1.5设置NTP服务器1.6开启远程Telnet登录服务说明:在默认缺省配置下,EX交换机只是开放了http远程登陆方式,因此如果想通过telnet登陆到交换机上,必须在系统中打开telnet服务。
设置命令:删除命令:1.7开启远程Ftp服务说明:在默认缺省配置下,EX交换机只是开放了http远程登陆方式,因此如果想通过ftp上传文件,例如OS或者配置到交换机上,必须在系统中打开ftp服务。
设置命令:1.8开启远程SSH登陆说明:如果想通过更加安全的ssh登陆到交换机,需要在交换机上打开ssh服务。
设置命令:1.9开启远程HTTP登陆说明:在默认缺省配置下,EX交换机已经开放了http远程登陆方式。
设置命令:删除命令:1.10添加用户2实验环境描述2.1实验拓扑图2.2实验IP规划2.2.1Wan节点2.2.2CoreSW1(EX4200-1)2.2.3CoreSW2(EX4200-2)2.2.4虚拟交换机2.3连接整体描述Wan路由器Ge-0/0/1.0和Ge-0/0/2.0分别下接CoreSW1和CoreSW2的Ge-0/0/23.0 CoreSW1和CoreSW2交换机的Ge-0/0/1.0——Ge-0/0/4.0分别下接L2SW1——L2SW4的Fa0/24和Fa0/23,两交换机的Ge-0/0/8.0和Ge-0/0/9.0互联。
交换机vrrp+mstp配置实例锐捷tac贾文宇一、组网需求1、switch a 、switch b选用两台锐捷的s5750 ;switch c 、shwich d 选用锐捷的s3750和s37602、全网共有两个业务vlan ,为vlan 10 、vlan 203、Switch a 、switch b 都分别对两vlan起用两vrrp组,实现两组的业务的负载分担和备份。
4、Switch a、switch b、switch c、switch d 都起用mstp多生成数协议,并且所有设备都属于同一个mst域,且实例映射一致(vlan 10映射实例1、vlan 20映射实例2 其他vlan映射默认实例0)。
5、Vlan 10业务以switch a为根桥;vlan 20业务以switch b为根桥;实现阻断网络环路,并能实现不同vlan数据流负载分担功能。
二、组网图三、配置步骤Switch a配置:s1#show runBuilding configuration...Current configuration : 1651 bytes!version RGNOS 10.2.00(2), Release(29287)(Tue Dec 25 20:39:14 CST 2007 -ngcf49) hostname s1co-operate enable!!!vlan 1!vlan 10!vlan 20!!no service password-encryption!spanning-tree 开启生成树(默认为mstp)spanning-tree mst configuration 进入mst配置模式revision 1 指定MST revision number 为1name region1 指定mst配置名称instance 0 vlan 1-9, 11-19, 21-4094 缺省情况下vlan都属于实例0instance 1 vlan 10 手工指定vlan10属于实例1instance 2 vlan 20 手工指定vlan20属于实例2spanning-tree mst 1 priority 0 指定实例1的优先级为0(为根桥)spanning-tree mst 2 priority 4096 指定实例2的优先级为4096interface GigabitEthernet 0/1switchport access vlan 10 配置g0/1属于vlan10!interface GigabitEthernet 0/2switchport access vlan 20 配置g0/2属于vlan 20!interface GigabitEthernet 0/3!..interface GigabitEthernet 0/24 设置g0/24为trunk接口且允许vlan10/20通过switchport mode trunkinterface VLAN 10 创建vlan 10 svi接口ip address 192.168.10.1 255.255.255.0 配置ip地址vrrp 1 priority 120 配置vrrp组1 优先级为120vrrp 1 ip 192.168.10.254 配置vrrp组1虚拟ip地址为192.168.10.254!interface VLAN 20 创建vlan 20 svi接口ip address 192.168.20.1 255.255.255.0 配置ip地址vrrp 2 ip 192.168.20.254 配置vrrp组2虚拟ip地址为192.168.20.254默认vrrp组的优先级为100默认不显示!line con 0line vty 0 4logins1#show vlanVLAN Name Status Ports---- -------------------------------- --------- ----------------------------------1 VLAN0001 STATIC Gi0/3, Gi0/4, Gi0/5, Gi0/6Gi0/7, Gi0/8, Gi0/9, Gi0/10Gi0/11, Gi0/12, Gi0/13, Gi0/14Gi0/15, Gi0/16, Gi0/17, Gi0/18Gi0/19, Gi0/20, Gi0/21, Gi0/22Gi0/23, Gi0/2410 VLAN0010 STATIC Gi0/1, Gi0/2420 VLAN0020 STATIC Gi0/2, Gi0/24Switch b配置:s2#show runBuilding configuration...Current configuration : 1607 bytes!version RGNOS 10.2.00(2), Release(27932)(Thu Dec 13 10:32:09 CST 2007 -ngcf31)hostname s2!!!vlan 1!vlan 10!vlan 20!!no service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 4096spanning-tree mst 2 priority 0interface GigabitEthernet 0/1switchport access vlan 10!interface GigabitEthernet 0/2switchport access vlan 20!..interface GigabitEthernet 0/24switchport mode trunk!interface VLAN 10ip address 192.168.10.2 255.255.255.0vrrp 1 ip 192.168.10.254!interface VLAN 20ip address 192.168.20.2 255.255.255.0vrrp 2 priority 120vrrp 2 ip 192.168.20.254!line con 0line vty 0 4login!!ends2#show vlanVLAN Name Status Ports---- -------------------------------- --------- -----------------------------------1 VLAN0001 STATIC Gi0/3, Gi0/4, Gi0/5, Gi0/6Gi0/7, Gi0/8, Gi0/9, Gi0/10Gi0/11, Gi0/12, Gi0/13, Gi0/14Gi0/15, Gi0/16, Gi0/17, Gi0/18Gi0/19, Gi0/20, Gi0/21, Gi0/22Gi0/23, Gi0/2410 VLAN0010 STATIC Gi0/1, Gi0/2420 VLAN0020 STATIC Gi0/2, Gi0/24Switch c配置:s3#show runBuilding configuration...Current configuration : 1540 bytes!version RGNOS 10.2.00(2), Release(28794)(Fri Dec 21 09:27:15 CST 2007 -ngcf32) hostname s3!vlan 1!vlan 10!!service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 0spanning-tree mst 2 priority 4096interface FastEthernet 0/1switchport access vlan 10!interface FastEthernet 0/2switchport access vlan 10!..interface GigabitEthernet 0/25!interface GigabitEthernet 0/26!interface GigabitEthernet 0/27!interface GigabitEthernet 0/28!interface VLAN 10ip address 192.168.10.3 255.255.255.0!ip route 0.0.0.0 0.0.0.0 192.168.10.254!!line con 0line vty 0 4loginSwitch d配置:s4#show runBuilding configuration...Current configuration : 1066 bytes!version RGNOS 10.2.00(2), Release(27932)(Thu Dec 13 10:31:41 CST 2007 -ngcf32)hostname s4!vlan 1!vlan 20!!no service password-encryption!spanning-treespanning-tree mst configurationrevision 1name region1instance 0 vlan 1-9, 11-19, 21-4094instance 1 vlan 10instance 2 vlan 20spanning-tree mst 1 priority 4096spanning-tree mst 2 priority 0interface GigabitEthernet 0/1switchport access vlan 20!interface GigabitEthernet 0/2switchport access vlan 20!..interface GigabitEthernet 0/12!interface VLAN 20ip address 192.168.20.3 255.255.255.0!!!!ip route 0.0.0.0 0.0.0.0 192.168.20.254!!line con 0line vty 0 4login!四、查看vrrp、mstp信息Switch a 信息:s1#show vrrp 查看vrrp 信息VLAN 10 - Group 1State is MasterVirtual IP address is 192.168.10.254 configured Virtual MAC address is 0000.5e00.0101 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 120Master Router is 192.168.10.1 (local), priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secVLAN 20 - Group 2State is BackupVirtual IP address is 192.168.20.254 configured Virtual MAC address is 0000.5e00.0102 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 100Master Router is 192.168.20.2 , priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secs1#s1#s1#s1#show spanning-tree interface gigabitEthernet 0/1 查看g0/1接口stp状态信息PortAdminPortFast : DisabledPortOperPortFast : DisabledPortAdminAutoEdge : EnabledPortOperAutoEdge : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :8000.00d0.f836.ed70PortDesignatedPort : 8001PortForwardTransitions : 6PortAdminPathCost : 200000PortOperPathCost : 200000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f823.ef82PortDesignatedPort : 8001PortForwardTransitions : 5PortAdminPathCost : 200000PortOperPathCost : 200000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :1002.00d0.f836.ed70PortDesignatedPort : 8001PortForwardTransitions : 4PortAdminPathCost : 200000PortOperPathCost : 200000PortRole : designatedPorts1#s1#s1#show spanning-tree interface gigabitEthernet 0/2 查看g0/2接口stp状态信息PortAdminPortFast : DisabledPortOperPortFast : DisabledPortAdminAutoEdge : EnabledPortOperAutoEdge : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :8000.00d0.f836.ed70PortDesignatedPort : 8002PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70PortDesignatedPort : 8002PortForwardTransitions : 4PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : discardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :0002.00d0.f8d7.ae12PortDesignatedPort : 8002PortForwardTransitions : 3PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : alternatePorts1#s1#s1#show spanning-tree interface gigabitEthernet 0/24 g0/24接口stp状态信息PortAdminPortFast : DisabledPortOperPortFast : DisabledPortAdminAutoEdge : EnabledPortOperAutoEdge : DisabledPortAdminLinkType : autoPortOperLinkType : point-to-pointPortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0PortDesignatedCost : 0PortDesignatedBridge :8000.001a.a909.8fe0PortDesignatedPort : 8018PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : rootPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70PortDesignatedPort : 8018PortForwardTransitions : 5PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 4PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : rootPorts1#Switch b 信息:s2#show vrrpVLAN 10 - Group 1State is BackupVirtual IP address is 192.168.10.254 configured Virtual MAC address is 0000.5e00.0101 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 100Master Router is 192.168.10.1 , priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secVLAN 20 - Group 2State is MasterVirtual IP address is 192.168.20.254 configured Virtual MAC address is 0000.5e00.0102 Advertisement interval is 1 secPreemption is enabledmin delay is 0 secPriority is 120Master Router is 192.168.20.2 (local), priority is 120 Master Advertisement interval is 1 secMaster Down interval is 3 secs2#s2#s2#s2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/1 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPorts2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :1001.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPorts2#s2#s2#s2#s2#show spanning-tree interface gigabitEthernet 0/24 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 1PortAdminPathCost : 20000PortOperPathCost : 20000PortRole : designatedPort###### MST 1 vlans mapped :10PortState : discardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0PortDesignatedBridge :0001.00d0.f836.ed70PortDesignatedPort : 8018 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : alternatePort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8018 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPorts2#Switch c 信息:s3#show spanning-tree interface fastEthernet 0/1 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : discardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : alternatePort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : discardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :1002.00d0.f836.ed70 PortDesignatedPort : 8001 PortForwardTransitions : 0 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : alternatePorts3#s3#s3#s3#s3#show spanning-tree interface fastEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f823.ef82 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : designatedPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8001 PortForwardTransitions : 1 PortAdminPathCost : 200000 PortOperPathCost : 200000PortRole : rootPorts3#Switch d 信息:s4#show spanning-tree interface gigabitEthernet 0/1 PortAdminPortFast : Disabled PortOperPortFast : Disabled PortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : autoPortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : forwardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPort###### MST 1 vlans mapped :10PortState : discardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :1001.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : alternatePort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.001a.a909.8fe0 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPorts4#s4#s4#s4#show spanning-tree interface gigabitEthernet 0/2 PortAdminPortFast : Disabled PortOperPortFast : DisabledPortAdminAutoEdge : Enabled PortOperAutoEdge : Disabled PortAdminLinkType : auto PortOperLinkType : point-to-point PortBPDUGuard : DisabledPortBPDUFilter : Disabled###### MST 0 vlans mapped :1-9, 11-19, 21-4094 PortState : discardingPortPriority : 128PortDesignatedRoot : 8000.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :8000.00d0.f836.ed70 PortDesignatedPort : 8002 PortForwardTransitions : 1 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : alternatePort###### MST 1 vlans mapped :10PortState : forwardingPortPriority : 128PortDesignatedRoot : 0001.00d0.f823.ef82 PortDesignatedCost : 0 PortDesignatedBridge :0001.00d0.f836.ed70 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : rootPort###### MST 2 vlans mapped :20PortState : forwardingPortPriority : 128PortDesignatedRoot : 0002.001a.a909.8fe0 PortDesignatedCost : 0 PortDesignatedBridge :0002.00d0.f8d7.ae12 PortDesignatedPort : 8002 PortForwardTransitions : 2 PortAdminPathCost : 20000 PortOperPathCost : 20000PortRole : designatedPorts4#FAQ:1.1 RSTP和MSTP配合为什么有问题1.1.1 原因分析由于RSTP/MSTP的指定端口快速迁移机制,即接收到下游的agreement报文才能进行快速迁移。