当前位置:文档之家› 华为交换机常用命令及解释

华为交换机常用命令及解释

一、基本配置
1、视图
system-view 认也只属于VLAN1.
[quidway-ethernet0/1]port hybrid vlan {vlan-id} {tagged|untagged} [h3c-mst-region]instance 3 valn 11 to 20
[h3c-mst-region]revision-level 1 //设置MST域的MSTP修
订级别,即版本号
[h3c-mst-region]active region-configuration //手动激活MST域的配

[h3c]stp instance 2 root primary //设置各MSTI实例的根。

当实例号为0时,指定此交换机为CIST的根,而不是MSTI的根。

也可
以用优先级来设置。

[h3c]stp instance 2 root secondary //设置各实例的备份根[h3c]undo stp instance 2 root //取消当前交换机的根
或备份根交换机的资格
以下设置端口开销
[h3c]stp interface gig1/0/1 instance 1 cost 2000 //设置端口在实
例中的开销,以选举实例的根端口或指定端口。

[h3c]interface gig1/0/1
[h3c-gigabitethernet1/0/1] stp instance 1 cost 2000 //这种方法和
上面的结果一样,只是先进入端口,再设定。

以下设置端口优先级
[h3c]stp interface gig1/0/1 instance 1 port priority 16 //设置
端口优先级
[h3c]interface gig1/0/1
[h3c-gigabitethernet1/0/1] stp instance 1 port priority 16//同样是
设置端口优先级
以下设置国边缘端口
[h3c]stp interface gig1/0/1 edged-port enable //
设置为边缘端口
[h3c]stp interface gig1/0/1 edged-port disable //
设置为非边缘端口
[h3c]undo stp edged-port gig1/0/1 edged-port //
恢复为缺省的非边缘端口
[h3c]interface gig1/0/1 //方法二,先进入端口,再配置
[h3c-gigabitethernet1/0/1]stp edged-port enable
[h3c-gigabitethernet1/0/1]stp edged-port disable
[h3c-gigabitethernet1/0/1]undo stp edged-port
[h3c]stp mode {stp|mstp} //配置MSTP的工作模
式。

[h3c]undo stp mode //恢复为默认的模式。

默认为MSTP模式。

[h3c]stp max-hops 5 //设置MST域的最大跳
数,以限制域的规模。

最大跳数为20。

相关主题