Tip

MTU and GRE

Under normal circumstances, when two hosts communicate via TCP, they communicate with each other to determine the Send Maximum Segment Size (SMSS). Often this turns out to be 1500 bytes, which not coincidentally, is the maximum amount of payload in an Ethernet frame. All is well until a combination of technologies combine to break the system.

First, the packets travel through a

    Requires Free Membership to View

GRE (generic routing encapsulation) tunnel across an Ethernet interface. This encapsulation tacks on 24 bytes.

1500 - 24 = 1476

Thus, if either host sends a packet that is larger than 1476, the packet must be fragmented (typically by one of the tunnel endpoints) to cross the tunnel. Unfortunately, the hosts do not realize this, because they have only communicated with one another and agreed upon the 1500 value, but connectivity isn't broken.

At this point, any one of a number of things can break this connectivity. If the transmitting host sets the Don't Fragment bit, the router will be forced to drop the packet. However, it will *usually* send an ICMP (Internet Control Message Protocol) message informing the sender to use smaller packets. But even if it sends the ICMP messages, they are often filtered or blocked by firewalls somewhere in the path, so the host never knows why the packet wasn't delivered.

Another problem that can occur is a firewall that blocks fragmented packets. In this case, the packet is fragmented by one of the tunnel endpoints and successfully transmitted through the tunnel, but as it enters the receiver's network, a firewall drops it. Firewalls also rarely send ICMP notices to inform the sender of the policy violation.

Assuming you don't have control over the offending firewalls, there is an easy solution to this problem, once you know what the problem is:

When configuring a GRE tunnel, change the Maximum Transmission Unit (MTU) on the tunnel to 1524 or better.

If your media doesn't support larger packets (e.g. Ethernet), use policies to clear the Don't Fragment (DF) bit out of packets that pass the tunnel. (This assumes your VPN or router vendor supports this option.)

If for some reason, you need the DF bit for other traffic, it is also possible to diddle with the DMSS (Data Management Services System) negotiation of the TCP streams passing through the tunnel. For instance, on a Cisco router, you could use the command "ip tcp adjust-mss 1476". After applying that command, if a host sent a packet claiming it could support 1500 bytes, the router would silently reduce the value to 1476. This would cause the hosts to negotiate at the lower, acceptable value.


Thomas Alexander Lancaster IV is a consultant and author with over ten years experience in the networking industry, focused on Internet infrastructure.


 

This was first published in July 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.