IP Packet Format

IP Packets Product Documentation contains the main data transmission protocol used in a variety of packet formats, packet example. By IP Packets Product Documentation, be able to enhance understanding of various protocol packets.

IP Packets Product Documentation contains the main data transmission protocol used in a variety of packet formats, packet example. By IP Packets Product Documentation, be able to enhance understanding of various protocol packets.

QinQ Frame Format

QinQ Frame Format

QinQ is an extension of 802.1Q (VLAN). It encapsulates the private VLAN tag of a user into a public VLAN tag. In this way, the packet with double VLAN tags can traverse the backbone network of a service provider, thus providing a simple Layer 2 VPN tunnel for the user. A QinQ packet has a fixed format, in which a second 802.1Q tag is inserted in front of the first tag of the single-tagged 802.1Q packet. As such, a QinQ packet has 4 more bytes than a single-tagged 802.1Q packet.

Frame Format

Figure 1-10 Format of a QinQ frame
            +-----------+-----------+-----------+-----------+-------------+------------------+----------+
            |   DMAC    |   SMAC    |   ETPE    |    TAG    |  LEN/ETYPE  |       Data       |   FCS    |
            |  6 Bytes  |  6 Bytes  |  2 Bytes  |  2 Bytes  |   2 Bytes   |  Variable length | 4 Bytes  |
            +-----------+-----------+-----------+-----------+-------------+------------------+----------+
                                    |                       |
                                  |     |                      |
                               |            |                      |
                            |                   |                       |
                            |                       |                       |
    +-----------+-----------+-----------+-----------+-----------+-----------+-------------+------------------+----------+
    |   DMAC    |   SMAC    |   ETPE    |    TAG    |   ETPE    |    TAG    |  LEN/ETYPE  |       Data       |   FCS    |
    |  6 Bytes  |  6 Bytes  |  2 Bytes  |  2 Bytes  |  2 Bytes  |  2 Bytes  |   2 Bytes   |  Variable length | 4 Bytes  |
    +-----------+-----------+-----------+-----------+-----------+-----------+-------------+------------------+----------+
                            |           |           |
                         |           |                    |
                      |           |                            |
                   |           |                                       |
                   +-----------+--------------+---------+--------------+
                   |   0x8100  |   Priority   |   CFI   |  VLAN ID     |
                   +-----------+--------------+---------+--------------+

Field

Length

Description

DMAC

6 bytes

Destination MAC address, identifying the receiver of the frame.

SMAC

6 bytes

Source MAC address, identifying the sender of the frame.

ETPE/TPID

2 bytes

Tag protocol identifier, identifying the type of a frame. Value 0x8100 indicates an 802.1Q frame. Such a frame will be discarded if the receiver does not support 802.1Q.

For the inner 802.1Q tag, the value is set to 0x8100. For the outer 802.1Q tag, different vendors may use different values.

  • 0x8100: Huawei
  • 0x88A8: Extreme Networks switches (defined in IEEE 802.1ad)
  • 0x9100: Juniper
  • 0x9200: Several

On Huawei devices using the VRP operating system, the TPID value of the outer 802.1Q tag is 0x8100 by default and can be modified using a command.

PRI in TAG

3 bits

Priority of a frame. The value ranges from 0 to 7. A larger value indicates a higher priority. If network congestion occurs, frames with a higher priority are preferentially forwarded.

CFI/DEI in TAG

1 bit

Canonical format indicator (CFI), indicating whether a MAC address is in canonical format. If the CFI is 0, the MAC address of an Ethernet frame is in canonical format (MAC addresses is written in transmission order with the least significant bit of each byte transmitted first). If the CFI is 1, the MAC address of an Ethernet frame is in non-canonical format (MAC addresses is written in transmission order with the most significant bit of each byte transmitted first). The CFI can be used to differentiate Ethernet frames, Fiber Distributed Digital Interface (FDDI) frames, and token ring frames. For Ethernet frames, the CFI is 0.

Drop eligible indicator (DEI). This field is used with the PRI field to indicate the drop priority of frames, that is, frames eligible to be dropped in the presence of congestion.

NOTE:

IEEE 802.1Q defines the CFI field, whereas IEEE 802.1ad redefines the CFI field. IEEE 802.1 ad stipulates that the DEI field is in an S-Tag whereas the CFI field is in a C-Tag.

In real-world situations, this field can be used as CFI or DEI as needed.

VID in TAG

12 bits

Specifies the VLAN to which a frame belongs. On Huawei devices running the VRP operating system, the available VLAN ID ranges from 1 to 4094. 0 and 4095 are reserved as defined in the related standards.

Length/Type

2 bytes

This field has two meanings:

  • Length: If the value of this field is less than or equal to 1500 in decimal format (or 0x05DC in hexadecimal format), this field indicates the length of the subsequent data, excluding the FCS field.
  • Type: If the value of this field is greater than or equal to 1536 in decimal format (or 0x0600 in hexadecimal format), this field indicates the type of the upper-layer protocol directly encapsulated on the link.

Data

38–1500 bytes

Payload of a QinQ frame (which may contain padding bits).

The frame length must be integral bytes. If the frame length is not integral bytes, the Data field must be padded to make the frame length be integral bytes.

NOTE:

The maximum length and minimum length of a QinQ frame are not defined in IEEE 802.1Q and IEEE 802.1ad.

CRC

4 bytes

The FCS field provides a method for the receiving network adapter to determine whether a transmission error occurs. If an error is detected, the frame is discarded.

FCS is a general name for multiple verification methods. In an Ethernet frame, CRC is usually used as the FCS.

Frame Example

Figure 1-11 QinQ frame
Frame 1: 391 bytes on wire (3128 bits), 391 bytes captured (3128 bits)
    Arrival Time: Nov 17, 2011 18:52:25.161695000 
    Epoch Time: 1321527145.161695000 seconds
    [Time delta from previous captured frame: 0.000000000 seconds]
    [Time delta from previous displayed frame: 0.000000000 seconds]
    [Time since reference or first frame: 0.000000000 seconds]
    Frame Number: 1
    Frame Length: 391 bytes (3128 bits)
    Capture Length: 391 bytes (3128 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ip:udp:bootp]
    [Coloring Rule Name: UDP]
    [Coloring Rule String: udp]
Ethernet II (VLAN tagged), Src: HuaweiTe_75:ad:21 (54:89:98:75:ad:21), Dst: RealtekS_88:35:39 (00:e0:4c:88:35:39)
    Destination: RealtekS_88:35:39 (00:e0:4c:88:35:39)
        Address: RealtekS_88:35:39 (00:e0:4c:88:35:39)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Source: HuaweiTe_75:ad:21 (54:89:98:75:ad:21)
        Address: HuaweiTe_75:ad:21 (54:89:98:75:ad:21)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    VLAN tag: VLAN=100, Priority=Controlled Load
        Identifier: 802.1Q Virtual LAN (0x8100)
        100. .... .... .... = Priority: Controlled Load (4)
        ...0 .... .... .... = CFI: Canonical (0)
        .... 0000 0110 0100 = VLAN: 100
    VLAN tag: VLAN=200, Priority=Controlled Load
        Identifier: 802.1Q Virtual LAN (0x8100)
        100. .... .... .... = Priority: Controlled Load (4)
        ...0 .... .... .... = CFI: Canonical (0)
        .... 0000 1100 1000 = VLAN: 200
    Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.112.1 (192.168.112.1), Dst: 192.168.112.100 (192.168.112.100)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x80 (DSCP 0x20: Class Selector 4; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
        1000 00.. = Differentiated Services Codepoint: Class Selector 4 (0x20)
        .... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
    Total Length: 369
    Identification: 0x8ab5 (35509)
    Flags: 0x00
        0... .... = Reserved bit: Not set
        .0.. .... = Don't fragment: Not set
        ..0. .... = More fragments: Not set
    Fragment offset: 0
    Time to live: 16
    Protocol: UDP (17)
    Header checksum: 0xbc90 [correct]
        [Good: True]
        [Bad: False]
    Source: 192.168.112.1 (192.168.112.1)
    Destination: 192.168.112.100 (10.168.112.100)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootps (67)
    Source port: bootps (67)
    Destination port: bootps (67)
    Length: 349
    Checksum: 0x0000 (none)
        [Good Checksum: False]
        [Bad Checksum: False]
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 1
    Transaction ID: 0x7a31a29f
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
        0... .... .... .... = Broadcast flag: Unicast
        .000 0000 0000 0000 = Reserved flags: 0x0000
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 100.1.1.1 (100.1.1.1)
    Client MAC address: IntelCor_7b:75:58 (00:27:10:7b:75:58)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (t=53,l=1) DHCP Message Type = DHCP Discover
        Option: (53) DHCP Message Type
        Length: 1
        Value: 01
    Option: (t=116,l=1) DHCP Auto-Configuration = AutoConfigure
        Option: (116) DHCP Auto-Configuration
        Length: 1
        Value: 01
    Option: (t=61,l=7) Client identifier
        Option: (61) Client identifier
        Length: 7
        Value: 010027107b7558
        Hardware type: Ethernet
        Client MAC address: IntelCor_7b:75:58 (00:27:10:7b:75:58)
    Option: (t=50,l=4) Requested IP Address = 169.254.145.113
        Option: (50) Requested IP Address
        Length: 4
        Value: a9fe9171
    Option: (t=12,l=13) Host Name = "cda101059953g"
        Option: (12) Host Name
        Length: 13
        Value: 63646131303130353939353367
    Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"
        Option: (60) Vendor class identifier
        Length: 8
        Value: 4d53465420352e30
    Option: (t=55,l=11) Parameter Request List
        Option: (55) Parameter Request List
        Length: 11
        Value: 010f03062c2e2f1f21f92b
        1 = Subnet Mask
        15 = Domain Name
        3 = Router
        6 = Domain Name Server
        44 = NetBIOS over TCP/IP Name Server
        46 = NetBIOS over TCP/IP Node Type
        47 = NetBIOS over TCP/IP Scope
        31 = Perform Router Discover
        33 = Static Route
        249 = Private/Classless Static Route (Microsoft)
        43 = Vendor-Specific Information
    Option: (t=43,l=2) Vendor-Specific Information
        Option: (43) Vendor-Specific Information
        Length: 2
        Value: dc00
    Option: (t=82,l=35) Agent Information Option
        Option: (82) Agent Information Option
        Length: 35
        Value: 010c303330422d303030302d474502134855415745492d30...
        Agent Circuit ID: 303330422d303030302d4745
        Agent Remote ID: 4855415745492d303330422d303030302d4745
    End Option

Reference

Standard

Description

RFC 3069

VLAN Aggregation for Efficient IP Address Allocation

IEEE 802.1Q

IEEE Standards for Local and Metropolitan Area Networks: Virtual Bridged Local Area Networks

IEEE 802.1ad

IEEE Standards for Local and Metropolitan Area Networks: Virtual Bridged Local Area Networks- Amendment 4

Translation
Favorite
Download
Update Date:2025-08-12
Document ID:EDOC1100174721
Views:251643
Downloads:1062
Average rating:3.0Points

Digital Signature File

digtal sigature tool