Re: [v6ops] PMTUD forever, was: MTUs on the general Internet

Jeroen Massar <jeroen@massar.ch> Fri, 05 December 2014 12:14 UTC

Return-Path: <jeroen@massar.ch>
X-Original-To: v6ops@ietfa.amsl.com
Delivered-To: v6ops@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B17091AC43A for <v6ops@ietfa.amsl.com>; Fri, 5 Dec 2014 04:14:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.7
X-Spam-Level:
X-Spam-Status: No, score=-4.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, GB_I_LETTER=-2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vazLHNfEZwoz for <v6ops@ietfa.amsl.com>; Fri, 5 Dec 2014 04:14:47 -0800 (PST)
Received: from bastion.ch.unfix.org (bastion.ch.unfix.org [46.20.246.101]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C4AA61A8AD2 for <v6ops@ietf.org>; Fri, 5 Dec 2014 04:14:46 -0800 (PST)
Received: from yomi.ch.unfix.org (84-73-144-213.dclient.hispeed.ch [84.73.144.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jeroen) by bastion.ch.unfix.org (Postfix) with ESMTPSA id CA842100982C6; Fri, 5 Dec 2014 12:14:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=massar.ch; s=DKIM2009; t=1417781684; bh=VkACEKyPAISZeL6KmKKzsx9ljybbqbYbYzoTY7JC0TY=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=v22bHKf939YePtxmuwNDC95tj85T7Lsn3zAevwGl5dh15VqvoeHE+LUien61AT1f5 GtfC6FacZHD0RdXDlgVKkdUwvtTZSiltOwnkwWM19U7xNzwxRwhviVb/Pv5XzbQk5z 1Ms30oZoc6wcYsknq+RC7mbUzNr09vEShD4bFTIUIgxhAaeu1IR13ttuu9CQI4bFWf EsEYankaARlhZaUeFWn2bNAy/yZyamYGI8EwVN0iBP0GrFfMfCSJ9ixkQrS3IK8i3D fD9G8Ht8CsxmWvvJppv5XfxSilZ0aqpeUOxCOLzEb+ndARf0lrJFjBM4u2pfXmIt7H f8Ft6Cf8UTCuw==
Message-ID: <5481A1B0.3080804@massar.ch>
Date: Fri, 05 Dec 2014 13:14:40 +0100
From: Jeroen Massar <jeroen@massar.ch>
Organization: Massar
MIME-Version: 1.0
To: Philip Homburg <pch-v6ops-3@u-1.phicoh.com>
References: <547F37B4.8050509@massar.ch> <2134F8430051B64F815C691A62D9831832DA9AD6@XCH-BLV-504.nw.nos.boeing.com> <547F3CE8.4090302@massar.ch> <20141204.095809.74726281.sthaug@nethelp.no> <54802E1D.9070401@massar.ch> <E3AB782E-8127-44C6-B870-78D0B6C34A53@apnic.net> <20141205091812.39854739@echo.ms.redpill-linpro.com> <B01FA89B-C104-49F4-B3E8-B4AD5FD66F31@muada.com> <20141205094341.799a12ad@echo.ms.redpill-linpro.com> <CEB65A05-C9AC-4A41-A853-40B8364848CD@muada.com> <20141205101850.6e58b351@echo.ms.redpill-linpro.com> <FB49ED19-157D-4EB6-A44C-52E383D7282B@muada.com> <20141205110546.2ef6ebf1@echo.ms.redpill-linpro.com> <m1XwqGy-0000ChC@stereo.hq.phicoh.net> <54818F41.9090802@massar.ch> <m1Xwqd1-0000DzC@stereo.hq.phicoh.net>
In-Reply-To: <m1Xwqd1-0000DzC@stereo.hq.phicoh.net>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 8bit
Archived-At: http://mailarchive.ietf.org/arch/msg/v6ops/0eXxl191fJZ53rYWDm5P4xzQLcE
Cc: "v6ops@ietf.org WG" <v6ops@ietf.org>
Subject: Re: [v6ops] PMTUD forever, was: MTUs on the general Internet
X-BeenThere: v6ops@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: v6ops discussion list <v6ops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/v6ops>, <mailto:v6ops-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/v6ops/>
List-Post: <mailto:v6ops@ietf.org>
List-Help: <mailto:v6ops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/v6ops>, <mailto:v6ops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2014 12:14:50 -0000

On 2014-12-05 12:00, Philip Homburg wrote:
> In your letter dated Fri, 05 Dec 2014 11:56:01 +0100 you wrote:
>> On 2014-12-05 11:38, Philip Homburg wrote:
>>> Another way forward is to have to 'internet facing' side of the tunnel forward
>>> large packets fragmented.
>>
>> Only end hosts do fragmentation in IPv6.
> 
> I was talking about tunnels. In general, tunnel endpoints are hosts.
> 
> In case it wasn't clear, I meant fragmenting the outer (IPv4) packet,
> not the inner (IPv6) packet.

Not only tunnels have a lower MTU. Just adding an extension header
somewhere and you already lower the payload size.


Doing fragmentation means sending at least two packets, maybe one gets
lost, what to do, resend, wait? Note that most tunneling protocols do
not resend data (unless they run over TCP and then TCP handles it).

It also pushes the burden of refragmentation towards the receiver of the
packet, which suddenly becomes open to a fragmentation attack, which is
likely not what they will want to see happening (enough crap gets send
to those boxes already because someone is misbehaving on IRC).


Remember that the minimum MTU for IPv6 is 1280 for a reason: very safe
to use for tunneling and other constructs where one does not have a full
Ethernet MTU.

Just sticking everywhere to 1500 is not a solution. Unless one wants to
define the minimum MTU for IPv6 as 1500. It is still a minimum and there
are speakers out there that do 9000 with ease, just not intra-AS, and
intra-AS is where these kind of PTB and ICMP ratelimiting problems
exist: in somebody elses network.


As for implementations doing fragging of tunneled packets, check:
http://backreference.org/2013/07/23/gre-bridging-ipsec-and-nfqueue/

Which gives a nice overview why that further is a bad idea and why it
typically will not work anyway unless getting very hacky.

Oh, and do apply that to every deployed host on the Internet please.


Search also for frag/mtu/df/PMTUDISC in:
 https://github.com/torvalds/linux/blob/master/net/ipv6/sit.c

yes there is a magic 'pmtudisc' option for tunnels, but not enabled per
default and it does not work as expected.

For some fun reason, only custom TTLs get a frag_off filled and thus
possibility to not frag. Thus if one does not specify a TTL at creation
time (advised anyway as the default used to be 255 or actually 'TTL from
the tunnel device') the DF flag does not get set...

Also check how often the MTU is forced to the IPv6 minimum MTU. Fun also
that that code is so well commented on why certain pieces of code are
there let alone what they do.

These:
https://github.com/freebsd/freebsd/blob/master/sys/netinet/in_gif.c
https://github.com/freebsd/freebsd/blob/master/sys/netinet/ip_output.c
read sooo much better than the Linux equivalent... comments, what a
useful mechanism for documenting why things are done.

As gif does not set ip_off, DF is not set and thus ip_output will
fragment here.


Or summary on those two platforms:
 FreeBSD	fragments packets (DF not set)
 Linux 		fragments normally (DF not set), but most configs
		define TTL and thus DF gets set and packets get dropped
                need to optionally add hack to drop DF bit.


I am quite sure that at least in the SixXS userbase nobody uses this
feature, as sixxsd does not do reassembly for proto-41 packets...
(and the default MTU is 1280 as mentioned before).

Greets,
 Jeroen