华为stp rstp mstp配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为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

以上是关于华为stp rstp mstp配置的主要内容,如果未能解决你的问题,请参考以下文章

华为交换技术——MSTP协议原理

华为设备二层交换技术——MSTP协议详解

华为交换机MSTP公有生成树协议

VRRP+MSTP配置详解华为eNSP实验

STP+RSTP详解

RSTP基本配置