华为的交换机用什么命令一次把多个端口加入同一个vlan中

华为的交换机用什么命令一次把多个端口加入同一个vlan中,第1张

华为交换机是可以创建端口组进行批量配置端口的,比如将接口1-20加入vlan 10:

[AR]vlan 10

[AR-vlan10]quit

[AR]port-group 1

[AR-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/20

[AR-port-group-1]port link-type access

[AR-port-group-1]port default vlan 10

1、将成员接口批量加入聚合组。

在Eth-Trunk1中批量加入10个成员接口。

脚本:

system-view

interface eth-trunk 1

trunkport gigabitethernet 1/0/10 to 1/0/20

2、将指定成员接口从聚合组中删除,有两种方式。

(1)在Eth-Trunk接口视图下使用命令undo trunkport进行删除。

例如:

system-view

interface eth-trunk 1

undo trunkport gigabitethernet 1/0/10

(2)在成员接口视图下执行命令undo eth-trunk进行删除。

例如:

system-view

interface gigabitethernet 1/0/10

undo eth-trunk

3、删除聚合组

首先需要将所有的成员从聚合组中删除。

在系统视图下使用命令undo interface eth-trunk trunk-id.

例如:

system-view

undo interface eth-trunk 2

4、查看Eth-trunk接口的配置信息。

display eth-trunk #查看所有Eth-trunk接口配置信息。

display eth-trunk 10 #查看eth-trunk 10接口的配置信息。

5、查看Eth-trunk的成员接口信息。

display trunkmembership eth-trunk 1 #查看ID为1的Eth-trunk的成员接口信息。

6、查看设备支持的链路聚合组数目和成员接口数目。

display trunk configuration


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/7953199.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-11
下一篇2023-04-11

发表评论

登录后才能评论

评论列表(0条)

    保存