OpenVPN Network Topologies: Routed vs Bridged
You'll learn: How to choose between OpenVPN's routed (TUN) and bridged (TAP) modes and understand their performance and routing implications.
The Core Choice
When deploying OpenVPN, you must choose between two fundamentally different network topologies: routed mode using TUN interfaces and bridged mode using TAP interfaces. This decision affects how traffic flows, what protocols work, and how your VPN performs.
Routed Mode (TUN)
TUN creates a Layer 3 (IP) tunnel. Think of it like a highway that only carries cars (IP packets)—fast and efficient, but limited to one type of traffic.
- How it works: Routes IP packets between networks; VPN clients get their own subnet
- Routing implications: Requires routing tables on both sides; clients cannot directly access Layer 2 services like file sharing via NetBIOS broadcast
- Performance: Lower overhead, faster throughput—only IP headers are processed
- Best for: Most modern VPNs, especially remote access scenarios
Bridged Mode (TAP)
TAP creates a Layer 2 (Ethernet) tunnel. This is like a tunnel that carries entire vehicles with all their cargo—more flexible but heavier.
- How it works: Bridges the remote client into your local network at the Ethernet level; clients appear as if physically connected
- Routing implications: No special routing needed; clients get IPs via DHCP from your LAN
- Performance: Higher overhead—entire Ethernet frames are encapsulated, including broadcasts
- Best for: Legacy applications requiring broadcast/multicast, Windows file sharing, or when you need clients to appear on the same subnet
Trade-Offs Summary
Routed mode is cleaner, faster, and scales better. Bridged mode offers compatibility with non-IP protocols but sacrifices performance and generates more network chatter (broadcasts traverse the tunnel).
Key Takeaway: Choose TUN (routed) for modern IP-based VPNs with better performance; use TAP (bridged) only when Layer 2 connectivity or broadcast protocols are required, accepting the performance cost.