LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-01-2013, 07:25 PM   #1
matthekc83
LQ Newbie
 
Registered: Jun 2013
Posts: 3

Rep: Reputation: Disabled
Bridging works now attempting to set a static IP


I am using KVM to set up some test boxes. The host is Debian 7 and the client is Centos 6.4 and I have some questions about the best way to setup the virtual network. If it's easier I have no objection to making my host Centos...

I have bridging working and now would like to have a small simulated network. The end goal is to have some Virtual servers with static IP addresses to play with and set up a test/learning environment.
Right now when I set the client to static it can no longer communicate past the gateway, I can ping everything inside but nothing outside...
I have seen some guides and read some various suggestions but I am a little confused. Can I do this with Bridging alone? Should I set up a simulated router? Do I need to setup Virtio?
Which setup is closest what would be used on a production KVM box? Since the end goal is to learn, I don't need the whole answer just a nudge in the right direction. Although if I get stuck a guide might be nice

Thanks

Last edited by matthekc83; 06-01-2013 at 07:33 PM.
 
Old 06-04-2013, 08:30 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by matthekc83 View Post
Since the end goal is to learn, I don't need the whole answer just a nudge in the right direction.
This is the most refreshing attitude I have seen around here in awhile.

This may help guide you on your quest:
How to set a static IP in Ubuntu VMs from the shell

subscribed with interest...
 
Old 06-04-2013, 10:48 PM   #3
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
Since you don't bring any of what you have actually done so far to the table, just some vague descriptions, I think it would be best to start with some basics.

First of all, how typical, bridged KVM VM networking works:
your VM is on all accounts a computer in it's own rights, no magic there, just emulation of every device you would have in a normal PC, including a network card.
This virtual network card is visible as a network card to the VM, and as a tap device (basically just a basic means of pushing data to other devices) on the host. So whenever the VM tries to use it's network card, the data is in fact in the tap device on the host.

On the host, this tap is plugged into a bridge, which in turn is plugged into a physical device, so here, the bridge acts as a virtual switch, into which real and virtual network cards get connected. Communication from the physical host to the network goes through a physical NIC, which is plugged into a real switch and onwards.

[VM]
virtual NIC -> [tap] -> [bridge (virtual switch)] <- [host ethX] -> [rest of the network]

Once you understand how this works, and read up on bridges in general, you'll see that it's all very simple.

To get such a setup to work, all you need is an IP on the bridge (not the physical NIC it is plugged into, but the bridge itself) - which will be the IP the host uses, and an IP in the same network in the VM, with the same subnet and gateways and routes.
 
Old 06-05-2013, 11:50 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
CentOS by default uses NetworkManager to set up ports. If you have a GUI that's the easiest way. If you want to edit the ifcfg-ethX scripts yourself, be sure to include NM_CONTROLLED="no" to prevent NM from having its way with them.
 
Old 06-05-2013, 11:54 PM   #5
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
NM doesn't do bridges
 
Old 06-11-2013, 07:50 PM   #6
matthekc83
LQ Newbie
 
Registered: Jun 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
VDE

I want to try this out when I have some time, but I have been busy with work and other stuff. I am curious if anyone uses this in their production environment?

http://wiki.virtualsquare.org/wiki/i...sic_Networking
 
Old 06-11-2013, 08:00 PM   #7
matthekc83
LQ Newbie
 
Registered: Jun 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
The purpose, usage, and setup on VDE seems to be sparsely documented vs the bridge setup.

Last edited by matthekc83; 06-11-2013 at 08:16 PM.
 
  


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
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
How do I give my computer a static IP address when bridging? Mysticle31 Linux - Networking 0 12-20-2007 01:37 AM
ipw2200 cant get ip of dhcp, only works when static one set jamesjoy Linux - Wireless Networking 3 02-26-2006 04:04 AM
bridging->remote PC set ip to ?? joirnange Linux - Networking 3 01-03-2005 01:56 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM

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

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