LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-16-2010, 03:24 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

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


Hi.


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
janoszen
Member
 
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.
 
  


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 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

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