Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Basic question about TUN/TAP/Bridged networking

  1. #1
    Join Date
    Jun 2007
    Beans
    44

    Basic question about TUN/TAP/Bridged networking

    Hello,

    My bridged network is working. I have a vnet0 and br0 interface, and everything seems to be fine. Would there be any point, any particular advantage for me to setup a TUN/TAP interface? Why is it that many guides available online detail using TUN/TAP for enabling bridged networking? In my case, this is in the context of providing networking to VM guests.

  2. #2
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Basic question about TUN/TAP/Bridged networking

    A rose by any ther name is still a rose...

    I think it is just a naming convention. The bridge (br0) is to connect the virtual interface to the real hardware.

    Edit: In doing a bit of reading, it looks like your vnet0 is the equivalent of the tun/tap arrangement.
    Last edited by bab1; August 15th, 2008 at 12:22 AM.
    -BAB1

  3. #3
    Join Date
    Jun 2007
    Beans
    44

    Re: Basic question about TUN/TAP/Bridged networking

    Quote Originally Posted by bab1 View Post
    A rose by any ther name is still a rose...

    I think it is just a naming convention. The bridge (br0) is to connect the virtual interface to the real hardware.

    Edit: In doing a bit of reading, it looks like your vnet0 is the equivalent of the tun/tap arrangement.

    Interesting... I don't know where that came from, but maybe I'm basically already doing TAP using different terminology, like you said?

  4. #4
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Basic question about TUN/TAP/Bridged networking

    Originally KVM used QEMM libs and TUN/TAP to create the virtual NIC. TUN is the IP tunnel and TAP is the Ethernet frame (tap to the NIC). These to virtual entities are then bridged to the physical network. TUN/TAP for the guest and the br0 to the host network.
    -BAB1

  5. #5
    Join Date
    Jun 2007
    Beans
    44

    Re: Basic question about TUN/TAP/Bridged networking

    So how is it that I have networking without an explicit TAP interface on the host machine? If these are for the guest, where exactly are these interfaces maintained?

  6. #6
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Basic question about TUN/TAP/Bridged networking

    TUN/TAP is virtual! It only exists in the software. Another example of a virtual interface is the loopback interface (it's 127.0.0.1).
    -BAB1

  7. #7
    Join Date
    Jun 2007
    Beans
    44

    Re: Basic question about TUN/TAP/Bridged networking

    So why is it that some guides for setting up bridged networking involve setting up this device node, whether others (and the one I used) simply require some ifconfig commands to bring up the br0 interface?

  8. #8
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Basic question about TUN/TAP/Bridged networking

    I'll bet the conf file sets up the device. It's all software. You would have to look at the underlying code to see how it is done. The end result is the same. You must be useing the latest version of KVM.
    -BAB1

  9. #9
    Join Date
    Jun 2007
    Beans
    44

    Re: Basic question about TUN/TAP/Bridged networking

    Yup, although the same technique I used for setting up my networking also works in Xen as well...

    Maybe it's just a matter of the software improving so that bridged networking is less complicated to setup.

  10. #10
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Basic question about TUN/TAP/Bridged networking

    Yep, I'm sure of it. Later versions are usually improvements; but not always.

    How 'bout you mark this solved!
    -BAB1

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •