Hi Peter
im guessing Loopback cable as in a cross over cable between two
interfaces.. as opposed to a loopback cable plugged into the one interface
(ie tx - rx  wired together)

in principle you want to put the interface you are routing to  into a
different routing domain...

so lets just say you have IP address A on interface A  on the loopback
cable, and IP address B on the interface B on the loopback cable,

put interface B into a different VRF (networking language)  / Routing
domain  Rtable   (openbsd terminology) ...

run the process you want to send packets inside the VRF listening on IP
address B ... and set the default gateway routing out to Interface A ...


but that is the approach I would use. which just uses routing and  the
physical cross over cable  between two interfaces...

and all that can be done without VRF leaking in the firewall support     in
PF

Im not sure how to do that in FreeBSD... but im sure they support the same
functionality ...


Tom Smyth



On Wed, 10 Dec 2025 at 14:25, Peter Eriksson <[email protected]> wrote:

> I’d 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’ve 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…
>
> Any suggestions? :-)
>
> - Peter
>


-- 
Kindest regards,
Tom Smyth.

Reply via email to