{"id":5518,"date":"2026-11-16T14:12:44","date_gmt":"2026-11-16T14:12:44","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=5518"},"modified":"2026-11-16T14:12:44","modified_gmt":"2026-11-16T14:12:44","slug":"mtu-fun-global-protect-vpn","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=5518","title":{"rendered":"MTU Fun &#8211; Global Protect VPN"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A bit of fun with MTUs (Maximum Transmission Unit) size. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We have a Global Protect VPN Gateway, and client machines that connect to the Internet network using the VPN Gateway from a Global Protect VPN Client on their client machine. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The VPN was set to the default 1400 bytes for the MTU configuration. It was changed to 1300 bytes to investigate issues. So&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running within a VPN which has been configured to have an MTU of 1300 bytes, we craft a ping which has the don&#8217;t fragment flag set, i.e. the DF set.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\>ping -4 -f -l 1272 myinternalserver.thingy.com\n\nPinging myinternalserver.thingy.com &#91;192.168.100.10] with 1272 bytes of data:\nReply from 192.168.100.10: bytes=1272 time=8ms TTL=61\n\nPing statistics for 192.168.100.10:\n    Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),\nApproximate round trip times in milli-seconds:\n    Minimum = 8ms, Maximum = 8ms, Average = 8ms\n\nC:\\>ping -4 -f -l 1273 myinternalserver.thingy.com\n\nPinging myinternalserver.thingy.com &#91;192.168.100.10] with 1273 bytes of data:\nPacket needs to be fragmented but DF set.\n\nPing statistics for 192.168.100.10:\n    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Being it fails at 1273 bytes it means that the maximum size of user data we can send over this VPN is 1272 bytes, because it needs to add some headers on-top.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The successful 1,272-byte ping payload corresponds to an <strong>IP packet of 1300 bytes<\/strong>, assuming standard IPv4 and ICMP headers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ICMP data: <strong>1272 bytes<\/strong> (<code>-l<\/code> value)<\/li>\n\n\n\n<li>ICMP header: <strong>8 bytes<\/strong><\/li>\n\n\n\n<li>IPv4 header: <strong>20 bytes<\/strong><\/li>\n\n\n\n<li>Total IP packet: <strong>1300 bytes<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So in this case the <strong>1300 bytes<\/strong> is the MTU of this VPN connection, which is as expected because its what its been configured to.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">OK, so now this is where things start to layer up and can become confusing. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The 1300 bytes MTU is the maximum inner packet size (without fragmentation). But that&#8217;s the inner packet within the VPN tunnel, what about the overheads needed for the VPN to work? (i.e. the outer packet). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example the size of the User Data (ICMP Data in this example) which is 1272 + the ICMP Header which is 8 bytes + IPv4 header which is 20 bytes, and then on top of that there is the IPSec Header which also includes a new IPv4 Header (if you are using Tunnel Mode) or not if you are using Transport Mode; and that will add to it too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So depending on your VPN configuration this additional overhead could vary quite a lot and thus affect the overall size. A calculator such as the following can help you: <a href=\"https:\/\/ipsec-overhead-calculator.netsec.us\">https:\/\/ipsec-overhead-calculator.netsec.us<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the purposes of this example let&#8217;s say that the packet size plus the IPSec header is 1400 bytes (because its got AH enabled, NAT-T and Tunnel Mode amongst other things. So we are adding another 100 bytes ontop of the inner packet size to get the outer packet size.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1300 Bytes &#8211; Inner Packet<\/li>\n\n\n\n<li>1400 Bytes &#8211; Outer Packet<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So if the underlying network could provide 1400 bytes, then all good. But if the underlying network could only provide say 1350 bytes, the outer IP packet would need to be fragmented, and that then begs the question would the inner IP packet also need to be fragmented? And if so how would the inner packet know?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The answer to that is that the <strong>inner packet doesn\u2019t have to know that the outer packet was fragmented<\/strong>. <br><br>They are separate IP packets at different layers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using the example:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>The 1300 byte inner packet is encrypted and wrapped (as IPSec VPN), making an outer packet of 1400 bytes.<\/li>\n\n\n\n<li>If the IPv4 network it goes across only supports 1350 bytes and allows fragmentation, a router can split the <strong>outer packet<\/strong> into smaller fragments.<\/li>\n\n\n\n<li>The VPN gateway then just reassembles those outer fragments, then decrypts the outer packet and recovers the original, intact 1300 byte inner packet; which is none the wiser to have been fragmented.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">So a router (or routers) along the path of the packet across the network <strong>fragmenting the outer packet does not automatically fragment the inner packet<\/strong>. It just reconstructs the outer packet at the end.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Palo Alto\u2019s GlobalProtect troubleshooting guidance says its IPsec packets are sent without the outer \u201cDon\u2019t Fragment\u201d bit set, allowing IPv4 routers to fragment them. If a router on the path drops fragments, though, the traffic can fail; lowering the VPN MTU can avoid that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, if fragmentation isn\u2019t allowed, the tunnel endpoints may get a \u201cpacket too big\u201d signal and need to use smaller packets. If that signal (ICMP packet) doesn\u2019t reach them, packets can be dropped and connections may stall.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So the ideal situation would be to to ensure that the VPN&#8217;s MTU is set small enough so that when the IPSec Header overheads are added on-top, the total size of the outer packet does not exceed MTU of any network that a VPN client might reasonable use to access the VPN gateway.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">VPN inner MTU \u2264 smallest expected outer path MTU \u2212 IPsec overhead<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The difficulty is that with a multitude of Internet Service Providers, mobile providers etc. you might find that the MTUs on these networks vary somewhat. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A fixed MTU can\u2019t guarantee a perfect fit everywhere: setting it lower helps on lower MTU paths, but increases packet count and overhead on every path if the MTU on that path could have been bigger. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, unless you are really pushing the edges, the majority of the time nobody would even notice!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A bit of fun with MTUs (Maximum Transmission Unit) size. We have a Global Protect VPN Gateway, and client machines that connect to the Internet network using the VPN Gateway from a Global Protect VPN Client on their client machine. The VPN was set to the default 1400 bytes for the MTU configuration. It was &#8230; <a title=\"MTU Fun &#8211; Global Protect VPN\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=5518\" aria-label=\"Read more about MTU Fun &#8211; Global Protect VPN\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":4373,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,17],"tags":[],"class_list":["post-5518","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fundamentals-networking","category-networking"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5518"}],"version-history":[{"count":7,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5518\/revisions"}],"predecessor-version":[{"id":5525,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/5518\/revisions\/5525"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/4373"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}