Got it

How to add interfaces to a VLAN in a batch

Latest reply: Apr 7, 2017 03:25:27 901 1 0 0

Hello everyone,

I need to add interfaces to a VLAN in a batch, How to configure.

  • x
  • convention:

ms.america
Created Apr 7, 2017 03:25:27 Helpful(0) Helpful(0)

Hi@HJJ,

You can add interfaces to a VLAN in a batch using a port group, and directly add access interfaces to a VLAN in a batch in the system view.

Access interface

# Add GE0/0/1-GE0/0/5 to VLAN 10 in a batch.

Add interfaces to a VLAN in a batch using a port group.

< HUAWEI> system-view
[HUAWEI] port-group pg1
[HUAWEI-port-group-pg1] group-member gigabitethernet0/0/1 to gigabitethernet0/0/5
[HUAWEI-port-group-pg1] port link-type access
[HUAWEI-port-group-pg1] port default vlan 10

Add interfaces to a VLAN in a batch in the VLAN view.

< HUAWEI> system-view
[HUAWEI] vlan 10
[HUAWEI-vlan10] port gigabitethernet 0/0/1 to 0/0/5 NOTE:
Before performing this operation, configure interfaces to be added to a VLAN as access interface.

Trunk interface

# Add GE0/0/1-GE0/0/5 to VLAN 10 and VLAN 20 in a batch.

< HUAWEI> system-view
[HUAWEI] port-group pg1
[HUAWEI-port-group-pg1] group-member gigabitethernet0/0/1 to gigabitethernet0/0/5
[HUAWEI-port-group-pg1] port link-type trunk
[HUAWEI-port-group-pg1] port trunk allow-pass vlan 10 20Hybrid interface

# Add GE0/0/1-GE0/0/5 to VLAN 10 and VLAN 20 in a batch.

< HUAWEI> system-view
[HUAWEI] port-group pg1
[HUAWEI-port-group-pg1] group-member gigabitethernet0/0/1 to gigabitethernet0/0/5
[HUAWEI-port-group-pg1] port link-type hybrid
[HUAWEI-port-group-pg1] port hybrid tagged vlan 10
[HUAWEI-port-group-pg1] port hybrid untagged vlan 20

If you have any problems, please post them in our Community. We are happy to solve them for you!


View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."

My Followers

Login and enjoy all the member benefits

Login

Huawei Enterprise Support Community
Huawei Enterprise Support Community
Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.