< Home

vlan range

Function

The vlan range command creates a temporary VLAN range and displays the VLAN-Range view.

By default, no temporary VLAN ranges are created.

Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.

Format

vlan range { vlan-id1 [ to vlan-id2 ] } &<1-10>

Parameters

Parameter Description Value
vlan-id1 [ to vlan-id2 ]
Specifies VLAN IDs to be created in batches:
  • vlan-id1 specifies the start VLAN ID.

  • vlan-id2 specifies the end VLAN ID.

    vlan-id2 must be greater than or equal to vlan-id1. vlan-id1 and to vlan-id2 specify a VLAN range.

  • If to vlan-id2 is not specified, only the VLAN specified by vlan-id1 is configured.

The value is an integer ranging from 1 to 4094.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Manually configuring and maintaining VLANs is challenging on a large Layer 2 network. Configuration inconsistency may also occur. To improve maintenance efficiency and simplify configurations, run the vlan range command to create a temporary VLAN range. You can then configure services in the VLAN-Range view. Configured services will be delivered in batches to all the VLANs in the VLAN range.

Precautions

The vlan range command configuration is not saved in the configuration file. If services are configured in the VLAN-Range view, the service configurations of all the VLANs in the VLAN range will be saved in the configuration file.

A temporary VLAN range fails to be created if the specified VLAN is a dynamic VLAN or is not created. VLANs that have been added to a temporary VLAN range will automatically leave the VLAN range after being deleted.

Configuration Impact

If the vlan range command is run more than once, all configurations take effect.

Example

# Create a VLAN range 10 to 20 and enter the VLAN-Range view.

<HUAWEI> system-view
[HUAWEI] vlan batch 10 to 20
[HUAWEI] vlan range 10 to 20
[HUAWEI-vlan-range]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >