From: Chris Siebenmann <cks@cs.toronto.edu>
To: Eric Dumazet <eric.dumazet@gmail.com>, netdev@vger.kernel.org
Cc: cks@cs.toronto.edu
Subject: Recursive routing causes MTU collapse (was Re: Bug? GRE tunnel periodically won't transmit some packets)
Date: Sun, 20 Nov 2011 19:23:34 -0500 [thread overview]
Message-ID: <20111121002334.76F9F360D9@apps0.cs.toronto.edu> (raw)
In-Reply-To: cks's message of Thu, 10 Nov 2011 00:16:49 -0500. <20111110051649.505C8362D2@apps0.cs.toronto.edu>
I believe I've identified the root cause of my GRE tunnel packet
transmission problems. The short summary is that I have a 'recursive'
routing, where the route for the tunnel endpoint can nominally be routed
over the tunnel itself. In current kernel versions, when a packet for
the tunnel endpoint is actually routed over the tunnel the path MTUs
determined for the endpoint and the tunnel both collapse down to very
small values.
Here is the routing I have. First, the links themselves, for the DSL
PPPoE device and the GRE tunnel:
3: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN qlen 3
link/ppp
inet 66.96.18.208 peer 66.96.31.6/32 scope global ppp0
5: extun: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1200 qdisc noqueue state UNKNOWN
link/gre 66.96.18.208 peer 128.100.3.58
inet 128.100.3.52/32 scope global extun
(My IPSec policy forces GRE traffic between 128.100.3.58 and
66.96.18.208 to be encrypted in 'esp/tunnel' mode.)
Now the recursion. To reach other machines on 128.100.3.0/24, I route
128.100.3.0/24 over the GRE tunnel:
; ip route list match 128.100.3.51
default dev ppp0 scope link
128.100.3.0/24 dev extun scope link
I also have policy based routing set to force traffic with an IP
origin of 66.96.18.208 out over the PPP link and traffic with an
IP origin of 128.100.3.52 out the GRE tunnel.
With this setup in place, if I do anything that tries to talk to
128.100.3.58 (such as ping or ssh) what I get is an immediate path
MTU collapse for the 66.96.18.208 -> 128.100.3.58 link used by the
GRE tunnel, ending when the path MTU for 66.96.18.208 -> 128.100.3.58
reaches 552 octets. At this point various things choke (I am guessing
because the GRE tunnel expects a minimum MTU of 576 octets).
If I add a host route for 128.100.3.58 that forces traffic for it
through ppp0 I can mostly avoid this route collapse:
; ip route list exact 128.100.3.58
128.100.3.58 dev ppp0 scope link src 66.96.18.208 mtu 1492
However, even with this if I explicitly force traffic for 128.100.3.58
over the GRE tunnel (such as by specifying the IP source address
so as to make my policy based routing kick in) I still see the MTU
collapse. Using 'mtu lock 1492' instead of plain 'mtu 1492' on this
host-based route does not appear to change anything.
This did not happen back in kernel 2.6.35.14 (the Fedora 14 kernel) and
previous kernels (going back years). In that kernel everything was happy
even without the ppp0-forcing host route for 128.100.3.58 and I could
talk to 128.100.3.58 over the GRE tunnel without causing any path MTU
changes (and without problems in general).
(This always made my head hurt a little bit but since it worked,
I didn't worry about it.)
- cks
prev parent reply other threads:[~2011-11-21 0:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 16:21 Bug? GRE tunnel periodically won't transmit some packets Chris Siebenmann
2011-11-07 16:55 ` Eric Dumazet
2011-11-08 6:17 ` Chris Siebenmann
2011-11-08 6:43 ` Eric Dumazet
2011-11-08 7:08 ` Chris Siebenmann
2011-11-08 7:34 ` Eric Dumazet
2011-11-08 10:25 ` Eric Dumazet
2011-11-08 13:05 ` Chris Siebenmann
2011-11-08 14:05 ` Eric Dumazet
2011-11-10 5:16 ` Chris Siebenmann
2011-11-21 0:23 ` Chris Siebenmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111121002334.76F9F360D9@apps0.cs.toronto.edu \
--to=cks@cs.toronto.edu \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).