How to delete a single VLAN or VLANs in a batch

1

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.

Other related questions:
How do I create and delete VLANs in a batch
  • 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

  • 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 add interfaces to a VLAN in a batch
    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. 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. 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. 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. 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

    Configure the service VLAN and management VLAN
    Configure the service VLAN and management VLAN. 1. Service VLAN - Command output on the AC: [HUAWEI]wlan [HUAWEI-wlan-view]service-set name test [HUAWEI-wlan-service-set-test]service-vlan 100 Multiple service sets have access to different service VLANs. 2. Management VLAN - Configure PVID and untag for the management VLAN on the switch connected to the AP. Allow packets from the management VLAN to pass through. - On Fit APs, no configuration is required for the interfaces connected to the switch. - On Fat APs, the configurations for wired-side interfaces are the same as the configurations for the interfaces on the switch. Note: 1. It is recommended that you configure the service VLAN and management VLAN differently, and do not use VLAN 1 for both VLANs. 2. In normal cases, there is only one management VLAN, but multiple service VLANs can be configured as required. 3. A service set can contain only one service VLAN. 4. In tunnel forwarding, the switch between the AP and AC does not allow packets from service VLANs to pass through, but in direct forwarding, the switch must allow packets to pass through. 5. If the service VLAN or management VLAN is changed, VLAN configurations on the devices along the path must be modified. If the network is newly deployed, you are advised to dial 400-822-9999 to seek assistance from Huawei's presale team to perform the network planning first.

    Support for batch configuration of dhcp snooping in VLAN view on S series switch
    S series switches (except S1700 switches) in V100R006 and later versions allow you to configure DHCP snooping in multiple VLANs at a time. When performing the DHCP snooping configuration, pay attention to the following points: - You can specify a range of VLAN IDs when running the dhcp snooping enable command in the system view, but the configuration is saved in the configuration file in the VLAN view but not the system view. - Ensure that all the specified VLANs exist on the device. - If you specify a super-VLAN in the dhcp snooping enable command, DHCP snooping takes effect in all the sub-VLANs of the super-VLAN. - The DHCP snooping configuration commands used in the VLAN view cannot specify multiple interfaces in a batch. For example, when you run the dhcp snooping trusted interface interface-type interface-number command in the VLAN view, you can specify only one interface each time.

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