mstp+vrrp+ospf+策略路由实验
mstp加vrrp的实验例子

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。
VRRP、HSRP和MSTP、SLA综合实验

SW1
SW3
pc1
Vlan10
vlan20
Vlan10
SW4 vlan20
pc2 192.168.20.100
一、 HSRP 和 VRRP 的配置
可以使用HSRP 这里先介绍HSRP 可以使用HSRP或者 HSRP或者 VRRP 来实现网关的冗余, 来实现网关的冗余, 这里先介绍HSRP的配置 HSRP的配置: 的配置:பைடு நூலகம்HSRP的配置如下 HSRP的配置如下: 的配置如下:
SW2
SW1
SW3
pc1
Vlan10
vlan20
Vlan10
SW4 vlan20
pc2 192.168.20.100
再看 R2 路由表:
很显然不管是去 vlan10 还是 vlan20 的数据都走 SW2 了,到底能不能行的通还得继续尝 试,我弱弱的估计这样应该会出问题的
果不其然,如我所料,PC2 可以通,但 PC1 无法 ping 通,问题出在哪了 原因很简单,因为上行 PC1 发出的数据包先交给 SW1,SW1 根据路由表中的提示将包 再交给 SW2,此时 SW2 一看源地址是 vlan10 网段的便果断的交还给 SW1 如此往复便出现 死循环了,自然就通不了了,但下行链路则不受影响,R2 将数据包交给 SW2,SW2 他也很
sw2 10.250 SW1
192.1.1.0/30 192.168.10.0 SW1 194.1.1.0/30 SW2
Vlan 10 ip:192.168.10.253 Vlan 20 ip:192.168.20.254 Vrrp 1 ip 192.168.10.250 Vrrp 1 priority 110 Vrrp 2 ip 192.168.20.250 Vrrp 2 priority 120 Vrrp2 preempt
VRRP(负载-备份)-mstp-dhcp-ospf-md5验证-链路聚合

VRRP(负载+备份)+mstp+dhcp+ospf-md5验证+链路聚合实验配置全过程(作者:yuxi-xusiyou)实验拓扑图:配置过程:【RA:router ospf 1network 192.168.40.0 0.0.0.3 area 0network 192.168.40.8 0.0.0.3 area 0 OSPF的MD5验证:interface FastEthernet0/0ip address 192.168.40.2 255.255.255.252 ip ospf authentication message-digest ip ospf message-digest-key 1 md5 ccit 具体的VRRP配置:vrrp 1 ip 192.168.40.2interface FastEthernet0/1ip address 192.168.40.9 255.255.255.252 ip ospf authentication message-digest ip ospf message-digest-key 1 md5 ccit 具体的VRRP配置:vrrp 2 ip 192.168.40.13】【RB:router ospf 1network 192.168.40.4 0.0.0.3 area 0network 192.168.40.12 0.0.0.3 area 0 OSPF的MD5验证:interface FastEthernet0/0ip address 192.168.40.6 255.255.255.252 ip ospf authentication message-digest ip ospf message-digest-key 1 md5 ccit 具体的VRRP配置:vrrp 1 ip 192.168.40.2OSPF的MD5验证:interface FastEthernet0/1ip address 192.168.40.13 255.255.255.252 ip ospf authentication message-digestip ospf message-digest-key 1 md5 ccit具体的VRRP配置:vrrp 2 ip 192.168.40.13】【SA:ip routing (启用三层交换功能)router ospf 1network 192.168.10.0 0.0.0.255 area 0network 192.168.20.0 0.0.0.255 area 0network 192.168.30.0 0.0.0.255 area 0network 192.168.40.0 0.0.0.3 area 0network 192.168.40.4 0.0.0.3 area 0OSPF的md5验证:interface GigabitEthernet0/22no switchportip address 192.168.40.1 255.255.255.252 ip ospf authentication message-digestip ospf message-digest-key 1 md5 ccitinterface GigabitEthernet0/24no switchportip address 192.168.40.5 255.255.255.252 ip ospf authentication message-digestip ospf message-digest-key 1 md5 ccit配置VRRP实现冗余备份:interface Vlan10ip address 192.168.10.254 255.255.255.0 standby 1 ip 192.168.10.251interface Vlan20ip address 192.168.20.254 255.255.255.0 standby 1 ip 192.168.20.251interface Vlan30ip address 192.168.30.254 255.255.255.0 standby 1 ip 192.168.30.251【若要实现负载分担的同时,实现备份,则:Standby 1 ip 192.168.11.251 priorty 10 Standby 2 ip 192.168.20.251 priorty 100Standby 3 ip 192.168.30.251 】链路聚合:创建聚合:1,并封装为trunk端口类型:interface Port-channel1switchport trunk encapsulation dot1qswitchport mode trunk(注:几乎所有的三层交换机在封装trunk类型端口是都须添加switchport trunk encapsulation dot1q 命令)进入接口模式,封装trunk端口,并加入聚合组1:interface GigabitEthernet0/20switchport trunk encapsulation dot1qswitchport mode trunkspeed 100duplex fullchannel-group 1 mode oninterface GigabitEthernet0/21switchport trunk encapsulation dot1qswitchport mode trunkspeed 100duplex fullchannel-group 1 mode on(注:添加局和端口时必须要设定speed 100 最大速度,duplex full 全双工模式)设置f0/23为trunk端口类型:interface GigabitEthernet0/23switchport trunk encapsulation dot1qswitchport mode trunk在交换机上启用dhcp服务,使得SwitchA为vlan 10提供动态ip 地址:service dhcpip dhcp excluded-address 192.168.10.250 192.168.10.254ip dhcp pool vlan10network 192.168.10.0 255.255.255.0default-router 192.168.10.251配置实例10、20,并分别添加vlan 10和vlan 20;实现负载分担和备份功能,使得vlan10的数据以SA为主路线。
VRRP+MSTP配置案例

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。
校园网双核心(MSTP+VRRP)的拓扑实现和配置实例

VRRP技术概述(cont.)
VRRP是一种容错协议,它保证当主机的下一跳路由器失 效时,可以及时的由另一台路由器来替代,从而保持通讯 的连续性和可靠性。 为了使VRRP工作,要在路由器上配置虚拟路由器号和虚 拟IP地址,同时会产生一个虚拟MAC(00-00-5E-00-01[VRID])地址,这样在这个网络中就加入了一个虚拟路由 器。 一个虚拟路由器由一个主路由器和若干个备份路由器组成, 主路由器实现真正的转发功能。当主路由器出现故障时, 一个备份路由器将成为新的主路由器,接替它的工作。
VRRP组规划
表三 VRRP组规划 组规划 用途 生产用户VLAN 生产用户VLAN OA用户 用户VLAN 用户 OA服务器 服务器VLAN 服务器 视频会议VLAN 视频会议 交换机管理VLAN 交换机管理 互连网段VLAN 互连网段 VRRP组地址 1-10 11-20 21-30 31-40 99 100
!将vlan10、30放入实例1中 每个实例都会生成一个独立的生成树
RG-S21A(config-mst)#revision 1 !配置多生成树的版本号 RG-S21A(config-mst)#instance 2 vlan 20,40
!将vlan20、40放入实例2中
RG-S21A(config-mst)#revision 1 RG-S21A(config-mst)#exit
A vlan1ห้องสมุดไป่ตู้
CST
C vlan2
MST region 1
MST region 2 vlan2
vlan1 B D
提纲
MSTP技术概述 VRRP技术概述 校园网双核心(MSTP+VRRP)的拓扑实现 校园网双核心(MSTP+VRRP)的配置实例 MSTP+VRRP 注意事项
自己做的关于vrrp,mst功能

拓扑图:路由器和三层交换机通过网络层传输品字形连接,三层交换机和二层交换机通过链路层传输交叉连接。
路由器与外网通过串口连接。
配置:R4:外网只配置时钟速率和ip地址。
不加任何路由条目,与现实环境中相符。
R1:配置IP地址配置NAT,将内网所有IP全部转换成预设公网IP(123.123.123.123)内网中的不同网络号均变成不同端口号,因此一个公网IP就可以保证所有主机均可以与外网相连。
配置OSPF协议,与三层交换机路由条目动态联系,并且可以快速确定各设备是否出现问题。
一条默认路由指向外网,并且通过ospf传递给自治域内的设备。
设置该路由器为DR,域内设备管理信息传输通过该路由器。
SW31&SW32:配置IP地址f0/4设置成三层端口与路由器相连在172.16.1.0网段四个vlan都分别设置网段,方便管理、制定策略。
配置vrrp虚拟路由器冗余协议使得两个设备在逻辑上成为一个设备并使用.254地址。
根据优先级不同,不同vlan的包通过的交换机不同,奇数vlan会通过sw1传到外网,偶数vlan则通过sw2。
而当任意一个设备出现问题时,包会自动传给另一个路由器,修好后自动恢复。
下层交换机间使用多生成树(multiple spanning tree)协议,把奇数vlan和偶数vlan分成两个组,根据分组不同拓扑图会不同,防止形成环造成广播风暴。
两台机器间用以太通道链接,保证高速高可靠性。
SW21&SW22:划分vlan,并把端口划入vlan中使用多生成树功能介绍:这个拓扑中比较复杂的技术为:vrrp,MST,NA T。
1.VRRP功能介绍:虚拟路由器冗余协议(VRRP)是一种选择协议,它可以把一个虚拟路由器的责任动态分配到局域网上的VRRP 路由器中的一台。
控制虚拟路由器IP 地址的VRRP 路由器称为主路由器,它负责转发数据包到这些虚拟IP 地址。
一旦主路由器不可用,这种选择过程就提供了动态的故障转移机制,这就允许虚拟路由器的IP 地址可以作为终端主机的默认第一跳路由器。
mstp加vrrp的实验例子

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 的方法在空间定位和导航方面的准确性和实用性。
VRRP+MSTP+OSPF实验

VRRP+MSTP+OSPF实验VRRP+MSTP实验要求:1.client1属于VLAN2(192.168.1.1/24)client2属于VLAN3 (192.168.2.1/24)2.SW1SW2 SW3运行MSTP+VRRP,SW1作为1.0的根桥(同时作为网关VRRP为MASTER)SW2作为2.0 的根桥(同时作为网关VRRP为MASTER)3.SW1SW2之间链路聚合4.用R1的两个环回口模拟OABOSS服务器IP分别为1.1.1.1,2.2.2.25.client1选择SW1到OABOSS ,client2选择SW2到OABOSS6.SW1SW2 AR1之间运行OSPF协议7.在AR1上起两个环回口模拟OABOSS服务器8.CLIENT1和CLIENT2能相互通信并且二者都可以和OABOSS服务器通信配置如下:AR1:interface GigabitEthernet0/0/0ip address 172.16.1.2 255.255.255.0#interface GigabitEthernet0/0/1ip address 172.16.2.2 255.255.255.0#interface LoopBack0ip address 1.1.1.1 255.255.255.255//模拟OA网#interface LoopBack1ip address 2.2.2.2 255.255.255.255//模拟BOSS网# ospf 1area 0.0.0.0network 1.1.1.1 0.0.0.0network 2.2.2.2 0.0.0.0network 172.16.1.2 0.0.0.0network 172.16.2.2 0.0.0.0#SW1:vlan batch 2 to 3 20#stp instance 1 root primarystp instance 2 root secondary#stp region-configurationregion-name xxinstance 1 vlan 2instance 2 vlan 3active region-configuration#interface Vlanif2ip address 192.168.1.251 255.255.255.0 vrrpvrid 1 virtual-ip 192.168.1.254 vrrpvrid 1 priority 120#interface Vlanif3ip address 192.168.2.251 255.255.255.0 vrrpvrid 2 virtual-ip 192.168.2.254#interface Vlanif20ip address 172.16.1.1 255.255.255.0#interface Eth-Trunk0port link-type trunkport trunk allow-pass vlan 2 to 3#interface GigabitEthernet0/0/1port link-type accessport default vlan 20#interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 2 to 3#interface GigabitEthernet0/0/23eth-trunk 0#interface GigabitEthernet0/0/24eth-trunk 0#interface NULL0#ospf 1area 0.0.0.0network 192.168.1.251 0.0.0.0network 192.168.2.251 0.0.0.0network 172.16.1.1 0.0.0.0#SW2:vlan batch 2 to 3 30#stp instance 1 root secondarystp instance 2 root primary#stp region-configurationregion-name xxinstance 1 vlan 2instance 2 vlan 3active region-configuration#interface Vlanif2ip address 192.168.1.252 255.255.255.0 vrrpvrid 1 virtual-ip 192.168.1.254#interface Vlanif3ip address 192.168.2.252 255.255.255.0 vrrpvrid 2 virtual-ip 192.168.2.254 vrrpvrid 2 priority 120#interface Vlanif30ip address 172.16.2.1 255.255.255.0 #interface Eth-Trunk0port link-type trunkport trunk allow-pass vlan 2 to 3 #interface GigabitEthernet0/0/1 port link-type accessport default vlan 30#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3 port link-type trunkport trunk allow-pass vlan 2 to 3 #interface GigabitEthernet0/0/23 eth-trunk 0#interface GigabitEthernet0/0/24 eth-trunk 0#ospf 1area 0.0.0.0network 192.168.1.252 0.0.0.0 network 192.168.2.252 0.0.0.0 network 172.16.2.1 0.0.0.0#SW3:vlan batch 2 to 3#stp converge fast#stp region-configuration region-name xxinstance 1 vlan 2instance 2 vlan 3active region-configuration#interface GigabitEthernet0/0/1 port link-type accessport default vlan 2stp edged-port enable#interface GigabitEthernet0/0/2 port link-type trunkport trunk allow-pass vlan 2 to 3 stp instance 2 cost 200000#interface GigabitEthernet0/0/3 port link-type trunkport trunk allow-pass vlan 2 to3 stp instance 1 cost 200000#interface GigabitEthernet0/0/4 port link-type accessport default vlan 3stp edged-port enable#disstp bMSTID Port Role STP State Protection0 GigabitEthernet0/0/1 DESI FORWARDING NONE 0 GigabitEthernet0/0/2 ROOT FORWARDING NONE 0 GigabitEthernet0/0/3 ALTE DISCARDING NONE0 GigabitEthernet0/0/4 DESI FORWARDING NONE1 GigabitEthernet0/0/1 DESI FORWARDING NONE 1 GigabitEthernet0/0/2 ROOT FORWARDING NONE1 GigabitEthernet0/0/3 ALTE DISCARDING NONE2 GigabitEthernet0/0/2 ALTE DISCARDING NONE 2 GigabitEthernet0/0/3 ROOT FORWARDING NONE 2 GigabitEthernet0/0/4 DESI FORWARDING NONE。
双核心(MSTP+VRRP)的拓扑实现和配置实例

双核心(MSTP+VRRP)的拓扑实现和配置实例1 配置VRRP在实验拓扑图中,由于有多条链路产生环路,所以我们在实验初始时一定要将某些端口堵塞(初始化时已将RG-S35B的f0/1-4四个端口堵塞,在配置完毕进行测试时才可以打开).否则产生环路后,会发现设备的cpu利用率会达到100%(使用命令show cpu查看)。
RG-S35A(config)#interface vlan 10RG-S35A(config-if)#ip address 192.168.10.254 255.255.255.0 !配置VLAN10的IP 地址RG-S35A(config-if)#standby 1 ip 192.168.10.250 !配置虚拟IPRG-S35A(config-if)#standby 1 preempt!设为抢占模式RG-S35A(config-if)#standby 1 priority 254 !VLAN10的standby优先级设为254RG-S35A(config-if)#exitRG-S35A(config)#interface vlan 20 !VLAN20的standby不设优先级,默认为100RG-S35A(config-if)#ip address 192.168.20.253 255.255.255.0 !配置VLAN20的IP 地址RG-S35A(config-if)#standby 2 ip 192.168.20.250 !配置虚拟IPRG-S35A(config-if)#standby 2 preempt !设为抢占模式RG-S35A(config-if)#exitRG-S35A(config)#interface vlan 30RG-S35A(config-if)#ip address 192.168.30.254 255.255.255.0 !配置VLAN30的IP 地址RG-S35A(config-if)#standby 3 ip 192.168.30.250 !配置虚拟IPRG-S35A(config-if)#standby 3 preempt !设为抢占模式RG-S35A(config-if)#standby 3 priority 254 !VLAN30的standby优先级设为254RG-S35A(config-if)#exitRG-S35A(config)#interface vlan 40 !VLAN20的standby不设优先级,默认为100RG-S35A(config-if)#ip address 192.168.40.253 255.255.255.0 !配置VLAN40的IP 地址RG-S35A(config-if)#standby 4 ip 192.168.40.250 !配置虚拟IPRG-S35A(config-if)#stand 4 preempt !设为抢占模式RG-S35A(config-if)#exitRG-S35A(config)#exitRG-S35B把vlan20 40 设置为standby 2、4 priority 2542 配置RG-S35A与RG-S35B的端口聚合理论上,35A和35B的f0/3和f0/4端口不需要设置为trunk口,但是我们习惯上都设为trunk(已在前面做好了配置)。
MSTP+VRRP实验指导书

实验1 MSTP+VRRP实验指导1.1 实验内容与目标完成本实验,您应该能够:●掌握MSTP的最佳配置方法;●掌握VRRP与MSTP配合时的要点。
1.2 实验组网图图1-1实验组网实验组网如图1-1所示。
核心交换机CS为S9500E或者S12500,接入交换机SW为S5800,接入PC的网关设置在核心上,启用MSTP+VRRP,使得S5800的两上行端口流量能分担。
1.3 背景需求此实验环境是服务器接入的最经典的场景。
1.4 实验设备和器材本实验所需之主要设备器材如表1-1所示。
表1-1实验设备和器材1.5 实验过程实验任务一:MSTP+VRRP实验步骤一:MSTP相关配置1、创建VLAN11-50;2、配置奇数VLAN对应实例的主根为CS-1,备根为CS-2;配置偶数VLAN对应实例的主根为CS-2;备根为CS-1;3、SW-1和SW-2连接PC端口配置边缘端口和bpdu保护功能。
请给出满足要求的最终的配置,并收集各设备的STP状态。
步骤二:VRRP相关配置1、创建两个VRRP组;组1对应VLAN11,组2对应VLAN12;2、配置VRRP组中设备的主备角色与步骤一中MSTP主备根一致(配置两个VLAN即可)2、配置VRRP 监控上行链路;3、配置BFD for VRRP实现主备快速切换;4、在Master设备上配置抢占延时。
请给出满足要求的最终配置。
实验1 MSTP+VRRP实验指导 .................................................................................................................. - 1 -1.1实验内容与目标 (1)1.2实验组网图 (1)1.3背景需求 (1)1.4实验设备和器材 (2)1.5实验过程 (2)实验任务一:MSTP+VRRP实验..................................................................................................... - 2 -步骤一:MSTP相关配置 ............................................................................................................................ - 2 -步骤二:VRRP相关配置............................................................................................................................. - 2 -。
MSTP+vrrp实验报告-计算机网络

实验报告学号 1409040147 姓名 刘丽 课堂号 B0900630 实验日期 2016.12.20 同组人谢文霞、赖晓央、涂智潇指导教师刘琪实验一、MSTP一、实验目的和要求在接入层和汇聚层交换机上配置MSTP 并进行验证。
二、实验规划1. 实验背景传统的生成树协议是基于整个交换网络产生一个树形拓扑结构,所有的VLAN 都共享一个生成树,这种结构不能进行网络流量的负载均衡,是的有些交换设备比较繁忙,而另一些设备又很空闲。
为了克服这个问题,决定采用基于VLAN 的多生成树协议MSTP 。
现在要在交换机上做适当配置来完成这一任务。
S2126-1与S2126-2上的VLAN 配置不同,现在我们希望在任意一台交换机上都可以识别并传递相应VLAN 的信息。
请用GVRP 来解决这个问题。
同时自行设计修剪方式。
2. 实验设备锐捷S2126和S3550交换机,数据线若干。
3. 实验拓扑三、实验步骤与实验内容步骤一:配置接入层交换机S2126-1S2126-1 (config)#spanning-tree !开启生成树S2126-1 (config)#spanning-tree mode mstp !配置生成树模式为MSTPS3550S2126-2S2126-1F0/20F0/20 F0/10F0/10F0/20VLAN 10VLAN 20VLAN 30VLAN 10F0/10Join timer 200msLeave timer 600msLeaveall timer 1000ms查看GVRP的配置信息Switch#show gvrp configuration查看GVRP的运行状态switch#show gvrp status查看GVRP的端口统计信息Switch#show gvrp statistics { interface-id | all}四、结果验证验证测试:验证MSTP配置S2126-1#show spanning-tree mst configuration !显示MSTP全局配置验证测试:验证MSTP配置S2126-2#show spanning-tree mst configuration验证测试:验证MSTP配置S3550-A#show spanning-tree mst configuration验证交换机配置:S3550-A#show spanning-tree mst 1 !显示交换机S3550-A上实例1的特性S2126-1#show spanning-tree mst 1 !显示交换机S2126-1上实例1的特性S2126-1#show spanning-tree mst 2 !显示交换机S2126-1上实例2的特性4、IP地址规划设备名接口IP地址子网掩码S3550-1VLAN10192.168.10.1255.255.255.0VLAN20192.168.20.1255.255.255.0 S3550-2VLAN10192.168.10.2255.255.255.0VLAN20192.168.20.2255.255.255.0 R2624F0/1192.168.1.2 255.255.255.0F0/2192.168.1.6255.255.255.0Loopback1 1.1.1.1255.255.255.0F0172.26.10.200255.255.255.0F1172.26.30.200255.255.255.0 S2126S0200.20.20.21255.255.255.0Loopback2 2.2.2.2255.255.255.0三、实验内容S3550-1的配置:interface vlan 10ip add 192.168.10.1 255.255.255.0no shutdowninterface vlan 20ip add 192.168.20.1router ripversion 2no auto-summary network 192.168.10.0 network 192.168.20.0interface vlan 10standby 1 ip 192.168.10.254 standby 1 priority 120 interface vlan 20standby 2 ip 192.168.20.254S3550-2的配置:no shutdowninterface vlan 10ip add 192.168.10.2 255.255.255.0 no shutdowninterface vlan 20ip add 192.168.20.2 255.255.255.0 no shutdownrouter ripversion 2no auto-summarynetwork 192.168.10.0network 192.168.20.0interface vlan 10standby 1 ip 192.168.10.254 interface vlan 20standby 2 ip 192.168.20.254 standby 2 priority 120S2126的配置:show runvlan1PC1和PC2ping自己的网关,请问是否可以ping通?答:可以ping通,结果如下:在PC1和PC2上的cmd窗口中分别执行命令:route print,查看一下它们各自的网关是谁!在相关设备上分别:Show vrrp [brief]Show vrrp interfaceR2624配置:五、回答问题:什么情况下使用VRRP?什么是VRRP的负载均衡?答:虚拟路由冗余协议(Virtual Router Redundancy Protocol,简称VRRP)是由IETF提出的解决局域网中配置静态网关出现单点失效现象的路由协议,1998年已推出正式的2. 实验设备S3550,路由器,两个交换机。
Mstp+Vrrp 实验

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

VRRP+MSTP+OSPF+PPP试验1.所需设备3台路由器R1、R2、R3,2台三层交换机S1、S2,两台二层交换机S3、S4,PC机5台,交叉线直连线各若干,DCE-DTE串行线一条。
2.拓扑结构图3.组网路由器R1启动OSPF路由协议并链接两个网络F0连接192.168.1.0 Area 1与S0连接192.168.2.0 Area 0,针对S0端口启动PPP PAP 认证。
在F0端口启动ACL,允许IP为192.168.3.1-127的主机访问192.168.1.0网络,但不允许IP为192.168.3.128-254的主机访问。
ü路由器R2 启动OSPF协议及RIP协议,右端S0/1链接192.168.2.0 Area 0 路由协议为OSPF,左端F0链接192.168.3.0网络路由协议为RIP2。
ü路由器R3启动RIP协议,上端F0/2连接192.168.3.0网络,左端F0/0连接192.168.4.0网络,右端F0/1链接192.168.5.0网络。
针对F0/0、F0/1为入口F3为出口的网络通信启用NAT功能,将来自192.168.10.0网络的源IP地址动态的转换为192.168.3.1-127,来自192.168.20.0网络的源IP地址动态转换为192.168.3.128-254。
üR3下有vlan 10 、vlan 20。
üS1 、S2 都分别对两vlan起用vrrp组,vlan 10的vrrp虚拟IP为192.168.10.254,vlan 20的vrrp虚拟IP为192.168.20.254实现两组的业务的负载分担和备份。
üS1、S2、S3、S4 都起用mstp多生成数协议,并且实例映射一致(vlan 10映射实例1、vlan 20映射实例2 其他vlan映射默认实例0)。
üVlan 10以S1为根桥;vlan 20以S2为根桥;实现阻断网络环路,并能实现不同vlan数据流负载分担功能。
dhcp+mstp+vrrp实验

dhcp+mstp+vrrp实验一、VLAN配置SW3配置sy sw3un in envlan batch 10 20 30 40interface g0/0/3port link-type accessport default vlan 10qinterface g0/0/4port link-type accessport default vlan 20SW4配置sy sw4un in envlan batch 10 20 30 40interface g0/0/3port link-type accessport default vlan 30qinterface g0/0/4port link-type accessport default vlan 40q二、Trunk配置SW3配置interface g0/0/1port link-type trunkport trunk allow-pass vlan 10 20interface g0/0/2port link-type trunkport trunk allow-pass vlan 10 20SW4配置interface g0/0/1port link-type trunkport trunk allow-pass vlan 30 40qinterface g0/0/2port link-type trunkport trunk allow-pass vlan 30 40q三、链路聚合SW1和SW2之间我们用两根网线,做成链路聚合。
SW1配置[hxsw1]int Eth-Trunk 1[hxsw1-Eth-Trunk1]mode lacp-static[hxsw1-Eth-Trunk1]trunkport g0/0/2[hxsw1-Eth-Trunk1]trunkport g0/0/3SW2配置[hxsw2]int Eth-Trunk 1[hxsw2-Eth-Trunk1]mode lacp-static[hxsw2-Eth-Trunk1]trunkport g0/0/1[hxsw2-Eth-Trunk1]trunkport g0/0/3[hxsw2-Eth-Trunk1]配置trunk,允许所有vlan通过sw1[sw1]int Eth-Trunk 1[sw1-Eth-Trunk1]port link-type trunk[sw1-Eth-Trunk1]port trunk allow-pass vlan 10 20 30 40Sw2[sw2]int Eth-Trunk 1[sw2-Eth-Trunk1]port link-type trunk[sw2-Eth-Trunk1]port trunk allow-pass vlan 10 20 30 40四、MSTP配置公共配置以下步骤必须在所有的有冗余的交换机上做,stp region-configurationregion-name pokes01 #域名pokes01revision-level 1 #修订好统一为1instance 1 vlan 10 20 #将vlan10/20映射到实例1里面instance 2 vlan 30 40active region-configuration #激活才能生效qSW1配置[sw1]stp instance 1 root primary #将SW1作为实例1的根桥[sw1]stp instance 2 root secondary #将SW1作为实例2的备份根桥SW2配置[sw2]stp instance 1 root secondary[sw2]stp instance 2 root primary五、VRRP配置sw1配置interface Vlanif10ip address 192.168.10.253 255.255.255.0 vrrp vrid 10 virtual-ip 192.168.10.1vrrp vrid 10 priority 120interface Vlanif20ip address 192.168.20.253 255.255.255.0 vrrp vrid 20 virtual-ip 192.168.20.1vrrp vrid 20 priority 120interface Vlanif30ip address 192.168.30.253 255.255.255.0 vrrp vrid 30 virtual-ip 192.168.30.1interface Vlanif40ip address 192.168.40.253 255.255.255.0 vrrp vrid 40 virtual-ip 192.168.40.1sw2配置interface Vlanif10ip address 192.168.10.254 255.255.255.0 vrrp vrid 10 virtual-ip 192.168.10.1interface Vlanif20ip address 192.168.20.254 255.255.255.0 vrrp vrid 20 virtual-ip 192.168.20.1interface Vlanif30ip address 192.168.30.254 255.255.255.0 vrrp vrid 30 virtual-ip 192.168.30.1vrrp vrid 30 priority 120interface Vlanif40ip address 192.168.40.254 255.255.255.0 vrrp vrid 40 virtual-ip 192.168.40.1vrrp vrid 40 priority 120六、DHCP配置以下步骤在sw1、sw2一样[sw1]dhcp enable[sw1]ip pool vlan_10 #创建地址池[sw1]network 192.168.10.0 mask 24[sw1]gateway-list 192.168.10.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 10[sw1-Vlanif10]dhcp select global[sw1]ip pool vlan_20 #创建地址池[sw1]network 192.168.20.0 mask 24[sw1]gateway-list 192.168.20.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 20[sw1-Vlanif10]dhcp select global[sw1]ip pool vlan_30 #创建地址池[sw1]network 192.168.30.0 mask 24[sw1]gateway-list 192.168.30.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 30[sw1-Vlanif10]dhcp select global[sw1]ip pool vlan_40 #创建地址池[sw1]network 192.168.40.0 mask 24[sw1]gateway-list 192.168.40.254 #创建网关[sw1]dns-list 223.5.5.5 #创建dns[sw1-Vlanif10]int Vlanif 40[sw1-Vlanif10]dhcp select global。
ospf+VRRP+mstp综合实验

一、实验拓扑图 (3)1. 拓扑图 (3)2. 拓扑图介绍 (3)1) 设备型号 (3)2) 环回接口 (3)二、需求分析 (4)3. 用户需求 (4)4. 详细分析 (4)三、解决方案 (5)1. 二层链路冗余 (5)2. 网关冗余备份 (5)3. OSPF路由 (5)4. 重发布技术 (5)四、配置脚本 (6)1. 2628-1 (6)2. 2628-2 (6)3. S3760-1 (6)4. S3760-2 (6)5. RSR-2014 (6)6. RSR-2004 (6)一、实验拓扑图1.拓扑图本实验根据拓扑图实施,如图1.1所示。
图1.1 设备拓扑图2.拓扑图介绍1)设备型号图中有2个2层交换机S2628,2个三层交换机S3760E,2个路由器分别为RSR-2014,RSR-2004.2)环回接口RSR-2014中有3个环回口RSR-2004有5个环回接口。
二、需求分析3.用户需求1)按照网络结构组建拓扑图。
在S2628-1和S2628-2上有9个vlan,vlan2-5在实例2,vlan6-10在实例3中。
S3760-1为实例2的主根实例3的备份根,S3760-2为实例1的主根2的备份根。
2)使用vrrp协议,S3760-1为vlan2-5的主网关vlan6-10的备份网关。
S3760-2为vlan6-10的主网关。
Vlan2-5的备份网关,使用端口追踪,使两台S3760跟踪上联接口状态,当丢失时,降低自己的优先级使另一台交换机变成主master。
3)使用ospf协议:两台交换机的f0/24接口及互联vlan接口与R2014的E0/1和E0/2的接口均运行在ospf协议的骨干零中,vlan2-5在区域1中,vlan6-10在区域2中且路由器R2014与R2004运行于ospf协议的区域3中。
在R2004上有5个环回接口,要求在骨干中看到所有网络信息的汇总路由,且不要求区域3能够看到区域1和2的相关路由信息。
OSPF+VRRP+MSTP综合案例实施+分析

两台9303之间起VRRP,接入层全为5352,上面起MSTP,全网路由使用OSPF。
每台5352划为一个单独的VLAN。
网络通过服务器组里的两台网关服务器提供网络接入功能。
下面发配置,大家看下这个做法什么地方有需要改进的地方。
一起交流一下。
9303A<Quidway>dis cu#sysname Quidway#vlan batch 100 to 101 114 to 121#stp instance 1 root primarystp enable#poe-power backup-mode 1#dba-profile default0 type3 assure 40000 max 80000#line-profile default0#service-profile default0#diffserv domain default#stp region-configurationregion-name ZYDFinstance 1 vlan 101 114 to 117instance 2 vlan 118 to 121active region-configuration#aaaauthentication-scheme default authorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_admin#drop-profile default#interface Vlanif100ip address 192.168.100.78 255.255.255.0 #interface Vlanif101ip address 192.168.3.100 255.255.255.0 vrrp vrid 1 virtual-ip 192.168.3.254 vrrp vrid 1 priority 150vrrp vrid 11 virtual-ip 192.168.3.253 #interface Vlanif114ip address 192.168.4.100 255.255.255.0 vrrp vrid 2 virtual-ip 192.168.4.254 vrrp vrid 2 priority 150vrrp vrid 12 virtual-ip 192.168.4.253 #interface Vlanif115ip address 192.168.5.100 255.255.255.0 vrrp vrid 3 virtual-ip 192.168.5.254 vrrp vrid 3 priority 150vrrp vrid 13 virtual-ip 192.168.5.253 #interface Vlanif116ip address 192.168.6.100 255.255.255.0 vrrp vrid 4 virtual-ip 192.168.6.254 vrrp vrid 4 priority 150vrrp vrid 14 virtual-ip 192.168.6.253 #interface Vlanif117ip address 192.168.7.100 255.255.255.0 vrrp vrid 5 virtual-ip 192.168.7.254vrrp vrid 5 priority 150vrrp vrid 15 virtual-ip 192.168.7.253 #interface Vlanif118ip address 192.168.8.100 255.255.255.0 vrrp vrid 6 virtual-ip 192.168.8.254 vrrp vrid 6 priority 150vrrp vrid 16 virtual-ip 192.168.8.253 #interface Vlanif119ip address 192.168.9.100 255.255.255.0 vrrp vrid 7 virtual-ip 192.168.9.254 vrrp vrid 7 priority 150vrrp vrid 17 virtual-ip 192.168.9.253 #interface Vlanif120ip address 255.255.255.0 vrrp vrid 8 virtual-ip 192.168.10.254 vrrp vrid 8 priority 150vrrp vrid 18 virtual-ip 192.168.10.253 #interface Vlanif121ip address 255.255.255.0 vrrp vrid 9 virtual-ip 192.168.11.254 vrrp vrid 9 priority 150vrrp vrid 19 virtual-ip 192.168.11.253 #interface Ethernet0/0/0#interface GigabitEthernet1/0/0port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/1port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/2port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/3port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/4port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/5port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/6port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/7port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/8port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/9port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/10port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/11port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/12port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/13port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/14port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/15port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/16port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/17port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/18port link-type accessport default vlan 100undo negotiation auto#interface GigabitEthernet1/0/19port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/20port link-type trunkport trunk allow-pass vlan 2 to 4094undo negotiation auto#interface GigabitEthernet1/0/21port link-type trunkport trunk allow-pass vlan 2 to 4094undo negotiation auto#interface GigabitEthernet1/0/22port link-type trunkport trunk allow-pass vlan 2 to 4094undo negotiation auto#interface GigabitEthernet1/0/23(9303之间的互联口)port link-type trunkport trunk allow-pass vlan 2 to 4094undo negotiation auto#interface NULL0#ospf 1area 0.0.0.0network 192.168.3.0 0.0.0.255network 192.168.4.0 0.0.0.255network 192.168.5.0 0.0.0.255network 192.168.6.0 0.0.0.255network 192.168.7.0 0.0.0.255network 192.168.8.0 0.0.0.255network 192.168.9.0 0.0.0.255network 192.168.10.0 0.0.0.255network 192.168.11.0 0.0.0.255network 192.168.100.0 0.0.0.255network 192.168.200.0 0.0.0.255#ip route-static 0.0.0.0 0.0.0.0 192.168.100.254#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return<Quidway>-----------------------------------------------------------------------------------9303B#sysname Quidway#vlan batch 101 114 to 121 200#stp instance 2 root primarystp enable#poe-power backup-mode 1#dba-profile default0 type3 assure 40000 max 80000 #line-profile default0#service-profile default0#diffserv domain default#stp region-configurationregion-name ZYDFinstance 1 vlan 101 114 to 117instance 2 vlan 118 to 121active region-configuration#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_admin#traffic behavior 1statistic enable#drop-profile default#interface Vlanif101ip address 192.168.3.101 255.255.255.0vrrp vrid 1 virtual-ip 192.168.3.254vrrp vrid 11 virtual-ip 192.168.3.253vrrp vrid 11 priority 150#interface Vlanif114ip address 192.168.4.101 255.255.255.0 vrrp vrid 2 virtual-ip 192.168.4.254 vrrp vrid 12 virtual-ip 192.168.4.253 vrrp vrid 12 priority 150#interface Vlanif115ip address 192.168.5.101 255.255.255.0 vrrp vrid 3 virtual-ip 192.168.5.254 vrrp vrid 13 virtual-ip 192.168.5.253 vrrp vrid 13 priority 150#interface Vlanif116ip address 192.168.6.101 255.255.255.0 vrrp vrid 4 virtual-ip 192.168.6.254 vrrp vrid 14 virtual-ip 192.168.6.253 vrrp vrid 14 priority 150#interface Vlanif117ip address 192.168.7.101 255.255.255.0 vrrp vrid 5 virtual-ip 192.168.7.254 vrrp vrid 15 virtual-ip 192.168.7.253 vrrp vrid 15 priority 150#interface Vlanif118ip address 192.168.8.101 255.255.255.0 vrrp vrid 6 virtual-ip 192.168.8.254 vrrp vrid 16 virtual-ip 192.168.8.253 vrrp vrid 16 priority 150#interface Vlanif119ip address 192.168.9.101 255.255.255.0 vrrp vrid 7 virtual-ip 192.168.9.254 vrrp vrid 17 virtual-ip 192.168.9.253 vrrp vrid 17 priority 150#interface Vlanif120ip address 192.168.10.101 255.255.255.0 vrrp vrid 8 virtual-ip 192.168.10.254 vrrp vrid 18 virtual-ip 192.168.10.253 vrrp vrid 18 priority 150#interface Vlanif121ip address 192.168.11.101 255.255.255.0vrrp vrid 9 virtual-ip 192.168.11.254 vrrp vrid 19 virtual-ip 192.168.11.253 vrrp vrid 19 priority 150#interface Vlanif200ip address 192.168.200.78 255.255.255.0 #interface Ethernet0/0/0#interface GigabitEthernet1/0/0port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/1port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/2port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/3port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/4port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/5port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/6port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/7port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/8port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/9port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/10port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/11port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/12port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/13port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/14port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/15port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/16port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/17port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/18port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/19port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/20port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/21port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/22port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface GigabitEthernet1/0/23port link-type trunkport trunk allow-pass vlan 2 to 4094 undo negotiation auto#interface NULL0#ospf 1area 0.0.0.0network 192.168.3.0 0.0.0.255network 192.168.4.0 0.0.0.255network 192.168.5.0 0.0.0.255network 192.168.6.0 0.0.0.255network 192.168.7.0 0.0.0.255network 192.168.8.0 0.0.0.255network 192.168.9.0 0.0.0.255network 192.168.10.0 0.0.0.255network 192.168.11.0 0.0.0.255network 192.168.200.0 0.0.0.255network 192.168.100.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return<Quidway>--------------------------------------------------------------------------------其中一台5352<F1>dis cu#sysname F1#vlan batch 1 101#stp enable#cluster enablentdp enablentdp hop 16ndp enable#voice-vlan mac-address 0001-e300-0000 mask ffff-ff00-0000 description Siemens p honevoice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000 description Cisco pho nevoice-vlan mac-address 0004-0d00-0000 mask ffff-ff00-0000 description Avaya pho nevoice-vlan mac-address 0060-b900-0000 mask ffff-ff00-0000 description Philips/NEC phonevoice-vlan mac-address 00d0-1e00-0000 mask ffff-ff00-0000 description Pingtel p honevoice-vlan mac-address 00e0-7500-0000 mask ffff-ff00-0000 description Polycom p honevoice-vlan mac-address 00e0-bb00-0000 mask ffff-ff00-0000 description 3com phon e#undo http server enable#stp region-configurationregion-name ZYDFinstance 1 vlan 101 114 to 117instance 2 vlan 118 to 121active region-configuration#interface Vlanif1#interface Vlanif101ip address 192.168.3.200 255.255.255.0#interface MEth0/0/1#interface GigabitEthernet0/0/1broadcast-suppression 5port default vlan 101bpdu enablentdp enablendp enable#interface GigabitEthernet0/0/48broadcast-suppression 5port default vlan 101bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/1port link-type trunkport trunk allow-pass vlan 1 to 4094bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/2port default vlan 1bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/3port link-type trunkport trunk allow-pass vlan 1 to 4094bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/4port default vlan 1bpdu enablentdp enablendp enable#interface NULL0#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user user01 password simple user01local-user user01 level 3local-user user01 ftp-directory flash:local-user user01 service-type telnet#ip route-static 0.0.0.0 0.0.0.0 192.168.3.254#user-interface con 0user-interface vty 0 4authentication-mode aaa#return<F1>--------------------------------------------------------------------------连接服务器的5352<Server Center>dis cu#sysname Server Center#vlan batch 1 to 2 100 200#cluster enablentdp enablentdp hop 16ndp enable#voice-vlan mac-address 0001-e300-0000 mask ffff-ff00-0000 description Siemens p honevoice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000 description Cisco pho nevoice-vlan mac-address 0004-0d00-0000 mask ffff-ff00-0000 description Avaya pho nevoice-vlan mac-address 0060-b900-0000 mask ffff-ff00-0000 description Philips/N EC phonevoice-vlan mac-address 00d0-1e00-0000 mask ffff-ff00-0000 description Pingtel p honevoice-vlan mac-address 00e0-7500-0000 mask ffff-ff00-0000 description Polycom p honevoice-vlan mac-address 00e0-bb00-0000 mask ffff-ff00-0000 description 3com phon e#undo http server enable#interface Vlanif1ip address dhcp-alloc#interface Vlanif2ip address 192.168.2.35 255.255.252.0#interface Vlanif100ip address 192.168.100.254 255.255.255.0#interface Vlanif200ip address 192.168.200.254 255.255.255.0#interface MEth0/0/1#interface GigabitEthernet0/0/1port default vlan 2bpdu enablentdp enablendp enable#interface GigabitEthernet0/0/2 port default vlan 2bpdu enablentdp enablendp enable#interface GigabitEthernet0/0/48 port default vlan 2bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/1 port link-type accessport default vlan 200bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/2 port default vlan 1bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/3 port link-type accessport default vlan 100bpdu enablentdp enablendp enable#interface GigabitEthernet0/1/4 port default vlan 1bpdu enablentdp enablendp enable#interface NULL0#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultaccounting-scheme defaultdomain default_adminlocal-user user01 password simple user01 local-user user01 level 3local-user user01 ftp-directory flash:local-user user01 service-type telnet#ospf 1import-route staticarea 0.0.0.0network 192.168.100.0 0.0.0.255network 192.168.200.0 0.0.0.255network 192.168.0.0 0.0.3.255#ip route-static 0.0.0.0 0.0.0.0 192.168.2.11 ip route-static 0.0.0.0 0.0.0.0 192.168.2.13 #user-interface con 0user-interface vty 0 4authentication-mode aaa#return<Server Center>。
mstp加vrrp的实验例子

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 划分为不同的生成树。
05 H3C MSTP+VRRP案例分析

VRRP实验:SW1的VRRP的配置:interface Vlan-interface1ip address 192.168.1.251 255.255.255.0vrrp vrid 1 virtual-ip 192.168.1.254vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode timer delay 30 (延迟30秒抢占)vrrp vrid 1 track interface GigabitEthernet0/1/0 reduced 30SW2的VRRP的配置:interface Vlan-interface1ip address 192.168.1.252 255.255.255.0vrrp vrid 1 virtual-ip 192.168.1.254vrrp vrid 1 preempt-mode (默认已开启抢占功能)查看:[sw1]disp vrrp verboseIPv4 Standby Information:Run Mode : StandardRun Method : Virtual MACTotal number of virtual routers : 1Interface Vlan-interface1VRID : 1 Adver Timer : 1Admin Status : Up State : MasterConfig Pri : 120 Running Pri : 120Preempt Mode : Yes Delay Time : 30Auth Type : NoneVirtual IP : 192.168.1.254Virtual MAC : 0000-5e00-0101Master IP : 192.168.1.251VRRP Track Information:Track Interface: GE0/1/0 State : Up Pri Reduced : 30案例分析:在H3C三层交换机上配置MSTP + VRRP一.. 配置VRRP, 实现不同VLAN间的三层网关冗余及负均衡。
mstp加vrrp的实验例子

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,可以实现对网络中的故障进行快速检测和恢复,提高网络的可靠性和冗余性。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
hostname s1!route-map ruijie permit 10match ip address 10set ip next-hop 192.168.100.4 !route-map ruijie permit 20match ip address 20set ip next-hop 192.168.100.5 !vlan 1!vlan 10!vlan 20vlan 100!!ip access-list standard 1010 permit 192.168.10.0 0.0.0.255 !!ip access-list standard 2010 permit 192.168.20.0 0.0.0.255 !!!spanning-treespanning-tree mst configurationinstance 0 vlan 1-9, 11-19, 21-4094 instance 10 vlan 10instance 20 vlan 20spanning-tree mst 10 priority 4096 spanning-tree mst 20 priority 8192 interface FastEthernet 0/1switchport access vlan 100!interface FastEthernet 0/2switchport access vlan 100!interface FastEthernet 0/3!interface FastEthernet 0/4interface FastEthernet 0/5!interface FastEthernet 0/6!interface FastEthernet 0/7!interface FastEthernet 0/8!interface FastEthernet 0/9!interface FastEthernet 0/10port-group 1!interface FastEthernet 0/11port-group 1!interface FastEthernet 0/12!interface FastEthernet 0/13!interface FastEthernet 0/14!interface FastEthernet 0/15interface FastEthernet 0/16!interface FastEthernet 0/17!interface FastEthernet 0/18!interface FastEthernet 0/19!interface FastEthernet 0/20!interface FastEthernet 0/21!interface FastEthernet 0/22!interface FastEthernet 0/23!interface FastEthernet 0/24switchport mode trunk!interface GigabitEthernet 0/25!interface GigabitEthernet 0/26!interface GigabitEthernet 0/27!interface GigabitEthernet 0/28!interface AggregatePort 1switchport mode trunk!interface VLAN 10no ip proxy-arpip address 192.168.10.252 255.255.255.0 vrrp 10 priority 120vrrp 10 ip 192.168.10.254!interface VLAN 20no ip proxy-arpip address 192.168.20.252 255.255.255.0 vrrp 20 ip 192.168.20.254!interface VLAN 100ip policy route-map ruijieno ip proxy-arpip address 192.168.100.1 255.255.255.0 !!router ospf 1network 192.168.10.0 0.0.0.255 area 0 network 192.168.20.0 0.0.0.255 area 0 network 192.168.100.0 0.0.0.255 area 0 !!!!line con 0line vty 0 4login!!end!hostname s2!!!!route-map ruijie permit 10match ip address 10set ip next-hop 192.168.101.5!route-map ruijie permit 20match ip address 20set ip next-hop 192.168.101.4!vlan 1!vlan 10!vlan 20vlan 100vlan 101!!no service password-encryption!!ip access-list standard 1010 permit 192.168.10.0 0.0.0.255 !!ip access-list standard 2010 permit 192.168.20.0 0.0.0.255 !!!spanning-treespanning-tree mst configurationinstance 0 vlan 1-9, 11-19, 21-4094 instance 10 vlan 10instance 20 vlan 20spanning-tree mst 10 priority 8192 spanning-tree mst 20 priority 4096 interface FastEthernet 0/1switchport access vlan 101!interface FastEthernet 0/2switchport access vlan 101!interface FastEthernet 0/3interface FastEthernet 0/4!interface FastEthernet 0/5!interface FastEthernet 0/6!interface FastEthernet 0/7!interface FastEthernet 0/8!interface FastEthernet 0/9!interface FastEthernet 0/10port-group 1interface FastEthernet 0/11port-group 1!interface FastEthernet 0/12!interface FastEthernet 0/13!interface FastEthernet 0/14interface FastEthernet 0/15!interface FastEthernet 0/16!interface FastEthernet 0/17!interface FastEthernet 0/18!interface FastEthernet 0/19!interface FastEthernet 0/20!interface FastEthernet 0/21!interface FastEthernet 0/22!interface FastEthernet 0/23!interface FastEthernet 0/24switchport mode trunk!interface GigabitEthernet 0/25!interface GigabitEthernet 0/26!interface GigabitEthernet 0/27!interface GigabitEthernet 0/28!interface AggregatePort 1switchport mode trunk!interface VLAN 10no ip proxy-arpip address 192.168.10.253 255.255.255.0vrrp 10 ip 192.168.10.254!interface VLAN 20no ip proxy-arpip address 192.168.20.253 255.255.255.0 vrrp 20 priority 120vrrp 20 ip 192.168.20.254!interface VLAN 100no ip proxy-arpshutdown!interface VLAN 101ip policy route-map ruijieno ip proxy-arpip address 192.168.101.1 255.255.255.0 !!!!!!!router ospf 1network 192.168.10.0 0.0.0.255 area 0 network 192.168.20.0 0.0.0.255 area 0 network 192.168.101.0 0.0.0.255 area 0 !!!!line con 0line vty 0 4login!!endhostname s3!!vlan 1!vlan 10!vlan 20!!spanning-treespanning-tree mst configurationinstance 0 vlan 1-9, 11-19, 21-4094 instance 10 vlan 10instance 20 vlan 20interface FastEthernet 0/1switchport access vlan 10!interface FastEthernet 0/2switchport access vlan 10!interface FastEthernet 0/3switchport access vlan 10!interface FastEthernet 0/4switchport access vlan 10!interface FastEthernet 0/5switchport access vlan 10!interface FastEthernet 0/6switchport access vlan 10!interface FastEthernet 0/7 switchport access vlan 10!interface FastEthernet 0/8switchport access vlan 10!interface FastEthernet 0/9switchport access vlan 10!interface FastEthernet 0/10switchport access vlan 10!interface FastEthernet 0/11 switchport access vlan 20 !interface FastEthernet 0/12 switchport access vlan 20 !interface FastEthernet 0/13 switchport access vlan 20 !interface FastEthernet 0/14 switchport access vlan 20 !interface FastEthernet 0/15 switchport access vlan 20 !interface FastEthernet 0/16 switchport access vlan 20 !interface FastEthernet 0/17 switchport access vlan 20 !interface FastEthernet 0/18 switchport access vlan 20 !interface FastEthernet 0/19 switchport access vlan 20 !interface FastEthernet 0/20 switchport access vlan 20 !interface FastEthernet 0/21 !interface FastEthernet 0/22 !interface FastEthernet 0/23 switchport mode trunk!interface FastEthernet 0/24 switchport mode trunk!!hostname R1!!!!interface FastEthernet 0/0ip address 192.168.100.2 255.255.255.0 vrrp 1 priority 120vrrp 1 ip 192.168.100.4vrrp 2 ip 192.168.100.5duplex autospeed auto!interface FastEthernet 0/1ip address 192.168.101.2 255.255.255.0 vrrp 1 ip 192.168.101.4vrrp 2 priority 120vrrp 2 ip 192.168.101.5duplex autospeed auto!interface FastEthernet 0/2ip address 1.1.1.1 255.255.255.0duplex autospeed auto!!!!router ospf 1network 1.1.1.0 0.0.0.255 area 0network 192.168.100.0 0.0.0.255 area 0 network 192.168.101.0 0.0.0.255 area 0 !!ref parameter 50 400!!endR1#hostname R2!!!interface FastEthernet 0/0ip address 192.168.101.3 255.255.255.0 vrrp 1 priority 120vrrp 1 ip 192.168.101.4vrrp 2 ip 192.168.101.5duplex autospeed auto!interface FastEthernet 0/1ip address 192.168.100.3 255.255.255.0 vrrp 1 ip 192.168.100.4vrrp 2 priority 120vrrp 2 ip 192.168.100.5duplex autospeed auto!interface FastEthernet 0/2ip address 1.1.1.1 255.255.255.0duplex autospeed auto!!!!router ospf 1network 1.1.1.0 0.0.0.255 area 0network 192.168.100.0 0.0.0.255 area 0 network 192.168.101.0 0.0.0.255 area 0 !!!!ref parameter 50 400 line con 0line aux 0line vty 0 4login!!endR2#。