1、实验拓扑
华为stp rstp mstp配置_第1张图片
2、stp配置
SW1
vlan10 定义vlan
vlan20

interface Eth-Trunk1 配置链路聚合
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
mode lacp-static
max active-linknumber 1

interface GigabitEthernet0/0/1 接口加入逻辑聚合口
eth-trunk 1
interface GigabitEthernet0/0/2
eth-trunk 1

stp mode stp 开启stp
stp instance 0 root primary SW1为生成树的根节点(选择根节点一般选择性能较强的交换机)

SW2
vlan10 定义vlan
vlan20

interface Eth-Trunk1 配置链路聚合
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
mode lacp-static
max active-linknumber 1

interface GigabitEthernet0/0/1 接口加入逻辑聚合口
eth-trunk 1
interface GigabitEthernet0/0/2
eth-trunk 1

stp mode stp 开启stp
stp instance 0 root secondary SW2为生成树次根节点(作为根节点的备份)

SW3
vlan10 定义vlan
vlan20

interface Ethernet0/0/1 配置接入交换机上联汇聚接口
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20

interface Ethernet0/0/2 配置接入交换机上联汇聚接口
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20

stp mode stp 开启stp

3、Rstp配置
SW1
vlan10 定义vlan
vlan20

interface Eth-Trunk1 配置链路聚合
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
mode lacp-static
max active-linknumber 1

interface GigabitEthernet0/0/1 接口加入逻辑聚合口
eth-trunk 1
interface GigabitEthernet0/0/2
eth-trunk 1

stp mode rstp 开启rstp
stp instance 0 root primary SW1为生成树的根节点(选择根节点一般选择性能较强的交换机)

SW2
vlan10 定义vlan
vlan20

interface Eth-Trunk1 配置链路聚合
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
mode lacp-static
max active-linknumber 1

interface GigabitEthernet0/0/1 接口加入逻辑聚合口
eth-trunk 1
interface GigabitEthernet0/0/2
eth-trunk 1

stp mode rstp 开启rstp
stp instance 0 root secondary SW2为生成树根备份节点

SW3
vlan10 定义vlan
vlan20

interface Ethernet0/0/1 配置接入交换机上联汇聚接口
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20

interface Ethernet0/0/2 配置接入交换机上联汇聚接口
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20

stp mode rstp 开启rstp

4、配置Mstp
SW1
vlan10 定义vlan
vlan20

interface Eth-Trunk1 配置链路聚合
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
mode lacp-static
max active-linknumber 1

interface GigabitEthernet0/0/1 接口加入逻辑聚合口
eth-trunk 1
interface GigabitEthernet0/0/2
eth-trunk 1

stp mode mstp 开启mstp

stp region-configuration 配置生成树域
region-name huawei 配置域的名称,每个运行协议的域名需统一
instance 1 vlan 10 实例一定义vlan10
instance 2 vlan 20 实例二定义vlan20
active region-configuration 激活
quit
stp instance 1 root primary 配置交换机为实例1的根桥
stp instance 2 root secondary 配置交换机为实例2的备份根桥

SW2
vlan10 定义vlan
vlan20

interface Eth-Trunk1 配置链路聚合
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
mode lacp-static
max active-linknumber 1

interface GigabitEthernet0/0/1 接口加入逻辑聚合口
eth-trunk 1
interface GigabitEthernet0/0/2
eth-trunk 1

stp mode mstp 开启mstp

stp region-configuration 配置生成树域
region-name huawei 配置域的名称,每个运行协议的域名需统一
instance 1 vlan 10 实例一定义vlan10
instance 2 vlan 20 实例二定义vlan20
active region-configuration 激活
quit
stp instance 1 root secondary 配置交换机为实例1的备份根桥
stp instance 2 root primary 配置交换机为实例2的根桥

SW3
vlan10 定义vlan
vlan20

interface Ethernet0/0/1 配置接入交换机上联汇聚接口
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20

interface Ethernet0/0/2 配置接入交换机上联汇聚接口
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20

stp mode mstp 开启mstp

stp region-configuration 配置生成树域
region-name huawei 配置域的名称,每个运行协议的域名需统一
instance 1 vlan 10 实例一定义vlan10
instance 2 vlan 20 实例二定义vlan20
active region-configuration 激活
quit