LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-09-2011, 03:47 PM   #1
moe007
LQ Newbie
 
Registered: Jul 2011
Posts: 8

Rep: Reputation: Disabled
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.
 
Old 09-11-2011, 10:53 AM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
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.
 
Old 09-13-2011, 07:53 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
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.
 
Old 09-13-2011, 08:12 AM   #4
moe007
LQ Newbie
 
Registered: Jul 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
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....
 
Old 09-13-2011, 02:50 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
Explain what you want to do. Do you want the VM's to only talk between each other?
 
Old 09-13-2011, 02:56 PM   #6
moe007
LQ Newbie
 
Registered: Jul 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
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.
 
  


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
[SOLVED] Using KVM public bridge manually sfxpt Linux - Virtualization and Cloud 21 08-18-2010 09:31 AM
Can't Ping Linux KVM from Other Machines on Host Subnet newmanium2001 Linux - Networking 5 05-19-2009 08:01 AM
network Address subnet mask kapilbajpai88 Linux - Newbie 4 04-28-2009 04:27 PM
Possible? 1 public subnet/1 private; 1 host: traffic out the way it came in? JMCraig Linux - Networking 8 10-17-2005 08:12 PM
how do i configure my network card's so it dosen't say no ip address yet on SuSe 9.1? krt47 Linux - Networking 7 07-31-2004 07:24 PM

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

All times are GMT -5. The time now is 03:41 AM.

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