Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.


  Search this Thread
Old 06-11-2013, 05:45 PM   #1
LQ Newbie
Registered: May 2013
Posts: 4

Rep: Reputation: Disabled
How to use tun/tap instead of macvtap

I have a problem getting OpenVswitch to work with KVM. Here is my setp:
- Host is running RHEL 6.4 (kernel
- Two VMs are running CentOS 6.4 (kernel
- Installed OpenVswitch v 1.10
- I have created a OVS bridge using ovs-brctl and assigned a physical port to it. I am trying to "add hardware" to the VMs and it shows the bridges interfaces as 'Host Device p4p2: macvtap'. I can add this NIC, assign an IP address and get connectivity.

But, it is not going through the OVS and from posting a question on the Openvswitch forum it appears that macvtap interface is not recommended. They suggested using tun/tap, but it looks like KVM always creates macvtap (either for ovs-brctl or just a standard linux bridge 'brctl').

How do I create a tun/tap interface to the VMs with my setup so that I can have packets go through the OVS?
Old 06-12-2013, 08:47 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,810

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
kvm does not create macvtap interfaces for you. At some point something you did created one. A macvtap acts like a separate interface with its own MAC address added to another physical port. To not use it you need to know what created it in the first place. One way would be
ip link add link p4p2 name macvtap0 type macvtap
and to remove it you would use the corresponding ip link del. To create a tap interface use tunctl.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenVpn TUN/TAP unminser Linux - Server 11 05-29-2011 03:00 AM
tun/tap error Revender Linux - Newbie 1 03-07-2011 08:36 PM
Need help on TUN/TAP vinodl Linux - Networking 1 06-22-2009 11:18 AM
Tun/Tap issue minasafwat Linux - Kernel 0 11-14-2006 01:11 AM
Tun/Tap getting started? blavo Linux - Newbie 0 02-14-2006 10:29 AM > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration