Changing MTU size

Gerald Combs gerald at ethereal.com
Wed Sep 22 22:10:24 CDT 2004


Bennett, Joe wrote:
> While poking and proding around I've found that my particular linksys router 
> is very sensitive to mtu size. I'm running Suse 9.0 which defaults the mtu 
> size to 1500 (as I would assume all other do)upon reboot. Since I'm a slave 
> to sbc dsl, and am living with the 8 byte overhead of PPPOE, my mtu size 
> needs to be 1492. If I reboot the machine, the mtu reverts back to the 
> default and becomes basically useless on the net until I open up a terminal 
> and perform an /sbin/ifconfig eth0 mtu 1492. After that, all is well with the 
> world.
> 
> Now, on with the question. What is the best way to automate the mtu change to 
> 1492 or is there a way to just change the default???? I'm attempting to limit 
> my maintenance on this machine in the event that someone reboots it, or the 
> UPS runs to the end of its rope when the power fails....

The IP MTU size defaults to 1500 because that's the maximum payload size
for standard Ethernet.  This changes if one of your hops is over PPPoE,
IPsec, PPTP, SLIP, etc.  You might try:

  - Forcing the MTU in your network settings.  A quick Google search
    says that you need to put "MTU='1492'" in
    /etc/sysconfig/network/ifcfg-eth0.  I don't have any Suse machines
    handy, so I can't verify this.

  - Assuming path MTU discovery is enabled, figuring out what's keeping
    it from working properly.  PMTU works by sending out IP packets
    with the DF (don't fragment) bit set.  If the packet is too big to
    traverse one of the links in the path, an ICMP message (destination
    unreachable, fragmentation needed) is sent back.

    If the ICMP message is lost or dropped (e.g. by a firewall), the
    connection locks up.  This is a common problem for people with
    overly-zealous firewall rules.

  - Again assuming PMTU discovery enabled, disable it.  This can be done
    in modern kernels with

      echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc

    Large data transfers won't be as efficient due to fragmentation,
    however.

  - Pestering SBC.  A friend of mine asked nicely, and SBC support
    configured his connection for straight bridging connection, with no
    PPPoE.  Tell them you're running VMS or Windows ME or something.



More information about the Kclug mailing list