Ethernet configuration can be done in a couple of ways: BPF or TAP device.
The BPF device is the original method for ethernet configuration. It still works & is still supported. Support for this method has also been added on the Linux platform through the equivalent Linux Socket Filter (LSF) facility. It allows a direct connection to an adapter, but may not work on all adapters, particularly on Linux hosts. Because of this limitation, support for TAP devices was added.
TAP devices make a tap device, which is basically a pseudo-ethernet adapter that is created on demand. This is as opposed to a real hardware ethernet adapter. It is basically an ethernet adapter that runs in software only in the kernel. See the sample tmesh scripts for examples. It can be configured with an ip address, which basically acts as a gateway to the host machine. The guest machine can be configured with an ip address in the same subnet as the tap device, thus allowing for communication between host & guest. Afterwards, a bridge or a NAT can be set up to the adapter, if communication with the external net is desired.
It is possible to combine BPF and TAP devices to create NAT networks. See the section below on Network Descriptions.