Network Operations

The tunnel is up and the BGP session is established, but some sites load slowly, some never load, or large downloads stall halfway. When small packets pass and large ones vanish, the culprit is usually MTU. GRE tunnels are one of the most common places to see it.
Why does MTU cause trouble in a GRE tunnel?
GRE wraps the original packet in a new IP and GRE header. Over IPv4 that means 24 bytes of overhead (20 bytes outer IP + 4 bytes GRE); if a GRE key is used, 4 more bytes are added. On a 1500-byte link the largest packet that fits through the tunnel is therefore 1476 bytes.
A larger packet meets one of two fates: it is fragmented along the way, or, if the don't-fragment (DF) bit is set, dropped. For a dropped packet the sender must receive an ICMP "fragmentation needed" message (on IPv6, "packet too big"). If a firewall filters that message, the sender never learns to shrink the packet. The result is a connection that is established but stalls during data transfer: an "MTU black hole".
| Tunnel type | Overhead | Usable MTU on a 1500-byte link |
|---|---|---|
| GRE / IPv4 | 24 bytes | 1476 |
| GRE (with key) / IPv4 | 28 bytes | 1472 |
| GRE / IPv6 | 44 bytes | 1456 |
Symptoms: how do you know it is MTU?
- Ping works, but large downloads or HTTPS pages stall.
- The TCP handshake completes and data transfer never starts.
- Only some destinations are affected.
- The BGP session inside the tunnel stays up (small packets are enough) but traffic is slow.
How to test MTU
Send pings of different sizes with the DF bit set. The size just below where replies stop is the largest payload you can use.
# Linux (1448 bytes payload + 28 bytes header = 1476)
ping -M do -s 1448 <target-address>
# Windows
ping -f -l 1448 <target-address>
If 1448 passes but 1449 does not, your tunnel MTU is 1476. Step the size down (1472, 1464, 1456) to find the first value that passes.
How to fix it
- Set the tunnel interface MTU: For example on Linux,
ip link set gre1 mtu 1476. - Apply MSS clamping: It makes TCP connections start with smaller segments from the beginning. Over IPv4, MSS = MTU − 40 (1436 for 1476). On Cisco IOS use
ip tcp adjust-mss 1436on the interface; on Linux useiptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu. - Let ICMP through: "fragmentation needed" (type 3, code 4) and, on IPv6, "packet too big" must not be filtered.
- Raise the underlay MTU: If your link supports jumbo frames (for example 9000), you can run the tunnel at 1500.
Tip: MSS clamping solves the problem for TCP at the root without relying on PMTUD. For UDP and other protocols, setting the tunnel MTU correctly is still required.
MTU on WireShield tunnels
With remote DDoS protection, clean traffic can be delivered to you over a GRE tunnel. Tunnels on the WireShield side use MSS clamping and automatic MTU; we still recommend verifying the same values on the tunnel interface and MSS setting of your own router. For the other tunnel setup steps see the BGP and GRE guide in the documentation. Before taking the BGP side live, work through the BGP go-live checklist.
Common mistakes
- Leaving the tunnel interface MTU at the default 1500.
- Blocking ICMP wholesale and breaking PMTUD.
- Testing only with small packets and declaring the tunnel healthy.
- Applying MSS clamping on only one end.
- Looking for the problem in BGP or the firewall, when the session looks healthy with small packets.
Frequently asked questions
What should the MTU of a GRE tunnel be?
1476 on a 1500-byte IPv4 link, 1472 with a GRE key, and 1456 over IPv6. Verify the exact value with a ping test.
Can an MTU problem drop a BGP session?
Usually not. BGP keepalive and update messages are small, so the session stays up; large updates or user traffic can be affected.
MSS clamping or MTU setting?
Both. MTU defines the tunnel's limit and MSS clamping fits TCP to that limit.
Next step
If you are stuck on a tunnel or BGP setup, share your configuration and we will look together. Talk to the technical team or review the connection options for remote protection.