No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S1720, S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Common Operation Guide

This document describes the CLI-based configurations of universal protocols and common features for Huawei switches on basic networks.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Adding Interfaces to a VLAN in a Batch

Adding Interfaces to a VLAN in a Batch

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 VLAN view.

  • Set the link type of interfaces to access.
    • Add interfaces to a VLAN in a batch using a port group.

      <HUAWEI> system-view
      [HUAWEI] port-group pg1  //Create a port group named pg1.
      [HUAWEI-port-group-pg1] group-member gigabitethernet1/0/1 to gigabitethernet1/0/5  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to the port group.
      [HUAWEI-port-group-pg1] port link-type access  //Set the link type of gigabitethernet1/0/1 to gigabitethernet1/0/5 to access.
      [HUAWEI-port-group-pg1] port default vlan 10  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to VLAN 10.
    • Add interfaces to a VLAN in a batch in the VLAN view.

      <HUAWEI> system-view
      [HUAWEI] vlan 10
      [HUAWEI-vlan10] port gigabitethernet 1/0/1 to 1/0/5  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to VLAN 10.
      NOTE:

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

  • Set the link type of interfaces to trunk.
    <HUAWEI> system-view
    [HUAWEI] port-group pg1  //Create a port group named pg1.
    [HUAWEI-port-group-pg1] group-member gigabitethernet1/0/1 to gigabitethernet1/0/5  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to the port group.
    [HUAWEI-port-group-pg1] port link-type trunk  //Set the link type of gigabitethernet1/0/1 to gigabitethernet1/0/5 to trunk.
    [HUAWEI-port-group-pg1] port trunk allow-pass vlan 10 20  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to VLAN 10 and VLAN 20.
  • Set the link type of interfaces to hybrid.
    <HUAWEI> system-view
    [HUAWEI] port-group pg1  //Create a port group named pg1.
    [HUAWEI-port-group-pg1] group-member gigabitethernet1/0/1 to gigabitethernet1/0/5  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to the port group.
    [HUAWEI-port-group-pg1] port link-type hybrid  //Set the link type of gigabitethernet1/0/1 to gigabitethernet1/0/5 to hybrid.
    [HUAWEI-port-group-pg1] port hybrid tagged vlan 10  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to VLAN 10 in tagged mode.
    [HUAWEI-port-group-pg1] port hybrid untagged vlan 20  //Add gigabitethernet1/0/1 to gigabitethernet1/0/5 to VLAN 20 in untagged mode.
Translation
Download
Updated: 2018-09-03

Document ID: EDOC1000057410

Views: 84073

Downloads: 12095

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next