Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How do I change MSS separately from MTU?
Date: Wed, 14 Jan 2009 23:16:25
Message-Id: 200901142316.17933.michaelkintzios@gmail.com
In Reply to: [gentoo-user] How do I change MSS separately from MTU? by Walter Dnes
1 On Monday 12 January 2009, Walter Dnes wrote:
2 > Seeing discussions about best MTU/MSS for MLPPP on my ISP's forum, I
3 > asked about the optimal settings for a standard DSL connection.
4 > Because of the way ATM cells line up, the optimal MSS is 1408. This
5 > would normally imply MTU 1448, because MTU is normally MSS + 40. The
6 > optimal setting is apparently MTU 1492 and MSS 1408. I tried forcing
7 > MSS to 1408 in my routing config (/etc/conf.d/net), but that also
8 > forces the MTU to 1448. Is there a way to do them separately?
9 >
10 > The only suggestion I've found via Google is iptables "mangle". Does
11 > it manage to change MSS without changing MTU? If so, what is the
12 > invocation in the "mangle" table?
13
14 I think it is in the OUTPUT table that you should insert a rule, but I don't
15 have time to search for it now. It would probably be something like:
16
17 iptables --insert OUTPUT --jump TCPMSS --protocol tcp --set-mss 1408
18
19 I think you can also set the advertised (by your machine) MSS for a network
20 using ip route:
21
22 ip route add 192.168.1.0/24 dev eth0 advmss 1408
23
24 PS. I am not sure if the above will break your connection because of dropped
25 packets, or how it will interact with the MTU set at 1492. In my case I have
26 just set my MTU at 1492 to cater for the PPP authentication on my ISP's ADSL
27 network. I leave the MSS to be at what the kernel wants it to be - typically
28 MSS = MTU - 40.
29 --
30 Regards,
31 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature