Review your favorite Linux distribution.
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 01-16-2010, 03:24 AM   #1
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
KVM: How to set up a private network between guests and the host


I'm running KVM on my Ubuntu box, and would like the host and guests to share a private network that is not attached to Internet (i.e. not the default NAT setup that comes out-of-the box with libvirt).

The default NAT'ed setup works, except that it connects the guests to the internet, and I guess I could simply block internet related traffic in the firewall, but I'm sure there are smarter ways of doing this. Anyone got tips on how to accomplish this?

- kenneho
Old 01-17-2010, 11:19 AM   #2
Registered: Oct 2009
Location: Budapest
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 143

Rep: Reputation: 22
It's easy. You need to add a second TAP device to your KVM when starting it up, and the bridge the two new TAP devices together. Done!

(It's about the same as plugging in a network cable between the two computers. It works like a hub. If you want a switch, check out the vde_switch, which has configurable VLAN-s for more sofisticated setups. It's for testing only though, not for a production system.)

Last edited by janoszen; 01-17-2010 at 11:21 AM.


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
kvm: Reset root password on guests kenneho Linux - Virtualization and Cloud 3 12-28-2012 01:43 PM
KVM on ubuntu: not suitable for GUI guests (or lazy sysadmins!)? catkin Linux - Desktop 1 09-11-2009 05:58 PM
LXer: Linux: KVM Adds Support For SMP Guests LXer Syndicated Linux News 0 07-19-2007 01:17 AM
how can a host outside a private network know the actual sender's ip ?? rs_vijay Linux - Networking 2 07-15-2007 08:31 PM
Fully Qualified Host Name on a private network Steerpike Linux - Networking 5 12-14-2004 06:48 AM > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 04:43 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