Skip to contentSkip to conversation

TCPMSS target for IPv6

DISCUSSION Nicolas George 3 participants 5 messages Dec 11, 2003 – Dec 19, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

I am really missing the TCPMSS target for IPv6. With IPv6, MSS value is not only a problem with "criminally braindead ISPs", but also with IPv6-over-IPv4 tunnels: if the fragmentation problem arises in the IPv4 world, an ICMPv4 "fragmentation needed" is sent, but it can not be converted into an ICMPv6 "too big", so path MTU discovery does not work.

As far as I can see, the code for iptables and ip6tables is really similar, so it should be quite straightforward to port IPv4 TCPMSS to IPv6 for someone that already knows the usual kernel network structures (which is, alas, not my case yet).

Regards,

Signature · 1 line
  Nicolas George
#1 lore raw

Hi, Nicolas,

From: Nicolas George <[email protected]>
Date: Thu, 11 Dec 2003 13:26:49 +0100

Quoted 5 lines

I am really missing the TCPMSS target for IPv6. With IPv6, MSS value is not only a problem with "criminally braindead ISPs", but also with IPv6-over-IPv4 tunnels: if the fragmentation problem arises in the IPv4 world, an ICMPv4 "fragmentation needed" is sent, but it can not be converted into an ICMPv6 "too big", so path MTU discovery does not work.

Please read subsection 3.2. in RFC 2893 .

Quoted 4 lines

As far as I can see, the code for iptables and ip6tables is really similar, so it should be quite straightforward to port IPv4 TCPMSS to IPv6 for someone that already knows the usual kernel network structures (which is, alas, not my case yet).

Do we have any other cases that TCPMSS is needed ? I think MTU issues should be solved in IPv6 stack (and lower layer in the case that MTU < 1280) and RFCs say so. So I think we don't need it.

Quoted 5 lines

Regards,

Signature · 1 line
  Nicolas George

----------------------------------------
Yasuyuki KOZAKAI

Communication Platform Laboratory,
Corporate Research & Development Center,
Toshiba Corporation

[email protected]
----------------------------------------

#2 lore raw

Le quintidi 25 frimaire, an CCXII, Yasuyuki Kozakai a écrit :

Quoted 4 lines
Quoted 3 lines

IPv6-over-IPv4 tunnels: if the fragmentation problem arises in the IPv4 world, an ICMPv4 "fragmentation needed" is sent, but it can not be converted into an ICMPv6 "too big", so path MTU discovery does not work.

Please read subsection 3.2. in RFC 2893 .

You are right, the problem is adressed, and it should work. Alas, there is difference between what is written in RFC and what programmers really do.

Quoted 3 lines

Do we have any other cases that TCPMSS is needed ? I think MTU issues should be solved in IPv6 stack (and lower layer in the case that MTU < 1280) and RFCs say so. So I think we don't need it.

I believe we all agree that things should work alone. But if that was true, we would have enough IP addresses for everyone and programs with powerful control access and no buffer overflows, and so no need for nterilter, isn't it?

I did not beg for IPv6/TCPMSS just because I thought it was cool stuff. I have a precise problem, where packets of the wrong size will get lost without any ICMP, and therfore TCP connections freeze as soon as a large segment is sent. It involves an IPv4 tunnel, and the sizes fit, so I guess the problem comes from lost ICMPv4.

Unfortunately, I do not control any part of the tunnel itself (it is a 6to4 tunnel), so I can not track the exact problem, and even less correct it. The only solution I see to avoid freezed TCP connections is to advertise a small enough MSS. I can do that by globally lowering my MTU, but this is a quite ugly solution. Being able to do that on a per-IP basis would be great.

My point is that we do not need TCPMSS less for IPv6 than for IPv4 (except that IPv6 itself is seldom used): the goal of such a target is to workaround bogus infrastructures ("criminally braindead ISPs"), and there seems to exist as much of those for IPv6 as for IPv4 (and anyway tunnels give us the worst of both worlds).

The rant is finished, you can resume your normal activities.

Regards,

Signature · 1 line
  Nicolas George
#3 lore raw
Quoted 3 lines · Nicolas George

You are right, the problem is adressed, and it should work. Alas, there is difference between what is written in RFC and what programmers really do.

And generally those differences makes failures and interoperability issues.

Quoted 6 lines

Unfortunately, I do not control any part of the tunnel itself (it is a 6to4 tunnel), so I can not track the exact problem, and even less correct it. The only solution I see to avoid freezed TCP connections is to advertise a small enough MSS. I can do that by globally lowering my MTU, but this is a quite ugly solution. Being able to do that on a per-IP basis would be great.

MTU and MSS is different things. MTU is here and now for sending this IP packet on this path, MSS is end-to-end telling the other end how large TCP segments you can accept (after defrag). There is no problem in setting up routing with a different MTU depending the desitnation to work around broken equipment where PMTU-discovery does not work, except that the IPv6 routing implementation in Linux maybe is a little short when it comes to advanced routing..

By modifying the MSS below the assumed Path-MTU (minus headers) you avoid the Path-MTU discovery problem for return traffic as there will not be any packets much larget than the MSS, and if done in both directions it can work around MTU problems in both directions for TCP traffic.

But is does not solve the underlying MTU problem, and you may still risk running into MTU issues especially if there is non-TCP traffic involved as MSS only applies to TCP, not UDP/AH/ESP/Whatever.

Quoted 5 lines

My point is that we do not need TCPMSS less for IPv6 than for IPv4 (except that IPv6 itself is seldom used): the goal of such a target is to workaround bogus infrastructures ("criminally braindead ISPs"), and there seems to exist as much of those for IPv6 as for IPv4 (and anyway tunnels give us the worst of both worlds).

Partly agreed, but I disagree with the use of MSS to work around Path-MTU problems to begin with. Modifying MSS has other applications which may be useful howenver (even if I do not remember any right now).

PMTU issues (not PMTU discovery as such) is relatively rare unless there is tunnels involved. Any tunneling equipment not properly (automatically or manually) handling PMTU at the endpoints is broken and needs to be fixed now. There may be a slight delay in PMTU-discovery for tunnels while the tunnel as such adjusts its MTU but this should not be larger than 2 packets, one on for the PMTUD of the tunnel as such, another for the PMTUD of the "client" traffic.

If the tunnieling equipment does not handle PMTU of the tunnel then you better make sure the tunnel is only set up over a path where the PMTU is priorly known allowing the MTU to be set correctly for the tunnel.

Regards
Henrik

#4 lore raw

Le septidi 27 frimaire, an CCXII, Henrik Nordstrom a écrit :

Quoted 3 lines

But is does not solve the underlying MTU problem, and you may still risk running into MTU issues especially if there is non-TCP traffic involved as MSS only applies to TCP, not UDP/AH/ESP/Whatever.

You are right, but I did not find a way to control the MTU. I did try something like:

ip -6 route add $network/48 dev ppp0 mtu 1452

but all I get is:

$network/48 dev ppp0 metric 1024 mtu 1492 advmss 1432

(same reslt with "mtu lock" instead of "mtu", and with just one target IP instead of a network)

I know that altering the MSS would not solve the problem for non-TCP traffic, but solving it for TCP would be at least something (andindeed, I do not expect to do anything but TCP on that link).

Quoted 4 lines

PMTU issues (not PMTU discovery as such) is relatively rare unless there is tunnels involved. Any tunneling equipment not properly (automatically or manually) handling PMTU at the endpoints is broken and needs to be fixed now.

I agree, but I can not fix the tunnel that is bothering me, I do not control the offending end-point. My situation is the following:

my computer

        |
        |	IPv6/PPPoE, MTU=1492
        |
       ISP
        |
        |	IPv6/???, MTU>=1500
        |
   6to4 gateway
        |
        |	IPv6/IPv4/???, MTU=1480
        |
    other ISP
        |
        |	IPv6/IPv4/PPPoE, MTU=1472
        |
friend's computer
        |
	|	IPv6/Ethernet, MTU=1500
	|

other friend's
computer

I suspect "other ISP" (which is ProXaD, aka Free Telecom, one of the big french ISP) to do something nasty with fragmentation needed ICMPs.

Packets of size 1493-1500 get an ICMP from my own computer or are fragmented, packets of size 1481-1492 get an ICMP from the 6to4 gateway, packets of size <=1472 arrive, but packets of size 1473-1480 never arrive nor get an ICMP. As you can see, fixing the tunnel is not an option for me.

I have others problems linked to MSS and failed PMTU discovery, involving a computer on a private network behind my internet-connected computer and some random web server whose replies freeze. I'm wondering if my ISP is blocking fragmentation needed ICMP, but I doubt it because I trust their technical skills. One think I discovered while testing all these network problems is that someone between my outgoing interface and the peer where I can check is lowering the MSS in my packets from 1460 to 1420; I do not know who (there is rp-pppoe, but it should only lower it to 1452). Unfortunately, I will not be able to experiment further for two weeks.

To conclude that mail, I would say two things:

- Maybe I am missing the right and powerful way to address PMTU discovery problems, but I am not alone: a lot of people use MSS alteration for that, either in newsgroups or mailing-lists, or in software (see the -m option to rp-pppoe).

- All this discussion gave me the idea of another option to the REJECT
target: icmp-too-big/icmp-fragmentation-needed.

Regards,

Signature · 1 line
  Nicolas George