From owner-freebsd-net@freebsd.org Mon Mar 23 09:26:49 2020 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 92E9827DD73 for ; Mon, 23 Mar 2020 09:26:49 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48m8CX646jz3JgF for ; Mon, 23 Mar 2020 09:26:48 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=SIWoAF3pRQ/BNPNx/1G1dqivtv2tl15Wbctrhrs7DU0=; b=NXqhfAr+TCLFbLw2wVXlOrRfAG G3e4mshBr1XlC4Q9Q47dZMxx23SJxwNOAN6lYqkWxLSnskCxUn1ZHw0hHB3sF5b/4tSzrXvSYAyh+ GQGLVQ8MRzpQA5fxEuWO+/9jRLX+aIGVxZA2ClneOKptRo8V2iKBWubTEbogWR4IUtUo=; Received: from vas by admin.sibptus.ru with local (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jGJM7-000Err-9P; Mon, 23 Mar 2020 16:26:47 +0700 Date: Mon, 23 Mar 2020 16:26:47 +0700 From: Victor Sudakov To: "Patrick M. Hausen" Cc: freebsd-net@freebsd.org Subject: Re: IP MTU on gif and gre interfaces (with and without IPSec encryption) Message-ID: <20200323092647.GA57111@admin.sibptus.ru> References: <20200323050012.GA50490@admin.sibptus.ru> <7D560C6A-EB51-414A-A3A1-18587D40C218@punkt.de> <20200323092104.GA56721@admin.sibptus.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: <20200323092104.GA56721@admin.sibptus.ru> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 48m8CX646jz3JgF X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=NXqhfAr+; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-8.46 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; IP_SCORE(-3.37)[ip: (-9.89), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-1.95), country: US(-0.05)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 09:26:49 -0000 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Victor Sudakov wrote: > Patrick M. Hausen wrote: > >=20 > > > Am 23.03.2020 um 06:00 schrieb Victor Sudakov : > > > I've noticed that a newly created gre0 interface has the expected "mt= u 1476" > > > value, but a newly created gif0 interface has "mtu 1280", why would t= he > > > default be so low? > >=20 > > gif is frequently used as the innermost encapsulation like in gif tunnel > > across host mode IPsec. Then there might be PPPoE, too. Possibly a > > VLAN tag ... >=20 > Please correct me if I'm wrong: >=20 > - ESP overhead - 40 bytes > - UDP encapsulation of ESP (udp/4500): 8 bytes > - PPPoE overhead - 8 bytes (?) > - A VLAN tag just increases the max frame size, it does not reduce the IP= MTU. >=20 > So we could keep the safe default for gif(4) at 1500-40-8-8=3D1444 bytes. > OK, at 1400 as for if_ipsec. But not at 1280! I should probably have counted the 20 bytes of the additional IP header which results in 1500-40-8-8-20=3D1424. So 1400 is really safe. --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeeIDXAAoJEA2k8lmbXsY087YH+wVNzMozSWG8rUHqoqJLVAHw aHNKQh+mawIyVO2In+54ed3tQP06UxPYWcbtaH+zoBggdidQBw5MQKkynntSstKT 4LaYZoQO2dP6bO85l44zuR2iT69E1OXauW8jIx6B+avVB/4niedvEZfyCloHcaFg Mvvw5Gxss3OhMGX5/xggs/XPO0LWke5k8txVTrLywJ0ESv1K44TMTleSv2sXDp1X Jmwnu6/0xQVRtbSUeSPIFH3dCfHMeev+ft97iOmh4kamrCAmxa3VvavNhCmNc9FT 5N0QfdZNdKa6jS9pJyuu/rHkSBc30b/sPlZnrOsm1wytlcVQdvXggE1K/dgglKI= =Wpa6 -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--