Network Design and Operations

The VLAN ID in an IEEE 802.1Q tag is 12 bits long, and the values 0 and 4095 are reserved for special purposes. How many VLAN IDs can be used to identify VLANs?

  1. A4094
  2. B4095
  3. C4096
Show answer and explanation

Answer: A. 4094

12 bits can represent 2^12 = 4096 values (0 to 4095). Excluding 0, which is used for tags that carry only a priority, and the reserved value 4095 leaves 4096 − 2 = 4094 IDs for identifying VLANs. An 802.1Q tag is 4 bytes long and is inserted after the source MAC address in an Ethernet frame. It consists of a 2-byte value marking it as a tag (0x8100), a 3-bit priority (PCP), a 1-bit DEI and the 12-bit VLAN ID.

  • A. Correct. 2^12 − 2 = 4094.
  • B. This excludes only 0. The value 4095 is reserved as well.
  • C. This is the total number of 12-bit values, without excluding the two reserved ones.
Practice this topic Back to topic

Related calculators

Books on Network Design and Operations Ad

As an Amazon Associate I earn from qualifying purchases.

More Network Design and Operations questions

  1. Switches SW1 and SW2 both have ports in VLAN 10 and VLAN 20. The two switches are to be connected with a single cable so that devices in the same VLAN can communicate across the switches. Which configuration of the connecting ports is appropriate?
  2. In a network where switches are connected with redundant paths, what role does the Spanning Tree Protocol (STP) play?
  3. In STP, the bridge IDs of three switches are known: SW1 has priority 32768 and MAC address 00-00-5E-00-53-01, SW2 has priority 61440 and MAC address 00-00-5E-00-53-05, and SW3 has priority 4096 and MAC address 00-00-5E-00-53-0A. Which switch is elected as the root bridge?
  4. Three switches, SW1, SW2 and SW3, are connected in a triangle with one link between each pair. The STP root bridge is SW1, and SW2 has a lower bridge ID than SW3. All links have the same path cost. Which port is blocked (does not forward frames)?
  5. With default timers, classic STP (IEEE 802.1D) takes about 30 to 50 seconds after a failure before a previously blocked port starts forwarding. Which mechanism lets RSTP switch over faster?

Comparisons in this topic