Feb 03 2010

Openvpn中tun和tap的区别

Category: 技术ssmax @ 22:25:03

tun devices encapsulate IPv4 or IPv6 (OSI Layer 3) while tap devices encapsulate Ethernet 802.3 (OSI Layer 2).

今天搞了一个下午,把几个地区的网络用openvpn连起来了,如果用tun的话,就是模拟了一个p2p的环境,虽然能够连接到同网段别的ip,但是无法广播,这样就无法实现到某些网段的跳转网关了。

后来才看到有tap方式,以前一直没留意这个有什么用,查了手册才发现这个是模拟一个局域网的环境,非常赞,广播有了,怎么指定网关都可以了,哈哈。

ps:今天终于买到火车票。。。真难买啊。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.