Calculate GRE overhead with a key and sequence number
Work out GRE inner MTU on a 1500-byte IPv4 path when the tunnel includes two optional four-byte words.
Try these inputsWorked calculation
- Use 20 bytes for the outer IPv4 header and four for the base GRE header.
- The key and sequence number each add four bytes. This GRE packet uses 20 + 4 + 4 + 4 = 32 overhead bytes.
- The inner IP packet can use 1,500 − 32 = 1,468 bytes. Inner IPv4 TCP has an MSS of 1,428.
Results
- Inner IP MTU
- 1,468 B
- TCP MSS
- 1,428 B
- Budgeted overhead
- 32 B
Tunnel packet byte budget
- Outer IPv4 · 20 B
- GRE base · 4 B
- GRE optional fields · 8 B
- Encapsulation
- GRE
- Starting MTU
- 1,500 B
- Inner TCP/IP base headers
- 40 B
| Layer | Bytes |
|---|---|
| Outer IPv4 | 20 |
| GRE base | 4 |
| GRE optional fields | 8 |
| Inner IP packet | 1468 |
Questions
How much MTU would I recover by turning off the GRE sequence number only?
Removing one optional word frees four bytes. With only the key, the example MTU becomes 1,472.
Does generic GRE overhead include the inner Ethernet header?
This GRE mode carries an IP packet. For an Ethernet payload such as GRETAP, budget the carried Ethernet header as additional overhead.