JP Vossen on 17 Dec 2009 13:28:33 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Setting MTU (i.e. for FiOS) (was: Problem with streaming ...)


 > Date: Wed, 16 Dec 2009 22:39:12 -0500
 > From: Ben Love <blove+plug@kylimar.com>
 >
 > One thing I have seen in the past (though very rarely) is an MTU
 > problem.  Ethernet (and the Internet at large) generally assumes a
 > 1500 byte MTU.  There are ICMP algorithms for path MTU discovery, but
 > these are often broken because many routers block ICMP
 > indiscriminantly.

[...]

 > The solution to an MTU problem like this is to use iptables with the
 > --clamp-mss-to-pmtu option: (something like this)
 >
 > $ iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o
 > eth0 -j TCPMSS --clamp-mss-to-pmtu
 >
 > There's a little bit of information about it here:
 >
 > http://lartc.org/howto/lartc.cookbook.mtu-mss.html

[...]

That's an interesting solution I'd never had thought of.  I'd edit 
/etc/sysctl.conf then RELOAD via: sudo sysctl -p.

----- Linux (Debian/Ubuntu/Red Hat) cut here -----
# FiOS Settings
# /etc/sysctl.conf
# Adapted from http://www.wildblue.cc/wbforums/archive/index.php/t-1415.html
# Do selective acknowledgment
net.ipv4.tcp_sack = 1
# Don't use timestamping
net.ipv4.tcp_timestamps = 0
# Do TCP window scaling
net.ipv4.tcp_window_scaling = 1
# Disables automatic defragmentation (needed for masquerading, LVS)
#net.ipv4.ip_always_defrag = 1
# don't cache ssthresh from previous connection
net.ipv4.tcp_no_metrics_save = 1
# recommended to increase this for 1000 BT or higher
net.core.netdev_max_backlog = 2500
# Increase Linux TCP buffer limits
net.core.rmem_default = 307824
net.core.rmem_max = 307824
net.core.wmem_max = 8388608
----- Linux (Debian/Ubuntu) cut here -----

See my previous post on this topic: 
http://lists.netisland.net/archives/plug/plug-2007-10/msg00010.html. 
FWIW, I have these settings on some machines and not others, and I 
haven't noticed any difference.  I haven't look for one though.


Now that I re-read that I don't see any specific MTU settings.  In 
theory the window scaling is supposed to do that, but as you said that 
depends on routers not being broken.

Oh, great thread here: http://ubuntuforums.org/showthread.php?t=872346. 
  Looks like you can trivially set MTU per interface in 
/etc/network/interfaces...  Duh.

Later,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|      http://bashcookbook.com/
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug