配置MSTP及负载均衡-纵马且长歌的博客

使用ensp模拟器,按图中所示搭建拓扑
配置MSTP及负载均衡

要求:
配置MSTP实现多生成树效果
交换机配置vlan
PC1/3/5分别属于vlan10, PC2/4/5分别属于vlan20
交换机之间设置为trunk端口
配置交换机LSW1为vlan10的根网桥、交换机LSW2为vlan20的根网桥
抓包查看配置是否成功

步骤:
给PC机配置IP地址子网掩码
配置vlan信息
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/3
port link-type access
port default vlan 10
interface Ethernet0/0/4
port link-type access
port default vlan 20
给交换机1配置mstp:
1、配置MST域:stp region-configuration
配置MSTP及负载均衡
2、指定MST域名称(每个交换机都是相同的名字)
配置MSTP及负载均衡
3、创建允许vlan通过的通道(这里只有两个vlan,所以就只创建两条)
配置MSTP及负载均衡配置MSTP及负载均衡
4、激活mstp域
配置MSTP及负载均衡
5、设置每条路的拓扑(分别在vlan对应的根网桥)
配置MSTP及负载均衡
配置完成,抓包测试
在阻塞的端口抓包测试
配置MSTP及负载均衡
配置MSTP及负载均衡
在没有阻塞的端口抓包测试
配置MSTP及负载均衡
配置MSTP及负载均衡
测试结果,vlan10 以lsw1为根桥时, LSW2的Eth0/0/2端口与LSW3的Eth0/0/2端口是阻塞的
vlan20 以lsw1为根桥时, LSW1的Eth0/0/2端口与LSW3的Eth0/0/1端口是阻塞的