From owner-freebsd-net@freebsd.org Tue Apr 6 12:54:38 2021 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 660705D06E1; Tue, 6 Apr 2021 12:54:38 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FF6tP1Z6kz4nxg; Tue, 6 Apr 2021 12:54:36 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 136CsSjo005422; Tue, 6 Apr 2021 05:54:28 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 136CsRZB005421; Tue, 6 Apr 2021 05:54:27 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202104061254.136CsRZB005421@gndrsh.dnsmgr.net> Subject: Re: TCP Connection hang - MSS again In-Reply-To: To: Eugene Grosbein Date: Tue, 6 Apr 2021 05:54:27 -0700 (PDT) CC: Rozhuk Ivan , freebsd-current@freebsd.org, freebsd-net X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4FF6tP1Z6kz4nxg X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.10 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MAILMAN_DEST(0.00)[freebsd-current,freebsd-net]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2021 12:54:38 -0000 > 05.04.2021 19:44, Rozhuk Ivan wrote: > > >>> As I understand, in some cases remote host does not reply with MSS > >>> option, and host behind router continue use mss 8960, that dropped > >>> by router. > >> If the peer does not provide an MSS option, your local FreeBSD based > >> host should use an MSS of net.inet.tcp.mssdflt bytes. The default is > >> 536. So I don't think this should be a problem. > > > > Thats it! > > Thanks, it was ~64k in mine config. > > This is also per-host setting, you know :-) > > It is generally bad idea using MTU over 1500 for an interface facing public network > without -mtu 1500. You see, because TCP MSS affects only TCP and there is also UDP > that happily produces oversized datagramms for DNS or RTP or NFS or tunneling like L2TP or OpenVPN etc. > relying on IP fragmentation. > > I still recommend using -mtu 1500 in addition to mssdflt in your case. I do not recommend such a setting. That would defeat any jumbo frame usage locally! The gateway/router that is forwarding packets to the internet connection needs its upstream interface mtu set properly, and configured to properly return icmp need fragement messages on the interfaces towards the internal network. This leaking of jumbo frames to the Internet is almost always caused by blockage of icmp packets internal to a network, and doing that forces one to run on an mtu that is acceptable to the global Internet, a far from optimal situation. -- Rod Grimes rgrimes@freebsd.org