LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 09-17-2014, 03:18 PM   #1
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Rep: Reputation: 15
Switching to TUN / TAP for KVM / QEMU - need some help


Hi All as the title says I am wanting to try tun / tap for my virtual machines. I have a very static config that I have used for years. Right now my box is up to date and bridged networking is getting to be a pain as far as performance.

What I have right now is the host machine that is also a firewall / router. I have about 20 devices connected and a few virtual machines, I have one subnet for everything. Two dd-wrt routers and a dual nic are working for me as far as that goes.

Lets assume I have all the kernel & utilities installed. A static IP for my LAN of 192.168.0.1 - "eth0" and a DHCP address for my internet on "eth1".

Other than the firewall script, here is what I have right now for my net config:

Code:
config_enp4s0="null"
bridge_brkvm="enp4s0"
config_brkvm="192.168.0.1/24"
brctl_brkvm="setfd 0 sethello 30 stp off"
I like to use static for always on devices, and wifi / on demand stuff is handled by one of three DHCP servers - yes three, and one subnet, something broke a while back and this was my fix.

Now I need everything to be able to talk to each other, and I am open to using another subnet given the above, if that makes things easier.

Unfortunately all I am finding are conflicting docs and stuff from like 2004, or recent stuff that doesn't cover my situation. I need to be able to reach any device from any device and all traffic needs to eventually use 192.168.0.1 as the gateway. All help / suggestions are welcome.

Thanks
 
Old 09-19-2014, 11:49 PM   #2
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Original Poster
Rep: Reputation: 15
Anyway.. This was solved.. please reply if you were curious - If not I will update this in a few days with my solution.
 
Old 09-21-2014, 08:16 PM   #3
fruitwerks
Member
 
Registered: Apr 2009
Posts: 80

Original Poster
Rep: Reputation: 15
Since this post I have moved the firewall role off of this machine. Although before I did that I changed to tun tap. Ping times lowered, but overall performance (network) did not improve.

End Result:
Code:
config_enp4s0="null"
config_tap0="null"
modules_tap0="!dhclient !dhcpcd !ifconfig iproute2 !pump !udhcpc !wireless"
tuntap_tap0="tap"

bridge_br0="enp4s0 tap0"
modules_br0="!dhclient !dhcpcd !ifconfig iproute2 !pump !udhcpc !wireless"
rc_net_br0_need="net.tap0 net.enp4s0"
config_br0="192.168.0.2/24"
routes_br0="default via 192.168.0.1"
I now get transfers of ~100mb read / write - and the disk can do much more than that so more testing is required, as this is literally a 100x improvement I am happy for now.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] KVM Qemu instance bridged tap interface disconnects, cutting me off from the guest rylan76 Linux - Virtualization and Cloud 1 11-07-2012 06:35 AM
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
Virtual Interfaces, Bridging, TUN, TAP question for KVM setup (ubuntu server 9.04) mogga Linux - Networking 0 06-22-2009 01:35 AM
bridging, tun/tap, qemu issues kc8tbe Linux - Networking 10 03-19-2007 01:47 PM
qemu tun/tap sudo problem andbn Linux - Networking 2 10-20-2006 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 07:37 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration