祖瑞科技 全国计算机 网络IT运维社区!

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 5987|回复: 0

H3CNE 12 MSTP配置

[复制链接]

205

主题

218

帖子

1286

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1286
发表于 2021-10-28 15:26:37 | 显示全部楼层 |阅读模式
H3CNE 12 MSTP配置
sw1                                                               
[sw1]vlan 10  //创建vlan10
[sw1-vlan10]name caiwu //配置vlan名称
[sw1-vlan10]description caiwuvlan  //配置描述信息
[sw1-vlan10]quit
[sw1]vlan 20
[sw1-vlan20]name shichang
[sw1-vlan20]description shichangvlan
[sw1-vlan20]quit
[sw1]interface range gigabitethernet 1/0/1 togigabitethernet 1/0/4  //进入接口范围(与华为port-group group-member一致)
[sw1-if-range]port link-type trunk  //配置端口链路类型为trunk
[sw1-if-range]port trunk permit vlan 10 20  //配置放行vlan
[sw1-if-range]undo port trunk permit vlan 1  //拒绝放行vlan
[sw1-if-range]port trunk pvid vlan 10  //配置端口默认vlan
[sw1-if-range]quit
[sw1]display vlan brief
[sw1]display port trunk
[sw1]stp global enable //全局生成树功能开启(默认已开)
[sw1]stp mode mstp //配置生成树模式为MSTP(默认模式)
[sw1]stp region-configuration  //进入MST域视图
[sw1-mst-region]region-name manage  //配置MST域名manage
[sw1-mst-region]instance 1 vlan 10  //配置生成树实例与vlan列表的映射
[sw1-mst-region]instance 2 vlan 20
[sw1-mst-region]revision-level 0  //配置MSTP的修订级别(默认0)
[sw1-mst-region]active region-configuration  //激活MST域配置
[sw1-mst-region]quit
[sw1]stp instance 1 root primary  //配置交换机是实例1的根桥
[sw1]stp instance 2 root secondary  //配置交换机是实例2的备份根
[sw1]display stp region-configuration
Oper Configuration
   Formatselector      : 0
   Region name          : manage
   Revisionlevel       : 0
   Configurationdigest : 0x9357ebb7a8d74dd5fef4f2bab50531aa
   Instance  VLANs Mapped
   0         1 to 9, 11 to 19, 21 to 4094
   1         10
   2         20

sw2
[sw2]vlan 10
[sw2-vlan10]name caiwu
[sw2-vlan10]description caiwuvlan
[sw2-vlan10]vlan 20
[sw2-vlan20]name shichang
[sw2-vlan20]description shichangvlan
[sw2-vlan20]quit
[sw2]interface range gigabitethernet 1/0/1 toGigabitEthernet 1/0/4
[sw2-if-range]port link-type trunk
[sw2-if-range]port trunk permit vlan 10 20
[sw2-if-range]undo port trunk permit vlan 1
[sw2-if-range]port trunk pvid vlan 10
[sw2-if-range]quit
[sw2]stp global enable
[sw2]stp mode mstp
[sw2]stp region-configuration
[sw2-mst-region]region-name manage
[sw2-mst-region]instance 1 vlan 10
[sw2-mst-region]instance 2 vlan 20
[sw2-mst-region]revision-level 0
[sw2-mst-region]active region-configuration
[sw2-mst-region]quit
[sw2]stp instance 1 root secondary
[sw2]stp instance 2 root primary
sw3
[sw3]vlan 10
[sw3-vlan10]name caiwu
[sw3-vlan10]description caiwuvlan
[sw3-vlan10]vlan 20
[sw3-vlan20]name shichang
[sw3-vlan20]description shichangvlan
[sw3-vlan20]quit
[sw3]interface range gigabitethernet 1/0/1 to GigabitEthernet1/0/2
[sw3-if-range]port link-type trunk
[sw3-if-range]port trunk permit vlan 10 20
[sw3-if-range]undo port trunk permit vlan 1
[sw3-if-range]port trunk pvid vlan 10
[sw3-if-range]quit
[sw3]interface gigabitethernet 1/0/48
[sw3-GigabitEthernet1/0/48]port link-type access
[sw3-GigabitEthernet1/0/48]port access vlan 10
[sw3-GigabitEthernet1/0/48]stp edged-port  //配置此端口为边缘端口(仅对连接终端设备端口配置)
[sw3-GigabitEthernet1/0/48]quit
[sw3]interface gigabitethernet 1/0/47
[sw3-GigabitEthernet1/0/47]port link-type access
[sw3-GigabitEthernet1/0/47]port access vlan 20
[sw3-GigabitEthernet1/0/47]stp edged-port
[sw3-GigabitEthernet1/0/47]quit
[sw3]stp global enable
[sw3]stp mode mstp
[sw3]stp region-configuration
[sw3-mst-region]region-name manage
[sw3-mst-region]instance 1 vlan 10
[sw3-mst-region]instance 2 vlan 20
[sw3-mst-region]revision-level 0
[sw3-mst-region]active region-configuration
[sw3-mst-region]quit
sw4
[sw4]vlan 10
[sw4-vlan10]name caiwu
[sw4-vlan10]description caiwuvlan
[sw4-vlan10]vlan 20
[sw4-vlan20]name shichang
[sw4-vlan20]description shichangvlan
[sw4-vlan20]quit
[sw4]interface range gigabitethernet 1/0/1 togigabitethernet 1/0/2
[sw4-if-range]port link-type trunk
[sw4-if-range]port trunk permit vlan 10 20
[sw4-if-range]undo port trunk permit vlan 1
[sw4-if-range]port trunk pvid vlan 10
[sw4-if-range]quit
[sw4]interface gigabitethernet 1/0/48
[sw4-GigabitEthernet1/0/48]port link-type access
[sw4-GigabitEthernet1/0/48]port access vlan 10
[sw4-GigabitEthernet1/0/48]stp edged-port
[sw4-GigabitEthernet1/0/48]quit
[sw4]interface gigabitethernet 1/0/47
[sw4-GigabitEthernet1/0/47]port link-type access
[sw4-GigabitEthernet1/0/47]port access vlan 20
[sw4-GigabitEthernet1/0/47]stp edged-port
[sw4-GigabitEthernet1/0/47]quit
[sw4]stp global enable
[sw4]stp mode mstp
[sw4]stp region-configuration
[sw4-mst-region]region-name manage
[sw4-mst-region]instance 1 vlan 10
[sw4-mst-region]instance 2 vlan 20
[sw4-mst-region]revision-level 0
[sw4-mst-region]active region-configuration
[sw4-mst-region]quit

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

公司网站

QQ|Archiver|手机版|小黑屋|祖瑞科技 全国计算机 网络IT运维社区! ( 沪ICP备16021636号-2 )

GMT+8, 2024-11-26 01:58 , Processed in 0.041442 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表