华三交换机配置mstp
时间: 2023-12-29 21:22:38 浏览: 35
华三交换机配置 MSTP 的步骤如下:
1. 创建 MSTP 实例并启用 MSTP 协议:
```
[~Switch] stp mode mstp
[~Switch] stp region-configuration
[~Switch-stp-region] revision-level 1
[~Switch-stp-region] instance 1 vlan 10 to 20
[~Switch-stp-region] active
```
2. 配置 MSTP 实例的根桥和优先级:
```
[~Switch] stp root primary
[~Switch] stp priority 4096
```
3. 配置端口的 STP 模式为 MSTP:
```
[~Switch] interface GigabitEthernet 0/0/1
[~Switch-GigabitEthernet0/0/1] stp edged-port enable
[~Switch-GigabitEthernet0/0/1] stp mstp config-id 1
[~Switch-GigabitEthernet0/0/1] stp mstp instance 1 enable
```
4. 配置 MSTP 实例的端口优先级和端口成本:
```
[~Switch] stp mstp instance 1 port GigabitEthernet 0/0/1 priority 128
[~Switch] stp mstp instance 1 port GigabitEthernet 0/0/1 cost 2000
```