virtual network interfaces

TAP and TUN are virtual network interfaces used by a VPN client. These network devices are supported entirely in software, unlike regular network devices that are usually backed up by hardware network adapters.

TAP simulates a link layer device and it operates with layer 2 packets such as Ethernet frames.

When it comes to TUN, it simulates a network layer device and it operates with layer 3 packets such as IP packets.

One case or another, packets sent by an operating system via a TUN/TAP device are delivered to a user-space program that attaches itself to the device.

However, TAP is used to create a network bridge, while TUN is commonly used with routing.

Quick fixes to frequent TAP/TUN issues