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.
  1. Enter global configuration mode.
    device# configure terminal
  2. 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.
  3. 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.
  4. Configure a static MAC address on a range of Ethernet ports for multi-range VLANs.
    device(config-mvlan-2-7)# static-mac-address 0000.0063.67ff ethernet 1/1/3 to 1/1/4
  5. Monitor a mirrored port on multi-range VLANs.
    device(config-mvlan-2-7)# monitor ethernet 1/1/1
  6. Set IGMP snooping for multi-range VLANs.
    device(config-mvlan-2-7)# multicast active
    device(config-mvlan-2-7)# multicast6 passive
  7. Enable IP source guard for multi-range VLANs.
    • Enable IP source guard on all ports of multiple VLANs.
      device(config-mvlan-2-7)# source-guard enable
    • Enable IP source guard on a range of ports of multiple VLANs.
      device(config-mvlan-2-7)# source-guard enable ethernet 1/1/3 to 1/1/4
  8. Enable IEEE 802.1W spanning tree on multi-range VLANs.
    device(config-mvlan-2-7)# spanning-tree 802-1w
  9. Exit MVLAN configuration mode.
    device(config-mvlan-2-7)# exit
  10. (Optional) Delete multiple VLANs using one of the following methods.
    • Delete a continuous range of VLANs.
      device(config)# no vlan 2 to 7
    • Delete discontinuous VLANs.
      device(config)# no vlan 2 4 7
    • Delete continuous and discontinuous VLANs.
      device(config)# no vlan 16 17 20 to 24

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