Sub topic 3
VLAN IDs: usable and reserved values
This chapter covers the 12-bit VLAN ID: which values you can assign, which are reserved, how the normal and extended ranges differ, and what happens when a switch sees a value it should not. It assumes you know what a VLAN is, what an access port and a trunk port do, and how to read basic switch configuration. The tag format is covered in detail in a later chapter. Here we only need to know that the VLAN ID lives inside it.
Where the VLAN ID comes from
An 802.1Q tag carries a VLAN ID (VID) in a 12-bit field. Twelve bits give 4096 possible values, numbered 0 to 4095. The VID is the only part of the tag that says which VLAN a frame belongs to. Two switches agree that a frame belongs to VLAN 10 only because both read the same number from the tag.
The VID is just a label. It has no meaning outside the switches that share it. VLAN 10 on one site and VLAN 10 on another site are unrelated unless you connect them with a trunk. Nothing in the standard ties a VID to an IP subnet. That pairing is a design convention, such as VLAN 10 using 192.168.10.0/24, and it exists only because people find it easier to remember.
The full range at a glance
Not all 4096 values can carry user traffic. The table shows how the range divides.
| VID | Status | Use |
|---|---|---|
| 0 | Reserved | Priority-tagged frame with no VLAN. The tag carries only priority bits. |
| 1 | Usable, default | Default VLAN. All ports start here. It cannot be deleted. |
| 2–1001 | Usable, normal range | Ordinary VLANs. |
| 1002–1005 | Reserved on Cisco | Legacy FDDI and Token Ring defaults. Cannot be deleted or reused. |
| 1006–4094 | Usable, extended range | Ordinary VLANs, with platform restrictions. |
| 4095 | Reserved | Not to be used. Reserved by the standard. |
The standard itself reserves only 0 and 4095. It also defines VID 1 as the default port VLAN. The ranges 1–1005 and 1006–4094 come from Cisco's implementation, which many other vendors mirror loosely. Check your own platform's documentation before assuming the same limits apply.
The reserved values
VID 0: priority tag only
A frame tagged with VID 0 carries a tag, but the tag does not name a VLAN. Its purpose is to carry the 3-bit priority field (PCP) for a frame that otherwise belongs to no particular VLAN. The receiving switch treats the frame as belonging to the VLAN configured for the port it arrived on, usually the access or native VLAN, and it still honours the priority bits.
You rarely configure this yourself. Some end devices send priority-tagged frames, and a switch must accept them. You cannot create VLAN 0 on a switch. The command is rejected.
VID 4095: reserved
The standard reserves 4095 and says it must not be configured or transmitted. Switches reject it as a configurable VLAN. Some implementations use it internally, for example as a marker for "all VLANs" or "no VLAN," so treat it as unavailable on every platform.
VID 1: the default VLAN
Every port on a new switch is an access port in VLAN 1. You cannot delete VLAN 1, and on Cisco devices you cannot rename it. Many control protocols, such as CDP, VTP and DTP, are sent on VLAN 1 by default. On a trunk, VLAN 1 is also the default native VLAN.
Because every unconfigured port is already a member, VLAN 1 tends to grow into a catch-all. A common design rule is to put no user traffic in VLAN 1. Assign users and servers to other VLANs, and move unused ports to a dedicated, shut-down parking VLAN. You can still allow or remove VLAN 1 on a trunk on modern software, but its control traffic is part of why people avoid using it for data.
VIDs 1002–1005: legacy reserved
Cisco reserves 1002 through 1005 for FDDI and Token Ring. They exist on every switch, appear in show vlan brief, and cannot be deleted. Do not try to use them for Ethernet. These IDs show up in output even on a network that never saw those technologies.
Normal range and extended range
Cisco splits the usable IDs into two groups. The split matters for how the VLANs are stored and which modes support them.
| Property | Normal range (1–1005) | Extended range (1006–4094) |
|---|---|---|
| Stored in | `vlan.dat` in flash, on classic IOS | Running configuration |
| VTP v1 and v2 | Supported | Not supported |
| VTP v3 | Supported | Supported |
| Typical use | Most enterprise designs | Large or service-provider designs |
Two practical consequences follow.
- In VTP server or client mode on versions 1 and 2, you cannot create extended-range VLANs. The switch must be in transparent mode, or off. Newer VTP version 3 lifts this limit.
- Because extended VLANs on classic IOS live in the running configuration, you must save the configuration for them to survive a reload.
Most small and mid-sized networks never leave the normal range. A single site with a few dozen VLANs does not need extended IDs. Large data centres and carriers use them because 1000 values is not enough once you give each tenant or customer its own VLAN.
Many platforms also limit how many VLANs can exist or be active at once, regardless of the ID range. A switch may allow only 255 or 1005 VLANs. Having IDs available does not mean you can create all of them.
Creating VLANs and checking IDs
You create a VLAN by naming its ID. The name is optional and only a label for humans.
vlan 10
name USERS
vlan 20
name SERVERS
vlan 2000
name TENANT-AIf the switch is in VTP client mode on version 1 or 2, VLAN 2000 is rejected. The switch prints an error saying that extended-range VLANs cannot be configured in that mode.
Try to create a reserved ID and the switch refuses.
vlan 4095
vlan 1002The first command fails because 4095 is outside the allowed range. The second is accepted in a limited way, since 1002 already exists, but you cannot change its type or delete it. On many releases the CLI reports that the VLAN is reserved for a legacy technology.
To see which IDs exist, and which ports use them:
show vlan briefThe output lists VLAN 1 and the four legacy IDs even on a switch you just unboxed. This is normal. Your own VLANs appear beside them.
Reading the VID from a frame
You can confirm what a frame carries by decoding its tag. This function reads the two bytes after the source MAC address, checks for the 802.1Q tag type, and returns the VID. It also flags the two reserved values.
import struct
RESERVED = {0: "priority tag only", 4095: "reserved"}
def vlan_id(frame: bytes):
"""Return (vid, note) for an Ethernet frame, or None if it is untagged."""
tpid, tci = struct.unpack("!HH", frame[12:16])
if tpid != 0x8100:
return None
vid = tci & 0x0FFF
return vid, RESERVED.get(vid, "usable")
# Example: destination MAC, source MAC, tag for VLAN 10, then the type field.
frame = bytes(6) + bytes(6) + b"\x81\x00" + (10).to_bytes(2, "big") + b"\x08\x00"
print(vlan_id(frame))Running this prints (10, 'usable'). Change the tag bytes to 0 or 4095 and the note changes. The mask 0x0FFF keeps the lower 12 bits of the TCI field and discards the priority and drop-eligible bits above them.
Common mistakes
- Using VLAN 1 for user traffic. It works, but it mixes user data with control protocols and leaves every forgotten port in the same domain as your users.
- Assuming the VID matches the subnet. If VLAN 10 uses 192.168.20.0/24 the network still works. The mismatch only confuses people and invites configuration errors.
- Creating extended VLANs in VTP client or server mode. The command is rejected. Use transparent mode or VTP version 3.
- Forgetting to save extended-range VLANs. After a reload they can vanish on classic IOS if they were never written to startup configuration.
- Reusing VIDs with different meanings across sites. VLAN 30 as guests at one site and as servers at another is legal. It makes trunking between the sites dangerous.
- Trying to delete VLAN 1 or 1002–1005. These can never be removed. Keep ports out of them instead.
Choosing IDs in practice
There is no single correct numbering scheme, but a few habits make a network easier to run.
- Pick a pattern and keep it. For example, use 10s for users, 20s for servers, and 90s for management.
- Leave gaps so you can add related VLANs later without renumbering.
- Keep VLAN numbers and subnet third octets aligned where you can, as a memory aid.
- Park unused ports in a dedicated VLAN with a high number such as 999, shut down and not trunked anywhere.
- Document every ID, its purpose and its subnet. The VID alone tells you nothing.
Exercise
A colleague says you can use VLAN 4095 for a new management network, since it is the highest ID and unlikely to clash. Another says VLAN 1003 is fine because it is unused. Explain why both are wrong, and name one range you could use instead.
Show answer
VID 4095 is reserved by the 802.1Q standard and cannot be configured as a VLAN. VID 1003 is in the 1002–1005 block that Cisco reserves for FDDI and Token Ring, so it exists already and cannot be reused for Ethernet. Instead choose an ID in the normal range 2–1001, such as 90, or an extended-range ID in 1006–4094 if the platform and VTP mode allow it.
Exercise
A switch in VTP client mode (version 2) rejects the command vlan 2500. What is the cause, and give two ways to fix it.
Show answer
VLAN 2500 is in the extended range (1006–4094), which VTP versions 1 and 2 do not support in server or client mode. Fix it by changing the switch to VTP transparent mode (or off) and creating the VLAN locally, or by moving the network to VTP version 3, which supports extended-range VLANs. Alternatively, choose an ID in the normal range 2–1001.