Sub topic 12
Tagging overhead and frame size
This chapter assumes you know the 802.1Q tag layout from the previous chapters and that you understand Ethernet frames and the MTU (maximum transmission unit). It covers what the tag does to frame size and the faults that result.
The tag adds four bytes
An 802.1Q tag is 4 bytes: a 2-byte TPID (0x8100) and a 2-byte TCI holding priority, DEI and VLAN ID. The switch inserts it between the source MAC address and the EtherType field. It also recalculates the frame check sequence (FCS), because the frame contents changed.
| Frame type | Maximum frame size | Payload (MTU) |
|---|---|---|
| Untagged Ethernet | 1518 bytes | 1500 bytes |
| 802.1Q tagged | 1522 bytes | 1500 bytes |
| Q-in-Q (two tags) | 1526 bytes | 1500 bytes |
The frame limit grows by 4 bytes, but the IP MTU stays at 1500. The tag is not part of the payload. IEEE 802.3ac raised the maximum frame size from 1518 to 1522 bytes so that a full 1500-byte payload still fits once tagged.
When the extra bytes cause trouble
Modern switches and NICs accept 1522-byte frames on trunks, so most networks never see a problem. Faults appear in these situations:
- Older or limited hardware. A device that enforces 1518 bytes drops a tagged full-size frame. Small packets work and large transfers stall.
- Stacked tags. Q-in-Q adds a second tag, so a service provider link needs 1526 bytes or more. If the provider cannot carry that, customers must lower their MTU.
- Tunnels and overlays. A VPN or VXLAN encapsulation adds its own overhead on top of the tag. The sum can exceed what the path carries.
- Mismatched jumbo settings. If one end of a link uses 9000-byte jumbo frames and the other does not, the oversized frames are dropped. Tagging makes the mismatch more likely, because a 9000-byte payload plus tag exceeds 9018.
The typical symptom is that pings and small requests succeed while large file transfers or full-size packets hang. This pattern points to a size limit somewhere on the path.
Checking and adjusting sizes
On a Cisco switch, check the configured system MTU and look for oversized-frame counters on the trunk:
show system mtu
show interfaces GigabitEthernet0/24 counters errorsCounters labeled giants or oversize show frames the port rejected as too large. Jumbo support is set globally on many platforms with system mtu jumbo 9000, and it usually needs a reload to take effect.
On Linux, compare the MTU of the physical interface and its VLAN subinterface:
ip -d link show eth0
ip -d link show eth0.10The VLAN subinterface cannot have a larger MTU than its parent. If you want 9000-byte payloads on eth0.10, set the MTU on eth0 first. The tag is added by the driver, so a standard 1500 MTU works without any change.
You can also compute the frame size you need:
def frame_size(payload: int, tags: int = 1) -> int:
"""Ethernet frame size in bytes: header 14 + tags*4 + payload + FCS 4."""
return 14 + tags * 4 + payload + 4
print(frame_size(1500, tags=0)) # 1518
print(frame_size(1500, tags=1)) # 1522
print(frame_size(1500, tags=2)) # 1526
print(frame_size(9000, tags=1)) # 9022Practical rules
- Keep the same MTU on every host in a VLAN, because a Layer 2 domain does not fragment frames.
- On any link that carries tags, confirm both ends accept at least 1522 bytes.
- Where Q-in-Q or tunnels are present, add each layer's overhead to the budget and lower the host MTU if the path cannot grow.
- When large transfers fail but small ones work, test with a ping that forbids fragmentation, such as
ping -M do -s 1472 hoston Linux, and reduce the size until it succeeds.
Exercise
A host in VLAN 10 sends a full-size 1500-byte IP packet through a trunk. What is the frame size on the trunk, and what is the frame size on the access port that the host is attached to?
Show answer
On the access port the frame is untagged, so it is 1518 bytes. On the trunk the switch adds a 4-byte 802.1Q tag, so it is 1522 bytes. The IP MTU is 1500 on both links.
Exercise
Ping with small packets works across a trunk, but a large file transfer hangs. Name one likely cause related to tagging and one check you would run.
Show answer
A device on the path may accept only 1518-byte frames, so full-size tagged frames of 1522 bytes are dropped. Check the giants or oversize counters on the trunk ports and run show system mtu. A don't-fragment ping with increasing sizes also locates the limit.