Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2020 06:44:56 -0800
From:      Michael Sierchio <kudzu@tenebras.com>
To:        Eugene Grosbein <eugen@grosbein.net>
Cc:        Victor Sudakov <vas@sibptus.ru>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>,  "Andrey V. Elsukov" <bu7cher@yandex.ru>, Michael Tuexen <tuexen@freebsd.org>
Subject:   Re: IPSec transport mode, mtu, fragmentation...
Message-ID:  <CAHu1Y71hGwPP48nYUYUpKQO3r%2B8HwEWq4uNGOi3Bup3PuC%2BYZA@mail.gmail.com>
In-Reply-To: <d59805e9-3fd5-eb56-10db-26b532cb5e85@grosbein.net>
References:  <f9b7357e-ced1-4ce5-40d5-8e3dcad42442@yandex.ru> <d263a709-63cf-7da5-1747-8a6791f6503f@grosbein.net> <20200116155305.GA465@admin.sibptus.ru> <55f7bafa-24c4-9810-0d21-f82cb332ee2d@grosbein.net> <20200116160745.GA1356@admin.sibptus.ru> <72355e03-1cf8-c58f-3aec-b0a21e631870@grosbein.net> <20200117093645.GA51899@admin.sibptus.ru> <70b0b855-189b-03c2-0712-fc1e35640702@grosbein.net> <20200117150928.GB66677@admin.sibptus.ru> <16550199-67b9-d331-0c1e-4afa0e8b361c@grosbein.net> <20200118105524.GA10042@admin.sibptus.ru> <d59805e9-3fd5-eb56-10db-26b532cb5e85@grosbein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[apologies for  top-posting]

What is the result of

> sysctl net.enc

?  This might be a clue about the packets, which you could be seeing twice.

On Sat, Jan 18, 2020 at 3:17 AM Eugene Grosbein <eugen@grosbein.net> wrote:

> 18.01.2020 17:55, Victor Sudakov wrote:
>
> >>>>> Back to the point. I've figured out that both encrypted (in transpo=
rt
> >>>>> mode) and unencrypted TCP segments have the same MSS=3D1460. Then I=
'm
> >>>>> completely at a loss how the encrypted packets avoid being
> fragmented.
> >>>>> TCP has no way to know in advance that encryption overhead will be
> >>>>> added.
> >
> > Here: http://admin.sibptus.ru/~vas/ftp-pcap.tar.gz you can find two
> > identical FTP sessions, the only difference being ipsec=3Doff during on=
e
> > session and ipsec=3Don during the other one.
> >
> > As I said, in both the sessions MSS=3D1460 which is already odd, and I
> > can't explain to myself why file transfer still works without MSS
> > ajustment.
> >
> > Moreover, something fishy is happening in the encrypted session: there
> > are many TCP retransmissions (I was capturing on the FTP server's side,
> > so there are many segments with the same sequence number). How would yo=
u
> > explain this? There are almost no retransmissions in the unencrypted
> session.
> >
> > All this is happening in a lab environment (one bhyve VM is an FTP
> > server and the other downloads a file from the first), both VMs are on
> > the same bridge interface. There are almost 19,000 packets in the
> > encrypted file vs 12,000 in the plain file, I think because of those
> > excessive retransmissions.
> >
> > Could the retransmissions be some artifact of the enc(4) interface I wa=
s
> > capturing the encrypted session on?
>
> I doubt it. And I can't explain this, but maybe it's work of PMTUD
> Blackhole detection?
> Look at sysctl net.inet.tcp | fgrep blackhole_
>
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>


--=20

"Well," Brahm=C4=81 said, "even after ten thousand explanations, a fool is =
no
wiser, but an intelligent person requires only two thousand five hundred."

- The Mah=C4=81bh=C4=81rata



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHu1Y71hGwPP48nYUYUpKQO3r%2B8HwEWq4uNGOi3Bup3PuC%2BYZA>