MSTP多生成树协议实验命令操作详情华为设备

多生成树协议实验命令操作详情

涉及问题

1.是否有环路产生
2.主要链路与备用链路是否设置正确
3.路由配置设备网关地址与PC地址是否混淆
4.VLAN设定

MSTP多生成树协议实验命令操作详情华为设备_第1张图片

实验主要步骤

  1. 所以设备必打命令:关闭弹屏,设备名字的修改,启用永不超时。如下
    MSTP多生成树协议实验命令操作详情华为设备_第2张图片
    2.创建VLAN 所有设备链路VLAN归属,及端口选择。左半边假设归属VLAN10 ,右半边归属 VLAN20

SW1命令如下

[sw1]vlan bat 10 20 ———— 创建vlan
[sw1]]interface e0/0/1 ———— 进入端口0/0/1
[sw1-Ethernet0/0/1]port hybrid pvid vlan 10————打标签
[sw1-Ethernet0/0/1]port hybrid untagged vlan 10 20————解标签
[sw1-Ethernet0/0/1]int g0/0/1————进入0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk————主干线
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[sw1-GigabitEthernet0/0/1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port hybrid pvid vlan 10
[sw1-GigabitEthernet0/0/2]port hybrid untagged vlan 10 20
[sw1-GigabitEthernet0/0/2]qui

SW2命令
与SW1一样各条线路端口配置
undo ter
undo terminal mo
undo terminal monitor
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname sw2
[sw2]user
[sw2]user-in
[sw2]user-interface co
[sw2]user-interface console 0
[sw2-ui-console0]id
[sw2-ui-console0]idle-timeout 0 0
[sw2-ui-console0]quit
[sw2]vlan bat 10 20———— 创建vlan
Info: This operation may take a few seconds. Please wait for a moment…done.
[sw2]int
[sw2]interface e0/0/1————进入端口
[sw2-Ethernet0/0/1]port hybrid pvid vlan 10
[sw2-Ethernet0/0/1]port hybrid untagged vlan 10 20
[sw2-Ethernet0/0/1]int e0/0/3
[sw2-Ethernet0/0/3]port hybrid pvid vlan 10
sw2-Ethernet0/0/3]port hybrid untagged vlan 10 20
[sw2-Ethernet0/0/3]quit
[sw2]int
[sw2]interface e0/0/2
[sw2-Ethernet0/0/2]port hybrid pvid vlan 20
[sw2-Ethernet0/0/2]port hybrid untagged vlan 10 20
[sw2-Ethernet0/0/2]int e0/0/4
[sw2-Ethernet0/0/4]port hybrid pvid vlan 20
[sw2-Ethernet0/0/4]port hybrid untagged vlan 10 20
[sw2-Ethernet0/0/4]quit
SW3

sw3]user
[sw3]user-interface console 0
[sw3-ui-console0]id
[sw3-ui-console0]idle-timeout 0 0
[sw3-ui-console0]quit
[sw3]vlan bat 10 20
Info: This operation may take a few seconds. Please wait for a moment…done.
[sw3]int
[sw3]interface e0/0/1
[sw3-Ethernet0/0/1]port hybrid pvid vlan 20
[sw3-Ethernet0/0/1]port hybrid untagged vlan 10 20
[sw3-GigabitEthernet0/0/1]port link-type trunk
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[sw3-GigabitEthernet0/0/1]int g0/0/2
[sw3-GigabitEthernet0/0/2]port hybrid pvid vlan 20
[sw3-GigabitEthernet0/0/2]port hybrid untagged vlan 10 20
[sw3-GigabitEthernet0/0/2]quit

R1路由

[r1]int
[r1]interface g0/0/0————进入接口
[r1-GigabitEthernet0/0/0]ip add 10.1.10.254 24————配置PC1网关地址
[r1-GigabitEthernet0/0/0]undo shutdown
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 10.1.20.254 24————配置PC2网关地址
[r1-GigabitEthernet0/0/1]quit
[r1]int
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.

配置电脑IP- 子网 - 网关

基础配置完成开始输入多生成树命令
所有设备都在以上基础上继续输入命令
SW1

[sw1]stp mo
[sw1]stp mode mstp————设为多生成树
[sw1]stp region-configuration
1-mst-region]region-name huawei————名字,所有设备需一致
[sw1-mst-region]revision-level 1————等级默认 1
sw1-mst-region]instance 1 vlan 10————线路归属
[sw1-mst-region]instance 2 vlan 20
[sw1-mst-region]active region-configuration ————保存,一定要记得
[sw1-mst-region]quit
[sw1]stp instance 1 root primary ————主要线路
[sw1stp ]instance 2 root secondary ————次要线路,主线路出现问题备用
[sw1]quit

SW2
命令一致,主次线路不用

[sw2]stp mode mstp
[sw2]stp region-configuration
[sw2-mst-region]region-name huawei
[sw2-mst-region]revision-level 1
[sw2-mst-region]instance 1 vlan 10
[sw2-mst-region]inst
[sw2-mst-region]instance 2 vlan 20
[sw2-mst-region]active region-configuration

SW3
与SW1一样主次相反

[sw3]stp mode mstp
[sw3]stp region-configuration
[sw3-mst-region]region-name huawei
[sw3-mst-region]revision-level 1
[sw3-mst-region]instance 1 vlan 10
[sw3-mst-region]instance 2 vlan 20
[sw3-mst-region]active region-configuration
[sw3-mst-region]quit
sw3]stp instance 2 root primary
[sw3]stp instance 1 root secondary

你可能感兴趣的:(MSTP,linux,云计算,网络,交换机,数据库)