The Tag Protocol Identifier is set to 16 bits.
In the CCNA certification it is said that it's not possible to have more than 4096 VLANs.
4096 in binary is 1000000000000000.
Since 16 bits are allocated anyway, the limit could be 65535(1111111111111111)...
Total Vlan tagging is 4 bytes.
Here TPI (Tagging Protocol Identifier ) is of 2 bytes(16 bits)
and TCI (Tagging Control Information ) is of 2 bytes (16 bits)
In TCI, we have PCP(Priority Code Point)=> 3 bits
DEI(Drop Eligible Indicator) = > 1 bit
and VID(Vlan Identifier) =>12 bits.
2 power 12 is 4096.
that is the reason vlan numbers are 4096 (including all reserved vlans)
And many boxes are far more limited, really - 255 VLANs picked from 1-4093 (not 4094) is the case on some of my switches. The numerical range is available but the switch can only use 255 individual numbers from it at one time. So far this has never even come close to being a practical problem here.
Actually in vlan header contains TPID(16 bits),PCP(3 bits),CFI(1 bit)and VID(12 bits).
in vlans we are using vlan id's for transport of traffic from one switch to another switch.
so the vlan id i.e vlan identifier is 12 bits.
output:2^12=4096.(in binary format).but we are using traffic of multiple vlans from 1 to 4094 at a time only.the remaining two bits is reserved i.e 0 and 4095.