From nobody Wed Nov 16 23:28:35 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NCK4K3Ntlz4hPBV for ; Wed, 16 Nov 2022 23:28:49 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NCK4J1y5mz4F5D for ; Wed, 16 Nov 2022 23:28:48 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:638:a02:a001:20e:cff:fe4a:feaa is neither permitted nor denied by domain of tuexen@freebsd.org) smtp.mailfrom=tuexen@freebsd.org; dmarc=none Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:89a2:5614:b867:b96]) (Authenticated sender: macmic) by drew.franken.de (Postfix) with ESMTPSA id 997C17CCCD7DE; Thu, 17 Nov 2022 00:28:35 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: Re: ICMPv6 over lo0 From: tuexen@freebsd.org In-Reply-To: <05FB9658-5293-4154-BB50-2E3A189DD306@FreeBSD.org> Date: Thu, 17 Nov 2022 00:28:35 +0100 Cc: freebsd-net Content-Transfer-Encoding: quoted-printable Message-Id: References: <05FB9658-5293-4154-BB50-2E3A189DD306@FreeBSD.org> To: Zhenlei Huang X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Spamd-Result: default: False [-2.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; FROM_NO_DN(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[tuexen]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; DMARC_NA(0.00)[freebsd.org]; TAGGED_RCPT(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4NCK4J1y5mz4F5D X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N > On 16. Nov 2022, at 16:15, Zhenlei Huang wrote: >=20 >=20 >> On Nov 16, 2022, at 11:19 AM, Zhenlei Huang wrote: >>=20 >>>=20 >>> On Nov 16, 2022, at 5:14 AM, tuexen@freebsd.org wrote: >>>=20 >>> Dear all, >>>=20 >>> when using the master branch of today (or 13.1) I get when running >>>=20 >>> tuexen@ampere128:~ % ping6 -c 1 -b 30000 -s 20000 ::1 >>> PING6(20048=3D40+8+20000 bytes) ::1 --> ::1 >>> 20008 bytes from ::1, icmp_seq=3D0 hlim=3D64 time=3D0.709 ms >>>=20 >>> --- ::1 ping6 statistics --- >>> 1 packets transmitted, 1 packets received, 0.0% packet loss >>> round-trip min/avg/max/std-dev =3D 0.709/0.709/0.709/0.000 ms >>>=20 >>> which is expected. What I don't expect is: >>>=20 >>> tuexen@ampere128:~ % tcpdump -i lo0 -n >>> tcpdump: verbose output suppressed, use -v or -vv for full protocol = decode >>> listening on lo0, link-type NULL (BSD loopback), capture size 262144 = bytes >>> 22:06:38.835630 IP6 ::1 > ::1: frag (0|1232) ICMP6, echo request, = seq 0, length 1232 >>> 22:06:38.835639 IP6 ::1 > ::1: frag (1232|1232) >>> 22:06:38.835641 IP6 ::1 > ::1: frag (2464|1232) >>> 22:06:38.835641 IP6 ::1 > ::1: frag (3696|1232) >>> 22:06:38.835642 IP6 ::1 > ::1: frag (4928|1232) >>> 22:06:38.835642 IP6 ::1 > ::1: frag (6160|1232) >>> 22:06:38.835643 IP6 ::1 > ::1: frag (7392|1232) >>> 22:06:38.835644 IP6 ::1 > ::1: frag (8624|1232) >>> 22:06:38.835644 IP6 ::1 > ::1: frag (9856|1232) >>> 22:06:38.835645 IP6 ::1 > ::1: frag (11088|1232) >>> 22:06:38.835645 IP6 ::1 > ::1: frag (12320|1232) >>> 22:06:38.835646 IP6 ::1 > ::1: frag (13552|1232) >>> 22:06:38.835647 IP6 ::1 > ::1: frag (14784|1232) >>> 22:06:38.835647 IP6 ::1 > ::1: frag (16016|1232) >>> 22:06:38.835648 IP6 ::1 > ::1: frag (17248|1232) >>> 22:06:38.835648 IP6 ::1 > ::1: frag (18480|1232) >>> 22:06:38.835649 IP6 ::1 > ::1: frag (19712|296) >>> 22:06:38.836002 IP6 ::1 > ::1: frag (0|16336) ICMP6, echo reply, seq = 0, length 16336 >>> 22:06:38.836006 IP6 ::1 > ::1: frag (16336|3672) >>> ^C >>> 19 packets captured >>> 19 packets received by filter >>> 0 packets dropped by kernel >>>=20 >>> Why is for the Echo Request an MTU of 1280 used, whereas for the = response an MTU of 16384 >>> is used. >>>=20 >>> Since >>> tuexen@ampere128:~ % ifconfig lo0 >>> lo0: flags=3D8049 metric 0 mtu 16384 >>> options=3D680003 >>> inet6 ::1 prefixlen 128 >>> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 >>> inet 127.0.0.1 netmask 0xff000000 >>> groups: lo >>> nd6 options=3D21 >>> is used, I would expect an MTU of 16384 also be used for the Echo = Request instead of >>> the minimum IPv6 MTU of 1280. >>=20 >> I believe MTU of 16384 should be used for Echo Request. >=20 > That is by intuition. Sure. My fault. >=20 > RFC 3542 introduced IPV6_USE_MIN_MTU and FreeBSD implemented it in = 33841545909f4. >=20 > IPv6 is different from IPv4 of fragmentation, intermediate routers are = not allowed to do fragmentation > and thus PMTU is a must (or a minimal MTU should be chosen). >=20 > Section 11.1 in RFC 3542: > > For unicast destinations path > > MTU discovery should be performed by default. For multicast > > destinations path MTU discovery should be disabled by default. >=20 > For simple ping6 program it seems disable performing PMTU for both = unicast and multicast destinations > by default is lightweight. In most cases we do not send large payload = via ping6. Well, I use it for testing reachability as a function of the packet = size. So I did not expect that it uses the minimum MTU instead of the = interface/route MTU. But now I know that I have to use -u when using IPv6. Best regards Michael >=20 >>=20 >>>=20 >>> Is this intended? At least for me, it is not expected... >>>=20 >>> Best regards >>> Michael >=20 >=20