交换综合实验
第三次作业‑交换综合实验报告
一、实验名称
MSTP+VRRP园区交换综合实验
二、实验目的
1. 掌握VLAN划分、Access端口与Trunk端口的配置,隔离二层广播域。
2. 熟练配置MSTP多生成树协议,实现不同VLAN分设根桥,完成负载分担与环路防护。
3. 掌握VRRP虚拟冗余网关配置,实现网关备份与故障自动切换,提升网络可靠性。
4. 按照要求完成角色部署:SW1为VLAN10根桥与VRRP‑Master;SW2为VLAN20根桥与VRRP‑Master,最终实现全网互通
实验规划
1. IP地址规划
- VLAN10网段:192.168.1.0/24,虚拟网关:192.168.1.254
- VLAN20网段:192.168.2.0/24,虚拟网关:192.168.2.254
- SW1:Vlanif10:192.168.1.1/24;Vlanif20:192.168.2.1/24
- SW2:Vlanif10:192.168.1.2/24;Vlanif20:192.168.2.2/24
- PC1:192.168.1.10/24,网关192.168.1.254(VLAN10)
- PC2:192.168.2.10/24,网关192.168.2.254(VLAN20)
2. 设备角色分配
1. SW1:VLAN10 MSTP主根桥、VRRP组1 Master;VLAN20备份设备
2. SW2:VLAN20 MSTP主根桥、VRRP组2 Master;VLAN10备份设备
3. SW3:接入交换机,连接两台终端主机
五、核心配置命令
SW1配置
plaintext
sysname SW1
vlan batch 10 20
stp mode mstp
stp region-configuration
region-name test
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active
stp instance 1 root primary
stp instance 2 root secondary
interface GigabitEthernet0/0/3
portswitch
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/4
portswitch
port link-type trunk
port trunk allow-pass vlan 10 20
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.254
vrrp vrid 1 priority 120
vrrp vrid 1 track interface GigabitEthernet0/0/3 reduced 20
interface Vlanif20
ip address 192.168.2.1 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.2.254
vrrp vrid 2 priority 100
SW2配置
plaintext
sysname SW2
vlan batch 10 20
stp mode mstp
stp region-configuration
region-name test
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active
stp instance 1 root secondary
stp instance 2 root primary
interface GigabitEthernet0/0/3
portswitch
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/4
portswitch
port link-type trunk
port trunk allow-pass vlan 10 20
interface Vlanif10
ip address 192.168.1.2 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.254
vrrp vrid 1 priority 100
interface Vlanif20
ip address 192.168.2.2 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.2.254
vrrp vrid 2 priority 120
vrrp vrid 2 track interface GigabitEthernet0/0/3 reduced 20
SW3配置
plaintext
sysname SW3
vlan batch 10 20
stp mode mstp
stp region-configuration
region-name test
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active
interface GigabitEthernet0/0/3
portswitch
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/4
portswitch
port link-type trunk
port trunk allow-pass vlan 10 20
interface Ethernet0/0/1
portswitch
port link-type access
port default vlan 10
interface Ethernet0/0/2
portswitch
port link-type access
port default vlan 20
六、实验验证
1. 执行 display stp brief :实例1(VLAN10)根桥为SW1,实例2(VLAN20)根桥为SW2,冗余端口被阻塞,无二层环路。
2. 执行 display vrrp brief :VRRP组1的Master为SW1,VRRP组2的Master为SW2,备份设备状态正常。
3. 连通性测试:PC1可以正常ping通PC2
实验总结
本次实验完成作业全部要求,使用MSTP实现二层链路冗余与负载分担,VRRP实现网关备份。将MSTP根桥和VRRP Master部署在同一台设备上,可以优化数据转发路径。通过本次实操,我理解了园区网高可用方案的搭建思路,掌握了常见故障的排查方法


DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐



所有评论(0)