This guide will show you how to create a virtual L2 link between 2 Wireguard (or some other L3 tunneling protocol) peers on a network. I will only cover client-to-client connection. I will not cover creating L2 link for site-to-site or client-to-site applications, this is out of scope (but may something I will write about later). This will also only cover creating such tunnel between two Linux hosts. Windows users might have to look into Hyper‑V/SDN VXLAN setup but you're on your own. And as for MacOS users... lol. Seriously though, while you may not have official VXLAN support, you do have alternatives. Look into GRETAP over Wireguard or something like this.
First: why do this client-to-client? Well, you might want to use a specific L2 feature (mDNS / SSDP / DHCP or something else) and relay it between clients. Lots of L3 tunneling protocols (such as Wireguard in my example) cannot relay those. It's especially useful for services and games that use LAN discovery an