What are the VLAN ranges, and where does a Cisco switch store its VLAN configuration?
Show the answer
Say this first
The VLAN ID is 12 bits, so 0 to 4095; 0 and 4095 are reserved, leaving 1 to 4094. On Cisco, 1 to 1005 is
the normal range (VLAN 1 is the default and cannot be deleted, 1002 to 1005 are reserved for FDDI and
Token Ring) and 1006 to 4094 is the extended range. Normal-range VLANs live in vlan.dat in flash, not
in the running config, unless the switch runs VTP transparent or off mode.
Go deeper
| Range | Use |
|---|---|
| 0 | Reserved (priority-tagged frames carry VLAN 0) |
| 1 | Default VLAN, cannot be deleted |
| 2 to 1001 | Normal range, VTP versions 1 and 2 can advertise them |
| 1002 to 1005 | Reserved legacy FDDI and Token Ring VLANs |
| 1006 to 4094 | Extended range: needs VTP transparent or off, or VTPv3 |
| 4095 | Reserved |
The vlan.dat trap
write erase clears the startup config but not vlan.dat. A switch "reset to defaults" still boots
with its old VLANs, VTP domain and revision number. To really clear it:
SW1# write erase
SW1# delete flash:vlan.dat
SW1# reloadIn the running config or not
In VTP server or client mode, show running-config does not list VLANs; back up vlan.dat or use
show vlan brief. In transparent or off mode, VLANs appear in the running config and are saved with it.
They will ask next
Can you use all 4094 VLANs on a switch?
Rarely. Platforms cap active VLANs and spanning-tree instances well below that. Some also reserve extended-range VLANs internally for routed ports, which
show vlan internal usagelists on platforms that do this, such as the Catalyst 6500.
Traps
- Saying there are 4096 usable VLANs. There are 4094.
- Assuming
write eraseclears VLANs on a Catalyst switch.