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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

H3CNE 11 RSTP配置

[复制链接]

205

主题

218

帖子

1286

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1286
发表于 2021-10-28 15:24:48 | 显示全部楼层 |阅读模式
H3CNE 11 RSTP配置
                              
SW1
[sw1]vlan 10  //创建vlan10
[sw1-vlan10]name caiwu //配置vlan名称
[sw1-vlan10]description caiwuvlan  //配置vlan描述信息
[sw1-vlan10]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]port trunk pvid vlan 10  //拒绝放行vlan
[sw1]stp mode rstp //配置生成树模式为rstp
[sw1]stp priority 0 //配置交换机stp优先级为0(0=primary)
[sw1]stp global enable //开局开启stp功能(默认开启)
SW2
[sw2]vlan 10
[sw2-vlan10]name caiwu
[sw2-vlan10]description caiwuvlan
[sw2-vlan10]quit
[sw2]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]display port trunk
[sw2]stp mode rstp
[sw2]stp priority 4096 //配置交换机stp优先级为4096(4096=secondary)
[sw2]stp global enable
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/1gigabitethernet 1/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]interface gigabitethernet1/0/47
[sw3-GigabitEthernet1/0/47]port link-type access
[sw3-GigabitEthernet1/0/47]port access vlan 20
[sw3-GigabitEthernet1/0/47]quit
[sw3]display port trunk
[sw3]stp mode rstp
[sw3]stp global enable
[sw3]interface range gigabitethernet 1/0/47 togigabitethernet 1/0/48
[sw3-if-range]stp edged-port  //配置当前端口为边缘端口(下接终端设备建议配置边缘端口)
[sw3-if-range]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]interface gigabitethernet1/0/47
[sw4-GigabitEthernet1/0/47]port link-type access
[sw4-GigabitEthernet1/0/47]port access vlan 20
[sw4-GigabitEthernet1/0/47]quit
[sw4]display vlan brief
[sw4]display port trunk
[sw4]display vlan 10
[sw4]display vlan 20
[sw4[sw4]stp mode rstp
[sw4]stp global enable]interface range gigabitethernet1/0/47 to GigabitEthernet 1/0/48
[sw4-if-range]stp edged-port
[sw4-if-range]quit
[sw4]display stp

本帖子中包含更多资源

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

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

使用道具 举报

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

本版积分规则

公司网站

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

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

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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