6-1: VLAN Configuration
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 11000 and extended range 10254096). 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.
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."
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.
Specify a VTP name:
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.
The global configuration command vtp domain is not available on all switches that run IOS.
Disable VTP synchronization:
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.
The global configuration command vtp mode transparent is not available on all switches that run IOS.
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.
Create the VLAN.
VLANs are created by number. The two ranges of VLANs are as follows:
The standard range consists of VLANs 1 to 1000.
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.
Table 6-1 Configurable VLAN Parameters
A description of the VLAN up to 32 characters. If none is given, it defaults to VLAN00XXX, where xxx is the VLAN number.
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.
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.
Many other options are available during the VLAN configuration command; however, most of these deal with the configuration of FDDI and Token Ring VLANs. Because these are not widely used topologies, the options and descriptions of Token Ring and FDDI VLAN configuration and parameters have not been included in this book. For information on Token Ring or FDDI VLANs, refer to http://www.cisco.com/univercd/cc/td/doc/product/ lan/cat5000/rel_6_3/config/vlans.htm.
Create a VLAN in the standard range:
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-idcommand to move to vlan-config mode. From vlan-config mode, you can manage the parameters of the VLANs.
You cannot modify any of the parameters for VLAN 1.
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.
Enable spanning-tree MAC reduction:
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.
After you have created a VLAN in the extended range, you cannot disable this feature unless you first delete the VLAN.
Create a VLAN in the extended range:
Here the vlan-id would be a number from 1025 to 4096. Numbers 1001 to 1024 are reserved by Cisco and cannot be configured.
For Catalyst 6000 series switches with FlexWAN cards, the system identifies these ports internally with VLAN numbers starting with 1025. If you have any FlexWAN modules, be sure to reserve enough VLAN numbers (starting with VLAN 1025) for all the FlexWAN ports you want to install. You cannot use these extended VLANs if you install FlexWAN ports.
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-config
For the Supervisor IOS, extended VLANs such as 2112 are not supported.
An 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
I wound up realizing that MAC-based VLANs isn't really what I wanted, and that Group-based VLANs are actually much more flexible. From here on out, the information will regard to accomplishing VLAN assignment based on group membership.
I followed this really great guide published by Meraki. It is 99% generic so if you're not a Meraki shop don't worry. There were just 2-3 settings to change in the Meraki and you can probably translate that into your system easily enough.
- Windows Server 2012 R2 (in VMware Workstation)
- Domain Controller
- 192.168.3.1 /24 (primary scope)
- 192.168.4.1 /24 (scope will be used for VLAN 400)
- 192.168.5.1 /24 (scope will be used for VLAN 500)
- Option 3 (Router) set to point to Aruba switch (18.104.22.168)
- DNS (standard setup)
- Certificate Services
- (I followed this guide. Skip the part where they have you test revoking a cert. It made a bit of extra work)
- Connected to port 1 on the switch
- L3 Aruba 2920-24G Switch
- Configured for routing inside test network (but not out to the Internet)
- Don't forget IP helpers
- sho config listed below for reference
- Cisco Meraki MR18 WAP
- Connected to port 3 on the switch
- Configured to use RADIUS (link in comments...I'm new to this stackexchange network and I can't post more than 2 in the body)
- 2x Lenovo ThinkPad 11e Laptops (wireless clients to test with)
- Joined to domain
- Named "WIRELESSLAPTOP" and "WIRELESSLAPTOP2"
- AD Structure
- OU: "Test Machines" containing both laptops
- OU: "VLAN Assignment Groups"
- Group: "VLAN 400" with member "WIRELESSLAPTOP2"
- Group: "VLAN 500" with member "WIRELESSLAPTOP"
Following the guide and then expanding a little, I wound up with three network policies. There is a VLAN 400 Policy which injects the VLANID 400 into the RADIUS-ACCEPT packet, and there's a VLAN 500 Policy which works the same way. There is also a required default policy of sorts (explained in the guide). Each of these policies has a "Conditions" list, and that is where you assign that policy to a group. Just stick your computers in that group and they'll be good to go.
Now when I connect these two laptops to the network, one lands on the 400 VLAN and gets a 4.x address, and the other lands on the 500 VLAN and gets a 5.x address. These assignments can be changed as easily as group membership.
I believe this will be a pretty robust solution for us moving forward. Note to the reader, this is a complex solution so while the manageability is nice, be sure it's something you'll need and use before introducing several new layers of complexity into your environment.