Creating and Configuring a Multi-Range VLAN
You can create and configure multi-range
VLANs using various VLAN parameters. These VLANs can be continuous or discontinuous
or a
combination of continuous and discontinuous VLANs.
- Enter global configuration mode.
- Create a multi-range VLAN using
one of the following methods.
- Create a continuous range
of
VLANs.
device(config)# vlan 2 to 7
- Create discontinuous
VLANs.
device(config)# vlan 2 4 7
- Create continuous and discontinuous
VLANs.
device(config)# vlan 16 17 20 to 24
Note: You can create or configure a maximum number of 1024 VLANs with a single command. - Create a continuous range
of
VLANs.
- Add a tagged port or a range of
ports to multi-range VLANs.
device(config-mvlan-2-7)# tagged ethernet 1/1/3 to 1/1/4
device(config-mvlan-16*24)# tagged ethernet 1/1/1
In the first example, the tagged Ethernet ports 1/1/3 and 1/1/4 are added to VLANs, 2 through 7. In the second example, the tagged Ethernet port 1/1/1 is added to VLANs 16, 17, 20, 21, 22, 23, and 24. - Configure a static MAC address on a range of Ethernet ports for multi-range VLANs.
- Monitor a mirrored port on multi-range VLANs.
- Set IGMP snooping for multi-range VLANs.
- Enable IP source guard for multi-range VLANs.
- Enable IEEE 802.1W spanning tree on multi-range VLANs.
- Exit MVLAN configuration mode.
- (Optional) Delete multiple VLANs using one of the following methods.
The following example shows how to configure multi-range VLANs using various VLAN parameters.
device# configure terminal device(config)# vlan 2 to 7 device(config-mvlan-2-7)# tagged ethernet 1/1/3 to 1/1/4 device(config-mvlan-2-7)# static-mac-address 0000.0063.67ff ethernet 1/1/3 to 1/1/4 device(config-mvlan-2-7)# monitor ethernet 1/1/1 device(config-mvlan-2-7)# multicast active device(config-mvlan-2-7)# source-guard enable device(config-mvlan-2-7)# spanning-tree 802-1w device(config-mvlan-2-7)# exit device(config)# no vlan 2 to 7