LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
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.

Notices

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

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


Hi
I have a problem getting OpenVswitch to work with KVM. Here is my setp:
- Host is running RHEL 6.4 (kernel 2.6.32.358.x)
- Two VMs are running CentOS 6.4 (kernel 2.6.32.358.x)
- 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?
thx,
Kishore
 
Old 06-12-2013, 08:47 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,368

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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
Code:
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.
 
  


Reply


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


All times are GMT -5. The time now is 09:08 PM.

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