TUN与TAP


Google 

TUN与TAP (正體)

计算机网络中, TUNTAP是操作系统内核中的虚拟网络设备。不同于普通靠硬件网路板卡实现的设备,这些虚拟的网络设备全部用软件实现,并向运行与操作系统上的软件提供与硬件的网络设备完全相同的功能。

TAP 等同于一个以太网设配,它操作第二层数据包如以太网数据帧。TUN模拟了网络层设备,操作第三层数据包比如IP数据封包。

操作系统通过TUN/TAP设备向绑定该设备的用户空间的程序发送数据,反之,用户空间的程序也可以像操作硬件网络设备那样,通过TNU/TAP设备发送数据。在后种情况下,TUN/TAP设备向操作系统的网络栈投递(或“注入”)数据包,从而模拟从外部接受数据的过程。

TUN/TAP被用于:

  • 虚拟私有网络
    • OpenVPN, Ethernet/IP over TCP/UDP; encrypted, compressed
    • tinc (protocol) [1], Ethernet/IPv4/IPv6 over TCP/UDP; encrypted, compressed
    • VTun [2], Ethernet/IP/serial/Unix pipe over TCP; encrypted, compressed, traffic shaping
    • OpenSSH
    • ICMPTX [3], IP over ICMP (ping)
    • NSTX [4], IP over DNS
    • HTun [5], IP over HTTP
    • coLinux, Ethernet/IP over TCP/UDP
    • Hamachi
  • virtual machine networking
    • Bochs
    • coLinux
    • QEMU
    • Hercules (S/390 emulator)

TUN/TAP设备驱动程序能支持如下平台:

外部连接

Google 

! __







Why are we here?
All text is available under the terms of the GNU Free Documentation License
This page is cache of Wikipedia. History