Changes between Version 12 and Version 13 of BridgingAndRouting
- Timestamp:
- 11/30/12 10:44:18 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BridgingAndRouting
v12 v13 11 11 = Bridging vs. routing = 12 12 13 Bridging looks easier at first glance, but it brings a completely different can of worms. First of all, there are no shortcuts in making networking easier except learning how to do it properly. Basically you want TAP devicesif:13 This discussion needs to start with TAP vs TUN devices. You want TAP if: 14 14 15 15 * You want to transport non-IP based traffic, or IPv6 traffic on OpenVPN 2.2 or older releases 16 16 * You want to bridge 17 17 18 You want bridgingif:18 And you want to bridge if: 19 19 20 20 * You want your LAN and VPN clients to be in the same broadcast domain … … 22 22 * You have Windows server(s) you want to access and require network neighbourhood discovery to work via VPN '''and''' WINS is not an option to implement. If you have WINS, you don't want bridging. Really. 23 23 24 It might be a few more reasons, but these are the most typical ones. And as you see, TAP is a requirement for bridging. Now lets see benefits and drawbacks of TAP vs TUN. 24 It might be a few more reasons, but these are the most typical ones. And as you see, TAP is a requirement for bridging. TUN devices cannot be used for bridges and non-IP traffic. 25 26 Bridging looks easier at first glance, but it brings a completely different can of worms. Make no mistake: '''There are no shortcuts in making networking easier''' - except if learning how to do it properly. 27 28 Now lets see benefits and drawbacks of TAP vs TUN. 25 29 26 30 TAP benefits: 27 31 28 * behaves like a real network card32 * behaves like a real network adapter (except it is a virtual network adapter) 29 33 * can transport any network protocols (IPv4, IPv6, Netalk, IPX, etc, etc) 34 * Works in layer 2, meaning Ethernet frames are passed over the VPN tunnel 30 35 * ''Can'' be used in bridges 31 36 … … 38 43 TUN benefits: 39 44 * A lower traffic overhead, transports only traffic which is destined for the VPN client 45 * Transports only layer 3 IP packets 40 46 41 47 TUN drawbacks: 42 48 43 49 * Broadcast traffic is not normally transported 44 * Can only support IPv4 (OpenVPN 2.3 will addIPv6)50 * Can only transport IPv4 (OpenVPN 2.3 adds IPv6) 45 51 * '''Cannot''' be used in bridges 46 52 47 In both setups, basic network knowledge is a must. You need to be able to understand basic routing and firewalling, no matter which one use setup. And both TUN and TAP do traditional network routing. But using bridges, you also need to know how bridges work and how this changes firewalling in addition.53 Please understand that in both setups, '''basic networking knowledge is a must'''. You do need to understand basic network ''routing'' and ''firewalling'', no matter if use use routing, bridging, TUN or TAP. Both TUN and TAP devices supports traditional network routing, so you are not required to use bridging with TAP. But using bridges, you need in addition to know how bridges work and how this changes your firewalling. To say it simple: Bridging will complicate your setup further. Of course, there are scenarios where bridging really is the right solution. But in most cases you will most likely solve your VPN setup with basic routing. 48 54 49 55 For more information about TCP/IP networking, the [http://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf TCP/IP Tutorial and Technical Overview] (IBM Red Book) is recommended reading, especially chapter 3.1.