Tech Stocking Stuffers: 18 awesome gifts under $50

Tuning TCP MTU for your ISP

By jobeard
Sep 30, 2016
Post New Reply
  1. The following is a description of PACKET FRAGMENTATION(PF) and how to stop it.

    Bigger or max MTU(1500) is frequently counter productive.

    Reducing your MTU at least to 1492 will stop fragmentation, but you can do even better.

    Find the correct MTU for your ISP (regardless of DSL or Cable)

    Get a command prompt and enter
    ping -f -l $SIZE$
    where $SIZE is always a multiple of 8 and 1500 is the max.​

    eg sample: $ ping -f -l 1500

    Pinging [] with 1500 bytes of data:
    Packet needs to be fragmented but DF set.

    So 1500 creates PF from my ISP to my laptop, so keep reducing $SIZE$ by 8 until you get

    Reply from bytes=64 (sent $SIZE$ ) time=14ms TTL=54

    The maximum and default value of the MTU is 1500. This limits the packets sent and received to this value.
    It also permits larger packets by fragmenting them into multiple units which then are reassembled upon receipt.
    Fragmentation of packets IS a problem:
    1) obviously slows both the send & receive.
    2) the reassembly sometimes fails and the connection gets broken
    3) and sometimes the router will also reboot.

    Solution? Stop or inhibit fragmentation with an MTU < 1500 (value must be a multiple of 8)

    Alternative approaches?
    There are hacks available on the Internet which alter frame and window sizes (tcp internal values).
    However, forcing more data on a link has a higher probability of failing than sending smaller size
    because the error and retry occurs more quickly and with a better probability of success.

    W A Y back in the dial-up days, guess what the MTU value was used?? 576, the smallest value possible.

    Alternative values?
    The value of 1492 nominated above solves the fragmentation problem, but may not be the best value for you
    and your specific ISP connection. If you don't care, that's ok, just set 1492 as shown below and smile.

    This works as most networks today implement MTU Discovery, where every node in
    the path to you reports its unique MTU value and the server automatically selects the smallest reported
    value for communications to you - - "auto mtu configuration" if you will.

    The 'right' place to set the MTU is in your router. Typically in the WAN settings you have a choice
    for the MTU - - set it here and every device connected to your router will get the benefit of avoiding
    packet fragmentation.

    The other advantage is for mobile devices. When the device connects to some other
    ISP (say your favorite hotspot), your personal router is no longer in control and the mobile device
    will correctly adapt to the hotspot settings.

    The other location that can be use to set an MTU is on the device itself. Primarily, we're talking about
    as personally I have no idea how or if you can tune a cellphone or tablet (sigh).
    Any value manually set in the following manner will 'persistent' regardless of which ISP you connect to.

    FIRST, from an admin loging, get a command prompt
    To see your existing MTU
    netsh interface ipv4 show subinterface "Local Area Connection"
    netsh interface ipv4 show subinterface "Wireless Network Connection"

    To set an MTU of 1492
    netsh interface ipv4 set subinterface "Local Area Connection" mtu=1492 store=persistent
    netsh interface ipv4 set subinterface "Wireless Network Connection" mtu=1492 store=persistent

    The new value will become effective upon reboot.
    Rage_3K_Moiz likes this.
  2. Rage_3K_Moiz

    Rage_3K_Moiz Sith Lord Posts: 5,443   +38

    Thank you for this!

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...