I’ve been working on a cross-platform VMM library. Part of that involves a userspace NAT implementation that lets guest VMs access the network without requiring root privileges or TUN/TAP devices. Running the network stack in userspace also lets us enforce network policies on the guest, restricting which hosts and ports it can access.
We have integration tests that boot minimal Linux VMs and run commands via the console. One of those tests pings the gateway to verify networking works. It was using ping -c 1 with a FIXME: “Using -c 1 because -c 3 or higher causes the test to hang.” I decided to figure out why.