netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NAT stops forwarding ACKs after PMTU discovery
@ 2013-08-18  5:55 Corey Hickey
  2013-08-18 15:24 ` Eric Dumazet
  0 siblings, 1 reply; 32+ messages in thread
From: Corey Hickey @ 2013-08-18  5:55 UTC (permalink / raw)
  To: Linux Netdev List

Hi,

If there is a better user-oriented list I should ask this question on,
please tell me; I've asked a couple similar questions on netdev before
and gotten some great help.


I'm having a problem wherein some NATted connections stop forwarding
packets. I've troubleshot the problem far enough to tell that it happens
when path MTU discovery happens--the ACK to the retransmitted packet
never gets forwarded back to my local client (and neither do the
retransmitted ACKs).

This is my setup:
----------------------------------------------------------------------
       MTU 9100                  MTU 1355  MTU 1500
client      --> linux router          -->  vpn  --> work host
198.18.0.3      198.18.0.1    (eth0)                10.15.24.13
                192.168.61.54 (tun0)
----------------------------------------------------------------------

I'm running openconnect on a Linux router to connect to a cisco VPN at
work. The Linux router does SNAT (MASQUERADE) over the virtual tun0
interface created by openconnect.

This is the best test I have so far:

$ sudo ip route flush cache ; ssh workhost.example.com exit
Read from socket failed: Connection reset by peer

Most of the time, this hangs for a few minutes before giving up;
sometimes it just works fine. tcpdumps indicate that when it works, all
packets transmitted are below the VPN's MTU; when it fails, MTU
discovery has happened:

1. client sends large packet, for example 1832 bytes
2. router sends ICMP fragmentation needed
3. client retransmits with a smaller packet, for example 1303 bytes
4. router forwards packet over VPN
5. work host ACKs packet
6. router receives ACK but does not forward it
7. both endpoints retransmit, but ACKs never get forwarded

The NAT table maintains an entry throughout (and continues to SNAT
retransmits from the client), but the ACKs from the server never get
forwarded.

fire:~# netstat-nat -n -d 10.15.24.13
Proto NATed Address           Destination Address            State
tcp   198.18.0.3:51076        10.15.24.13:22                 ESTABLISHED


I put a LOG target on the INPUT chain, though, and apparently these
packets are bypassing the NAT; the kernel does not think they should be
forwarded (else they would be on the FORWARD chain).

[23335.509084] IN=tun0 OUT= MAC= SRC=10.15.24.13 DST=192.168.61.54
LEN=64 TOS=0x00 PREC=0x00 TTL=62 ID=28270 DF PROTO=TCP SPT=22 DPT=51076
WINDOW=134 RES=0x00 ACK FIN URGP=0


The kernel on the router is 3.10-2-amd64 (from Debian testing). I had
the same problem with 3.2.0-4-amd64 (from Debian stable), before I tried
to see if I could upgrade the problem away.

Any help would be much appreciated. I can send full tcpdumps if needed.

Thanks,
Corey

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-08-22  4:15 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-18  5:55 NAT stops forwarding ACKs after PMTU discovery Corey Hickey
2013-08-18 15:24 ` Eric Dumazet
2013-08-18 16:59   ` Corey Hickey
2013-08-18 21:23   ` Jozsef Kadlecsik
2013-08-19  0:00     ` Eric Dumazet
2013-08-19  0:03       ` Eric Dumazet
2013-08-19  8:43         ` Corey Hickey
2013-08-19 12:33           ` Christoph Paasch
2013-08-19 13:24             ` Eric Dumazet
2013-08-19 13:49               ` Christoph Paasch
2013-08-19 13:58                 ` Eric Dumazet
2013-08-19 14:35                   ` Phil Oester
2013-08-19 15:32                     ` Eric Dumazet
2013-08-19 15:33                     ` Christoph Paasch
2013-08-19 16:00                       ` Eric Dumazet
2013-08-19 17:15                         ` Christoph Paasch
2013-08-19 18:00                           ` Phil Oester
2013-08-19 18:10                           ` Eric Dumazet
2013-08-19 19:29                             ` [RFC 0/2] Account for duplicate ACKs with invalid SACK-blocks Christoph Paasch
2013-08-19 19:29                               ` [RFC 1/2] Use acked_out for reno-style ack acounting instead of sacked_out Christoph Paasch
2013-08-19 19:29                               ` [RFC 2/2] Account acked_out in sack, if the sack is invalid Christoph Paasch
2013-08-19 21:22                               ` [RFC 0/2] Account for duplicate ACKs with invalid SACK-blocks Corey Hickey
2013-08-20  7:36                                 ` Christoph Paasch
2013-08-22  3:32                               ` David Miller
2013-08-22  4:15                                 ` Corey Hickey
2013-08-19 14:43                   ` NAT stops forwarding ACKs after PMTU discovery Christoph Paasch
2013-08-19 20:13                   ` Jozsef Kadlecsik
2013-08-19 20:43                     ` Christoph Paasch
2013-08-19 21:08                     ` Eric Dumazet
2013-08-19 22:07                       ` Jozsef Kadlecsik
2013-08-20  4:18                         ` Corey Hickey
2013-08-19 18:22             ` Corey Hickey

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).