How to Add Interfaces to a VLAN in a Batch?

Latest reply: Jun 25, 2019 02:17:42 222 1 12 1

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

  • Access interface

          # Add Eth2/0/1-Eth2/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 Ethernet 2/0/1 to Ethernet 2/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 Ethernet 2/0/1 to 2/0/5

icon-note.gif NOTE:

Before performing this operation, configure interfaces to be added to a VLAN as access interface.

  • Trunk interface

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

 <Huawei>system-view

 [Huawei]port-group pg1

 [Huawei-port-group-pg1]group-member Ethernet 2/0/1 to Ethernet 2/0/5

 [Huawei-port-group-pg1]port link-type trunk

 [Huawei-port-group-pg1]port trunk allow-pass vlan 10 20
  • Hybrid interface

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

<Huawei>system-view

[Huawei]port-group pg1

[Huawei-port-group-pg1]group-member Ethernet 2/0/1 to Ethernet 2/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

  • x
  • convention:

slamdumk
Created Jun 25, 2019 02:17:42 Helpful(0) Helpful(0)

It is recommended to optimize the format of the echo information.
  • x
  • convention:

Comment

Reply
You need to log in to reply to the post Login | Register

Notice 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."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login