# TUN/TAP interface advantage

**URL:** <https://www.ruby-forum.com/t/tun-tap-interface-advantage/222945>\
**Category:** GNU Radio\
**Created:** [September 16, 2012, 5:46am UTC](https://www.ruby-forum.com/t/tun-tap-interface-advantage/222945 "2012-09-16T05:46:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [September 16, 2012, 5:46am UTC](https://www.ruby-forum.com/t/tun-tap-interface-advantage/222945/1 "2012-09-16T05:46:10Z")

</div>

Is there any advantage to use TUN/TAP interface ?  
As 802.11bbn also uses TUN/TAP interface.  
But I think in the tun/tap performance degrades as we send the packet  
back  
to user process?  
Therefore I compare results with benchmark\_xx.py in /ofdm with  
tunnel.py  
in /ofdm.  
In results benchmark\_xx.py do not give consistent throughput (i.e. it  
varies on channel) but tunnel.py gives 100% throughput irrespective of  
channel  
Will there be any valid reason for this ?  
If I want to implement 2-way communication in USRP should I use TUN/TAP  
interface?

---

<div class="post-metadata">

**Author:** ![usrp\_n210](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2bfe46/32.png) [@usrp\_n210](https://www.ruby-forum.com/u/usrp_n210)\
**Post date:** [September 16, 2012, 6:22am UTC](https://www.ruby-forum.com/t/tun-tap-interface-advantage/222945/2 "2012-09-16T06:22:58Z")

</div>

On 09/15/2012 11:45 PM, usrp n210 wrote:

> Is there any advantage to use TUN/TAP interface ?

Tun/tap is a convenient way to get access to the network stack from  
userspace. Unfortunately the benchmark\* apps abuse tun/tap as a mac  
layer, which is precisely the wrong thing to do.

For example:

> **[Transmission Control Protocol](https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_over_wireless_networks)**
>
> The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite, providing reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as TCP/IP. Major internet applications such as the World Wide Web, email, remote admi...

(if you wait a few days, there will be some sweet work released with MAC  
layer + message passing in GRC. Stay tuned…)

-josh

---

<div class="post-metadata">

**Author:** ![usrp\_n210](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2bfe46/32.png) [@usrp\_n210](https://www.ruby-forum.com/u/usrp_n210)\
**Post date:** [September 16, 2012, 6:38am UTC](https://www.ruby-forum.com/t/tun-tap-interface-advantage/222945/3 "2012-09-16T06:38:10Z")

</div>

Cool.  
How can I get this information at that time?

On Sat, Sep 15, 2012 at 11:21 PM, Josh B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > to user process?
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–

Alex,  
_Dreams can come true just believe._
