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 How to Prepare for SOC Analyst Certification: A Practical Study Guide
Learn how to prepare for SOC analyst certification with a practical study plan. Compare CySA+, SC-200 and BTL1, build hands-on…
Cyber Security How to Prepare for Penetration Testing Certification: A Practical Study Guide
Learn how to prepare for penetration testing certification: compare PenTest+, OSCP, eJPT and CEH, build a study plan, and…
Cyber Security Is Penetration Testing a Good Career in 2026? Pay, Demand, Pros & Cons
Is pen testing a good career? See honest data on demand, pay, entry barriers, AI’s impact, and whether penetration testing is…
Cyber Security Penetration Tester vs Ethical Hacker: What’s the Difference?
Are ethical hacking and penetration testing the same? See how the roles, skills, certifications, and pay differ, and which path…