From nobody Wed Dec 10 14:25:21 2025 X-Original-To: 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 4dRJ0k733Xz6KdmN for ; Wed, 10 Dec 2025 14:25:42 +0000 (UTC) (envelope-from pen@lysator.liu.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRJ0j6F2Qz3Byj for ; Wed, 10 Dec 2025 14:25:41 +0000 (UTC) (envelope-from pen@lysator.liu.se) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=lysator.liu.se; spf=pass (mx1.freebsd.org: domain of pen@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted sender) smtp.mailfrom=pen@lysator.liu.se Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id DE6E02AE1 for ; Wed, 10 Dec 2025 15:25:32 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id D1EE52B4E; Wed, 10 Dec 2025 15:25:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=4.0.1 X-Spam-Score: -1.0 Received: from smtpclient.apple (unknown [IPv6:2001:6b0:17:f002:1000::97]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 521AB2B92 for ; Wed, 10 Dec 2025 15:25:31 +0100 (CET) From: Peter Eriksson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 \(3826.700.81.1.3\)) Subject: Is it possible to force packets to go over a loopback cable? Message-Id: <3C76FF27-49A7-4C45-8E8F-51C1BBF3C6E0@lysator.liu.se> Date: Wed, 10 Dec 2025 15:25:21 +0100 To: "net@freebsd.org" X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Virus-Scanned: ClamAV using ClamSMTP X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.23 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.93)[-0.925]; DMARC_POLICY_ALLOW(-0.50)[lysator.liu.se,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+a:mail.lysator.liu.se]; MIME_GOOD(-0.10)[text/plain]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:1653, ipnet:2001:6b0::/32, country:EU]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[net@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[net@FreeBSD.org]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+] X-Rspamd-Queue-Id: 4dRJ0j6F2Qz3Byj I=E2=80=99d like to find some way to force FreeBSD to send a stream of = packet over a loopback cable connected between two ethernet ports on the = same machine, but it seems FreeBSD also short-circuits it and handles = that traffic internally in the OS. Which normally is a good thing for = speed, but bad when you are trying to test suspect cables :-) I=E2=80=99ve found references that back in the pre-FreeBSD 10 days there = used to exist a sysctl: net.link.ether.inet.useloopback that could be set to 0 to disable this internal shortcut and force the = packets out onto the cable=E2=80=A6 Any suggestions? :-) - Peter=