IEEE 8021Q Overview

What is a VLAN? The answer is simple: It is a broadcast domain. In other words, a VLAN defines how far a broadcast packet can radiate. Assuming no routing is involved, traffic entering a physical LAN switch port configured to be part of a given VLAN is constrained to other ports that are also members of that VLAN. VLANs offer a practical and easy way to implement network segmentation at Layer 2 of the Open Systems Interconnection (OSI) model.

A VLAN is primarily identified by a user-defined number, which usually ranges from 1 to 4096. Physical links can carry multiple VLANs, in which case, they are known as trunk ports. Packets traveling on trunk ports are identified as belonging to a certain VLAN by means of a data link layer tag. Two protocols are used for that purpose:

• Cisco Inter-Switch Link (ISL)

ISL actually encapsulates the original Ethernet frame by entirely wrapping it inside another frame comprised of a new source and destination MAC address, a new Ethertype, and a new frame check sequence (FCS). For all practical purposes, consider that the more "recent" 802.1Q tag replaced ISL. (The word "recent" is in quotation marks because the IEEE 802.1Q specification was ratified as a standard in February 1998.1) Figure 4-1 shows the structure of an 802.1Q tag.

Figure 4-1 802.1Q Tag

802.1Q Tag 4 Bytes

Readers' Questions

  • raymond
    Which three fields are found in an 802.3 ethernet frame?
    4 months ago
  • The three fields found in an 802.3 Ethernet frame are:
    1. Destination MAC Address: It specifies the MAC address of the destination device to which the frame is being sent.
    2. Source MAC Address: It specifies the MAC address of the device that is sending the frame.
    3. EtherType/Length: This field differs depending on whether it is an Ethernet II frame or IEEE 802.3 frame. In Ethernet II, it is called EtherType, which indicates the type of data being carried in the frame (e.g., IP, ARP, etc.). In IEEE 802.3, it is called Length, which indicates the length of the frame's payload.Note: "EtherType/Length" is considered as one field, even though it has slightly different names depending on the frame type.
    • sara
      How many bytes are in an ieee 802.1q vlan tag?
      10 months ago
    • An IEEE 802.1Q VLAN tag is 4 bytes in length.
      • EDEN
        How many bits within the ieee 802.1q tag are used to identify the vlan of the frame?
        10 months ago
      • The IEEE 802.1Q tag uses 12 bits to identify the VLAN of the frame.

        EtherType 0 x 8100

        Pri

        CFI

        VID

        2 Bytes

        3 Bits

        1 Bit

        12 Bits

        2 Bytes

        J

        »

        Destination MAC

        Source MAC 1

        Dot 1Q

        EtherType

        Ethernet Frame with 802.1Q Tag (Not to Scale)

        Ethernet Frame with 802.1Q Tag (Not to Scale)

        A complete 802.1Q tag is comprised of two parts that are each 2 bytes long. The first part is the Ethertype, which is found in every 802.3/DIX-format Ethernet frame. It identifies the protocol carried in the frame. In the case of 802.1Q, the Ethertype value is always 0x8100. The presence of this value instructs the switch to decode the 2 bytes following the Ethertype as an 802.1Q tag. The tag itself is made up of three fields:

        • Three bits of priority

        • One bit for the canonical flag indicator

        • Twelve bits for the actual VLAN number

        The first three bits are roughly equivalent to the IP's precedence bits found in the type of service (ToS) byte. At Layer 2, they provide different levels of service in case of congestion. The next bit is used for compatibility between Ethernet and Token Ring environments. For Ethernet, it is set to 0. The last 12 bits identify the VLAN ID, which is from where the 4096 figure comes. (212 yields 4096 possible values.) Technically speaking, the 802.1Q tag is 2-bytes long. However, because it doesn't exist without an Ethertype that announces its presence, literature commonly lists it as 4-bytes long in total. The bottom part of Figure 4-1 represents an 802.1Q-tagged 802.3 Ethernet frame. For example, in the case of a frame carrying an IP datagram, a second Ethertype (0 x 0800 for IP) immediately follows the 2-byte 802.1Q tag, followed by the IP header and the rest of the frame.

        Continue reading here: Go Native

        Was this article helpful?

        0 0