Subject: Re: IPV6_USE_MIN_MTU and IPV6_DONT_FRAG questions

From: Hannes Frederic Sowa <[email-masked]>
Date: Mon, 12 Nov 2012 16:12:59 +0100

On 11/07/2012 02:30 AM, Mark Andrews wrote:
> Should setting IPV6_USE_MIN_MTU to one (1) result in fragmented TCP packets?
> Should setting IPV6_DONTFRAG to one (1) work on TCP sockets?

As I have not read otherwise I would treat IPV6_USE_MIN_MTU as
transport-agnostic.

The usage of IPV6_DONTFRAG is only specified on UDP and raw sockets (see
RFC3542 11.2).

---

From: Hannes Frederic Sowa <[email-masked]>
Date: Mon, 12 Nov 2012 16:19:32 +0100

> The usage of IPV6_DONTFRAG is only specified on UDP and raw sockets (see

Sorry, somehow In-Reply-To headers are missing on some of the mails. I
did not see that others have answered before.

---

From: Mark Andrews <[email-masked]>
Date: Tue, 13 Nov 2012 10:27:46 +1100

> As I have not read otherwise I would treat IPV6_USE_MIN_MTU as

The problem is that there are at least 2 OS's with TCP layers that
do not use IPV6_USE_MIN_MTU when calculating the TCP segment size to
send.  I would have thought that this would have been obvious to do.

Do we need update RFC3542 to say that IPV6_USE_MIN_MTU is to be used
when calculating the TCP segment size?

> The usage of IPV6_DONTFRAG is only specified on UDP and raw sockets (see

Which is short sighted.  There is no reason not to apply it to all
transports as all transports have to handle PTB and this is just
a locally generated PTB.

And while we are talking about RFC3542 how to we get POSIX updated to
include the advanced half of the API as it is a pain in the butt for
application developers.
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> [email-masked]
> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> --------------------------------------------------------------------
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: [email-masked]

---

From: Hannes Frederic Sowa <[email-masked]>
Date: Tue, 13 Nov 2012 09:30:08 +0100

> when calculating the TCP segment size?

I am in favor of deprecating this option on TCP sockets. I personally
dislike this option even on datagram sockets. The tri-state value has to
be checked for every packet on the output path to distinguish between
multicast and unicast frames (not connected sockets essentially have two
different MTUs). As such, this option could not just clamp the fragment
size in the internal socket structure as the current linux(IPV6_MTU)
interface does. I totally can understand Apple not including this
setting in the TCP fragment size calculations, especially if this
feature was added at a later time.

Otherwise, I would also expect that the maximum segment size is set to
1280-40-20(-8 if atomic fragments should be produced ;) ). So, perhaps a
note about the maximum segment size calculation should be added to the
relevant section, too.

> transports as all transports have to handle PTB and this is just

Isn't IPV6_DONTFRAG the default on TCP sockets?

> include the advanced half of the API as it is a pain in the butt for

The best place to start here would be the austin group bug tracker at
<http://austingroupbugs.net>. Perhaps one could trigger the addition of
the RFC5014 source selection APIs into POSIX, too.

Greetings,

  Hannes

---

From: Hannes Frederic Sowa <[email-masked]>
Date: Wed, 14 Nov 2012 09:09:58 +0100

> when calculating the TCP segment size?

Do we know of any use cases for IPV6_USE_MIN_MTU on TCP sockets? Will
DNS server software vendors would use it as fallback to UDP?

> include the advanced half of the API as it is a pain in the butt for

Seems this is already the case. I looked at some usees of
IPV6_USE_MIN_MTU and i.e. bind is already working around some strange
setsockopt interactions with other options on FreeBSD (bind specifies
IPV6_USE_MIN_MTU as a per packet control message there).

-- 
Hannes Sowa                   <[email-masked]>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

---

From: Brian E Carpenter <[email-masked]>
Date: Wed, 14 Nov 2012 08:50:06 +0000

On 14/11/2012 08:09, Hannes Frederic Sowa wrote:
> Do we know of any use cases for IPV6_USE_MIN_MTU on TCP sockets? 

I think the use case is when there is a user option to use 1280 bytes
because of a path MTU limitation due to a tunnel, *and* PMTUD and/or
fragmentation fails. (Read draft-taylor-v6ops-fragdrop and be scared.)
So using it to trigger fragmentation is pointless; to me the only thing
that makes sense is if it reduces the MSS accordingly. I've seen
that fail in the wild, when running 6to4.

> Will

Huh? They are in bad trouble with UDP if running DNSSEC and fragmentation
doesn't work.

    Brian

---

From: Hannes Frederic Sowa <[email-masked]>
Date: Wed, 14 Nov 2012 10:07:00 +0100

> fragmentation fails. (Read draft-taylor-v6ops-fragdrop and be scared.)

Will read the draft later. Thanks for the pointer.

> that fail in the wild, when running 6to4.

I totally agree. Reducing the MSS is the only sane thing this socket
option can do on a TCP socket.

> Huh? They are in bad trouble with UDP if running DNSSEC and fragmentation

So they could try TCP after some retries, perhaps already with reduced
MSS in place.