· VLANs are broadcast domains defined within switches to allow control of broadcast, multicast, unicast, and unknown unicast within a Layer 2 device.
· VLANs are defined on a switch in an internal database known as the VLAN Trunking Protocol (VTP) database. After a VLAN has been created, ports are assigned to the VLAN.
· VLANs are assigned numbers for identification within and between switches. Cisco switches have two ranges of VLANs, the normal range and extended range.
· VLANs have a variety of configurable parameters, including name, type, and state.
· Several VLANs are reserved, and some can be used for internal purposes within the switch.
Creation of an Ethernet VLAN
VLANs are created on Layer 2 switches to control broadcasts and enforce the use of a Layer 3 device for communications. Each VLAN is created in the local switch's database for use. If a VLAN is not known to a switch, that switch cannot transfer traffic across any of its ports for that VLAN. VLANs are created by number, and there are two ranges of usable VLAN numbers (normal range 1–1000 and extended range 1025–4096). When a VLAN is created, you can also give it certain attributes such as a VLAN name, VLAN type, and its operational state. To create a VLAN, use the following steps.1. Configure VTP.
VTP is a protocol used by Cisco switches to maintain a consistent database between switches for trunking purposes. VTP is not required to create VLANs; however, Cisco has set it up to act as a conduit for VLAN configuration between switches as a default to make administration of VLANs easier. Because of this, you must first either configure VTP with a domain name or disable VTP on the switch. VTP is explained in detail in section "6-4: VLAN Trunking Protocol."
o Specify a VTP name:
COS | set vtp domain domain-name |
IOS | (vlan) vtp domain domain-name -OR- (global) vtp domain domain-name |
o By default, the VTP is in server mode and must be configured with a domain name before any VLANs can be created. These commands specify the VTP domain name. For IOS switches, you enter vlan database mode, (vlan), by entering the command vlan database, at the privileged-level prompt.
-OR-
o Disable VTP synchronization:
COS | set vtp mode transparent |
IOS | (vlan) vtp transparent -OR- (global) vtp mode transparent |
o Another option is to disable VTP synchronization of the databases. Disabling it enables you to manage your local VTP database without configuring and relying on VTP. For Catalyst 4000 and 6000 switches running IOS Supervisor 12.1(8a) or above (native IOS), you can configure the VTP parameters in global configuration mode as well.
-OR-
o Disable VTP:
COS | set vtp mode off |
IOS | N/A |
o With the introduction of COS version 7.1.1, an option now exists to disable VTP completely. Use the command set vtp mode off to turn off VTP. After doing so, you can administer the local VTP database.
2. Create the VLAN.
VLANs are created by number. The two ranges of VLANs are as follows:
o The standard range consists of VLANs 1 to 1000.
o The extended range consists of VLANs 1025 to 4096.
Extended VLANs are currently supported only on switches running COS software version 6.1 or greater. When you create a VLAN, you have many options to consider. Many options are valid only for FDDI and Token Ring VLANs. Some of the items configured deal with options, such as private VLANs, which are discussed in other sections in this book. VLANs are created using the set vlan command for COS devices or with the vlan command in vlan database mode for IOS switches. For Ethernet VLANs, you can also configure the standard parameters in Table 6-1.
Configurable VLAN Parameters
Parameter | Description |
name | A description of the VLAN up to 32 characters. If none is given, it defaults to VLAN00XXX, where xxx is the VLAN number. |
mtu | The maximum transmission unit (packet size, in bytes) that the VLAN can use; valid values are from 576 to 18190. The MTU can extend up to 1500 for Ethernet, but beyond for Token Ring or FDDI. The default is 1500. |
state | Used to specify whether the state of the VLAN is active or suspended. All ports in a suspended VLAN will be suspended and not allowed to forward traffic. The default state is active. |
COS | set vlan vlan-id [name name] [state state] [mtu mtu] |
IOS | (vlan) vlan vlan-id [name vlan-name] [state {suspend | active}] [mtu mtu-size] (global) vlan vlan-id (vlan-config) vlan vlan-id [mtu mtu-size] [name vlan-name] [state {suspend | active}] |
c. The vlan-id specifies the VLAN by number. For COS you can specify a range of VLANs in the vlan-id section; you cannot configure the name for a range of VLANs, however, because each VLAN is to have a unique name. For IOS switches, VLANs are created in vlan database mode. For Catalyst 6000 and 4000 switches running Supervisor IOS 12.1(8a) and above, you can create VLANs in global configuration mode if the switch is in VTP transparent mode. To do this, enter the vlan vlan-id command to move to vlan-config mode. From vlan-config mode, you can manage the parameters of the VLANs.
d. Create a VLAN in the extended range.
Extended VLANs support VLANs up to 4096 in accordance with the 802.1Q standard. Currently only switches running COS 6.1 or greater can support creation and assignment of VLANs in the extended range. You cannot currently use VTP to manage VLANs in the extended range, and these VLANs cannot be passed over an Inter-Switch Link (ISL) trunk link.
1. Enable spanning-tree MAC reduction:
COS | set spantree macreduction enable |
IOS | N/A |
2. To allow these switches to use the extended range, you must first enable spanningtree macreduction to allow the switch to support a large number of spanning-tree instances with a very limited number of MAC addresses and still maintain the IEEE 802.1D bridge ID requirement for each STP instance.
3. After you have created a VLAN in the extended range, you cannot disable this feature unless you first delete the VLAN.
4. Create a VLAN in the extended range:
COS | set vlan vlan-id [name name] [state state] [mtu mtu] |
IOS | N/A |
6. Here the vlan-id would be a number from 1025 to 4096. Numbers 1001 to 1024 are reserved by Cisco and cannot be configured.
Feature Example
In this example, the switches Access_1 and Distribution_1 are going to be configured with VLANs 5, 8, and 10 with the names Cameron, Logan, and Katie, respectively. Also the distribution switch will be configured with VLAN 2112 with the name Rush.An example of the Catalyst OS configuration for Distribution 1 follows:
Distribution_1 (enable)>set vtp mode transparent
Distribution_1 (enable)>set vlan 5 name Cameron
Distribution_1 (enable)>set vlan 8 name Logan
Distribution_1 (enable)>set vlan 10 name Katie
Distribution_1 (enable)>set spantree macreduction enable
Distribution_1 (enable)>set vlan 2112 name Rush
Distribution_1 (enable)>An example of the Supervisor IOS configuration for Distribution 1 follows:
Distribution_1#vlan database
Distribution_1(vlan)#vtp transparent
Distribution_1(vlan)#exit
Distribution_1#conf t
Distribution_1(config)#vlan 5
Distribution_1(config-vlan)# name Cameron
Distribution_1(config-vlan)#vlan 8
Distribution_1(config-vlan)# name Logan
Distribution_1(config-vlan)# vlan 10
Distribution_1(config-vlan)# name Katie
Distribution_1(config-vlan)# end
Distribution_1 #copy running-config startup-configAn example of the Layer 2 IOS configuration for Access 1 follows:
Access_1#vlan database
Access_1 (vlan)#vtp transparent
Access_1 (vlan)#vlan 5 name Cameron
Access_1 (vlan)#vlan 8 name Logan
Access_1 (vlan)#vlan 10 name Katie
Access_1 (vlan)#exit
Access_1#copy running-config startup-config