...
Virtual Machines communicate over one or more simulated wired networks (VMs do not simulate WiFi). In the real world a wired Ethernet nework (whether at work or at home) is created from devices called switches. Ethernet adapters in a PC are connected to a switch by an Ethernet cable, and all devices connected to a normal switch can talk to each other as members of the same “local network”.
Hyper-V chooses to define its virtual networking by configuring named “virtual switches”. Virtual network adapters on the VMs (and optionally in the host Windows system) are configured to “connect” to a named virtual switch to form a virtual local network. Although Hyper-V chooses to call its network configuration a “virtual switch”, this is just a metaphor to describe which virtual adapters on which machines can talk to each other. There is no process simulating the behavior of real physical switches, and you cannot connect or even bridge one virtual switch to another in the same way you would connection a physical switch to another physical switch with a cable.
Each vendor of Ethernet adapters distributes a driver for their device. Microsoft provides drivers for Hyper-V virtual Ethernet adapters on Windows and Linux, and drivers exist for most other operating systems like freeBSD used in OpenSense and pfSense firewall VMsEthernet networks. It is too hard to simulate a WiFi network. Real wired networks are built by connecting an Ethernet cable from the port in a computer to a device called a “switch”. When a switch fills up, you can connect a wire from that switch to a second switch and so on. All the computer ports connected to this set of connected switches forms a network of computers.
Other Virtual Machine systems simply configure network names and connect a VM to the network by name. Hyper-V decided to create a named “virtual switch” for what other systems simply call a “virtual network”. This metaphor may not be helpful because a Hyper-V “virtual switch” does not really behave in exactly the same way that a physical network switch operates. In particular, you cannot connect or bridge one Hyper-V virtual switch to another virtual switch.
The Hyper-V virtual Ethernet adapter in any VM does not simulate any physical adapter you can buy for a real machine. Microsoft provides Windows and Linux drivers for their virtual adapter, and a few other operating systems, particularly freeBSD, have modified the Linux driver so it works in their system.
Standard operating system services convert application data to TCP packets which are then enclosed in IP packets which are then enclosed in Ethernet frames. All that work is the same no matter what Ethernet adapter is being used. The Ethernet frame is then turned over to the hardware vendor driver which sends the frame out through the adapter. The Hyper-V driver sends the frame over the virtual bus that connects the VMs to the Kernel of the host Windows system.
...