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 <>
 > 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:


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
# 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: 
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: 
  Looks like you can trivially set MTU per interface in 
/etc/network/interfaces...  Duh.

JP Vossen, CISSP            |:::======|
My Account, My Opinions     |=========|
"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         --
Announcements -
General Discussion  --