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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-09-2011, 03:47 PM
|
#1
|
LQ Newbie
Registered: Jul 2011
Posts: 8
Rep: 
|
How To Configure KVM with a Public IP Address Network that is on a Different subnet
I'm not sure if I am phrasing this question properly but would like to be able to configure my KVM environment (On a Centos 6 Box) to utilize a Public IP address space that's on a different subnet. How would I be able to do that? If someone could help me out it would be greatly appreciated.
|
|
|
09-11-2011, 10:53 AM
|
#2
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
I only use qemu so I can't exactly know for sure.
Almost all VM's support one of 3 ways to connect network.
One is bridged. The VM uses the host nic's addresses. So that may or may not work but remember a host nic could have two or more IP addresses so keep that in mind.
Second is a NAT. Nat is really a part of the vm. It is a virtual hardware router. You VM connects to the virtual router and the virtual router connects to your hosts subnet.
This is where you have to know the answer. If your subnet is on the same physical layer then you can do either of the choices. If it is not on the same layer then you need other things changed.
|
|
|
09-13-2011, 07:53 AM
|
#3
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,311
|
You're going to have to have an external router that can be programmed to have that IP-address, and it will have to use NAT to forward the traffic, through one of the IP-addresses assigned to that physical box, which will then have to forward the traffic to the virtual machine and present it to the VM correctly. It can be a little bit tricky, but conceptually it's actually simple: the traffic has to get through that physical NIC in order to get to any of the virtual machines that are running on it. The VMs themselves don't have to know where they are (and they shouldn't), but this little bit of hanky-waving is a physical requirement of making the illusion work.
Last edited by sundialsvcs; 09-13-2011 at 07:54 AM.
|
|
|
09-13-2011, 08:12 AM
|
#4
|
LQ Newbie
Registered: Jul 2011
Posts: 8
Original Poster
Rep: 
|
This is a dedicated server that I'm renting and the provider, I would assume, has all the routing in place. I was able to configure the additional IP's on the box and I am able to ping them however I am unsure how to configure the VM's to route through the new IP's....
|
|
|
09-13-2011, 02:50 PM
|
#5
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
Explain what you want to do. Do you want the VM's to only talk between each other?
|
|
|
09-13-2011, 02:56 PM
|
#6
|
LQ Newbie
Registered: Jul 2011
Posts: 8
Original Poster
Rep: 
|
I would like the VM's to be able to talk to each other as well as being able to be accessed via a Public IP address.
|
|
|
All times are GMT -5. The time now is 11:56 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|