TUN/TAP

From Wikipedia, the free encyclopedia

In computer networking, TUN and TAP are virtual-network kernel devices. Being network devices supported entirely in software, they differ from ordinary network devices which are backed up by hardware network adapters.

TUN (namely network TUNnel) simulates a network layer device and it operates with layer 3 packets like IP packets. TAP (namely network tap) simulates a link layer device and it operates with layer 2 packets like Ethernet frames. TUN is used with routing, while TAP is used for creating a network bridge.

Packets sent by an operating system via a TUN/TAP device are delivered to a user-space program which attaches itself to the device. A user-space program may also pass packets into a TUN/TAP device. In this case TUN/TAP device delivers (or "injects") these packets to the operating-system network stack thus emulating their reception from an external source.

Application

Systems and programmers use TUN/TAP for:

  • virtual private networks
    • OpenVPN, Ethernet/IP over TCP/UDP; encrypted, compressed
    • FreeLAN, open-source, free, multi-platform IPv4, IPv6 and peer-to-peer VPN software over UDP/IP.
    • n2n, an open source Layer 2 over Layer 3 VPN application which utilises a peer-to-peer architecture for network membership and routing
    • tinc (protocol) , Ethernet/IPv4/IPv6 over TCP/UDP; encrypted, compressed
    • VTun , Ethernet/IP/serial/Unix pipe over TCP; encrypted, compressed, traffic-shaping
    • OpenSSH
    • CJDNS
    • ICMPTX , IP over ICMP (ping)
    • NSTX,[1] iodine , IP over DNS
    • HTun , IP over HTTP
    • coLinux, Ethernet/IP over TCP/UDP
    • Hamachi
    • NeoRouter
    • VPN-X Java TAP Wrapper, VPN-X can be a P2P VPN, can be a SSL VPN
  • virtual-machine networking:
    • Bochs
    • coLinux
    • Hercules (S/390 emulator)
    • QEMU/Kvm
    • User-mode Linux
    • VirtualBox
  • connecting real machines with network simulation:

Platforms

Platforms with TUN/TAP drivers include:

  • FreeBSD
  • Linux, starting around version 2.1.60
  • iOS (tun driver only)
  • Mac OS X
  • NetBSD
  • OpenBSD
  • Android Operating System (tun driver only)
  • Solaris Operating System
  • Microsoft Windows 2000/XP/Vista/7/8
  • QNX (tap driver only)

References

  1. "Nstx (Ip-Over-Dns) Howto". Thomer.com. 2000-01-08. Retrieved 2012-07-24. 
  2. "ns-3: ns3::TapBridge Class Reference". Nsnam.org. Retrieved 2012-07-24. 



This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.