About this question
I would like to know the practical difference between TAP and TUN mode when used with OpenVPN. When to use TAP and When to use TUN ? What types of traffic will pass with both modes ?
I would like to know the practical difference between TAP and TUN mode when used with OpenVPN. When to use TAP and When to use TUN ? What types of traffic will pass with both modes ?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask Cyber Security Expert
Answered on Feb 28, 2022
Tap vs Tun TAP is basically at Ethernet level (layer 2) and acts like a switch whereas TUN works at network level (layer 3) and routes packets on the VPN. TAP is bridging whereas TUN is routing. From the OpenVPN Wiki: TAP benefits: behaves like a real network adapter (except it is a virtual network adapter) can transport any network protocols (IPv4, IPv6, Nettalk, IPX, etc, etc) Works in layer 2, meaning Ethernet frames are passed over the VPN tunnel Can be used in bridges
TAP drawbacks: causes much more broadcast overhead on the VPN tunnel adds the overhead of Ethernet headers on all packets transported over the VPN tunnel scales poorly TUN benefits: A lower traffic overhead, transports only traffic which is destined for the VPN client Transports only layer 3 IP packets TUN drawbacks: Broadcast traffic is not normally transported Can only transport IPv4 (OpenVPN 2.3 adds IPv6) Cannot be used in bridges
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step Cyber Security guides from industry experts
Common Cyber Security interview questions, answered
Guides, tips and career advice on Cyber Security from JanBask experts.
Cyber Security Ethical Hacker Roles and Responsibilities: What Do Ethical Hackers Actually Do?
What does an ethical hacker actually do? See the five-phase process, daily tasks, required skills, and where ethical hackers work.
Cyber Security Penetration Tester Roles and Responsibilities: What Does a Pen Tester Do?
Learn what a penetration tester does, including key roles, responsibilities, daily tasks, tools, skills, reporting, and…
Cyber Security GRC Analyst Roles and Responsibilities: What Does a GRC Analyst Do?
What does a GRC analyst actually do? See the core responsibilities, how they grow by experience level, a daily routine, tools,…
Cyber Security SOC Analyst Roles and Responsibilities: What Does a SOC Analyst Do?
What does a SOC analyst actually do? Explore core responsibilities, the Tier 1–3 structure, daily tasks, tools, and skills in…