LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,170
Blog Entries: 4

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
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: 834

Rep: Reputation: 91
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: 1,479

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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: 834

Rep: Reputation: 91
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


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


All times are GMT -5. The time now is 12:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration