Ethernet Frame Sizes
Standard Ethernet Frame (without 802.1Q):
- Total Size: 1518 Bytes
- Breakdown:
- Destination MAC: 6 Bytes
- Source MAC: 6 Bytes
- Type: 2 Bytes
- Data: 1500 Bytes
- FCS: 4 Bytes
- Destination mac(6) + source MAC(6) + type(2) + data(1500) + FCS(4)
Ethernet Frame with 802.1Q Tagging:
- Total Size: 1522 Bytes
- Breakdown:
- Destination MAC: 6 Bytes
- Source MAC: 6 Bytes
- Type: 2 Bytes
- 802.1Q Tag: 4 Bytes
- Data: 1500 Bytes
- FCS: 4 Bytes
- Destination mac(6) + source MAC(6) + type(2) + 802.1q(4) + data(1500) + FCS(4)
Key Header Sizes
- IP Header: 20 Bytes
- TCP Header: 20 Bytes
- UDP Header: 8 Bytes
- VXLAN Header: 8 Bytes
Defining MTU and MSS
MTU (Maximum Transmission Unit):
The largest size of an IP packet that can be transmitted without needing fragmentation. Typically, this includes the IP packet along with its TCP/UDP headers.
MSS (Maximum Segment Size):
This is derived from the MTU. It is the largest segment of data that TCP can send in a single packet. Calculated as: MSS=MTU−(IP Header+TCP Header)
For a standard MTU of 1500 bytes: MSS=1500−(20+20)=1460
Troubleshooting MTU Issues
When using the ping
command with the -f
(don’t fragment) flag, the packet size might exceed the MTU, leading to fragmentation issues. For example, an MTU of 1500 bytes results in an MSS of 1472 bytes when using the following calculation: MSS=MTU−(IP Header+ICMP Header)=1500−(20+8)=1472
Best MTU for VPN
The optimal MTU for VPN can vary depending on the specific protocol and network configuration used. It’s often recommended to experiment with values between 1400-1500 bytes and monitor the performance to find the best setting for your environment.