23

This answer says vlans 0 and 4095 are reserved. Wikipedia agrees that vlans 0 and 4095 are reserved. This article says that Cisco reserves vlan 1 (in addition to vlans 0 and 4095).

But I am having trouble finding good information on what are these vlans reserved for? and/or why they are reserved?

Please include good authoritative sources please or references to the spec.

If I want to transmit/receive, is it a good rule of thumb to just not use vlans 0,1,4095?

Trevor Boyd Smith
  • 333
  • 1
  • 2
  • 7

2 Answers2

21

The Wikipedia article you mention gives a succinct explanation:

VLAN identifier (VID): a 12-bit field specifying the VLAN to which the frame belongs. The hexadecimal values of 0x000 and 0xFFF are reserved. All other values may be used as VLAN identifiers, allowing up to 4,094 VLANs. The reserved value 0x000 indicates that the frame does not carry a VLAN ID; in this case, the 802.1Q tag specifies only a priority and is referred to as a priority tag. On bridges, VID 0x001 (the default VLAN ID) is often reserved for a management VLAN; this is vendor-specific. The VID value 0xFFF is reserved for implementation use; it must not be configured or transmitted. 0xFFF can be used to indicate a wildcard match in management operations or filtering database entries.

As you can see, there isn't really a usable VLAN 0 or 4095. Cisco uses VLAN 1 as a default VLAN, and management protocols (STP, CDP, DTP, etc) are sent on VLAN 1.

You can use VLAN 1 for simple installations where there is no VLAN trunking, but good practice is to not put user data on VLAN 1 in a multi-VLAN environment.

Ron Trunk
  • 66,852
  • 5
  • 65
  • 126
8

Vlan 0 does have an use.

When a client requires CoS, but doesn't know the vlan, it tags its traffic with VLAN 0, which is recognized by the switch to mean the default untagged vlan of that port, whatever it may be.

http://standards.ieee.org/getieee802/download/802.1Q-2005.pdf

page 76 Section 9.6, Table 9-2.

flow in
  • 81
  • 1
  • 2
  • 3
    That isn't vid 0, it's literally "untagged" with a vlan PCP value (what you call CoS). Yes, the header value ends up being 12 zero-bits, but that is not "0" by spec, it is "untagged". – Nick Bastin Nov 11 '17 at 21:07
  • Not quite. VLan0 *is* tagged, as mentioned; its just a NULL tag, and it is not the same as untagged. Not only is the structure of the frame different, but it won't be tagged at an access port. Its got a tag. And that tag says don't treat this tag the same way as you do other tags. – Gerard ONeill Apr 21 '23 at 21:29