How do I create and delete VLANs in a batch

18

  • Run the vlan batch command in the system view to create VLANs in a batch.

    • Create 10 contiguous VLANs: VLANs 11 to 20.
      <Huawei> system-view
      [Huawei] vlan batch 11 to 20

    • Create 10 incontiguous VLANs in a batch: VLAN 10, VLANs 15 to 19, VLAN 25, VLANs 28 to 30.
      <Huawei> system-view
      [Huawei] vlan batch 10 15 to 19 25 28 to 30

    NOTE:

    You can create a maximum of 10 incontiguous VLANs or VLAN range at one time. If there are more than 10 VLANs, run this command multiple times. For example, the vlan batch 10 15 to 19 25 28 to 30 command creates four incontiguous VLAN ranges.


  • Run the undo vlan batch command in the system view to delete VLANs in a batch.

    • Delete VLANs 10 to 20.
      <Huawei> system-view
      [Huawei] undo vlan batch 10 to 20
  • Other related questions:
    How to create VLANs in a batch
    Run the vlan batch command in the system view to create VLANs in a batch. Create 10 contiguous VLANs: VLAN 11 to VLAN 20. system-view [HUAWEI] vlan batch 11 to 20 Create 10 discontiguous VLANs in a batch: VLAN 10, VLAN 15 to VLAN 19, VLAN 25, VLAN 28 to VLAN 30. system-view [HUAWEI] vlan batch 10 15 to 19 25 28 to 30 NOTE: You can create a maximum of 10 discontiguous VLANs or VLAN range at one time. If there are more than 10 VLANs, run this command multiple times. For example, the vlan batch 10 15 to 19 25 28 to 30 command creates four discontiguous VLAN ranges.

    How to delete a single VLAN or VLANs in a batch
    The device supports deletion of a single VLAN or VLANs in a batch. Delete VLAN 10. system-view [HUAWEI] undo vlan 10Delete VLAN 10 to VLAN 20 in a batch. system-view [HUAWEI] undo vlan batch 10 to 20 NOTE: In the earlier versions of V200R005, before deleting a VLAN where a VLANIF interface has been configured, run the undo interface vlanif command to delete the VLANIF interface.

    If you have more questions, you can seek help from following ways:
    To iKnow To Live Chat
    Scroll to top