Tunnel or Tap

Pardon my ignorance but I am trying to figure out the difference between these two network interfaces in layman terms.
The manual pages for tap(4) seems very similar to tun(4).
What are the main differences?
I noticed net/mpd5 uses tun and bhyve uses tap.

http://ad001.de/freebsd-tuntap-devices-example.html
This site has something I see nowhere else. In parentheses they have tap(datalink layer) and tun(network layer). Is this an accurate description?
Please elaborate or link to good reading.
 
The tap(4) adapter emulates ethernet hardware and has broadcast semantics so you can for example use the tap adapter with your VPN (such as OpenVPN) and you'll be able to use services over the VPN that depend on broadcasts or multicasts. The tun(4) adapter is point-to-point and requires two IP addresses (the other end requires the same two addresses but in reverse order) on it for operation when the tap adapter requires just a single IP address as you would expect on a standard ethernet NIC.
 
Back
Top