LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 10-03-2012, 04:12 AM   #1
cultavix
Member
 
Registered: Feb 2004
Location: England
Distribution: RedHat
Posts: 39

Rep: Reputation: 15
Centos 6.3 - KVM - Bridge/Networking problem


Hello

I've got a small problem with networking between a KVM guest and the network attached to the host, and the host itself.

Basically, I've created a bridge, called "vnet0" which I have added the hosts's em2 adapter to, and I've added this vnet0 bridge to the KVM guest.

Here are the networking details:

HOST:
IP: 192.168.104.1
Subnet: 255.255.255.0
Gateway: 192.168.104.1


KVM GUEST:
IP: 192.168.104.2
NETMASK: 255.255.255.0
GW: 192.168.104.1

Bridge: command "brctl show"
bridge name bridge id STP enabled interfaces
virbr0 8000.525400d2497d yes virbr0-nic
vnet1
vnet0 8000.90b11c051c4d yes em2
vnet2


Config files:
ifcfg-em2-
HWADDR=90:B1:1C:05:1C:4D
BRIDGE=vnet0
DEVICE="em2"
NM_CONTROLLED="no"
ONBOOT=yes

vnet0-
DEVICE=vnet0
TYPE=Bridge
BOOTPROTO=static
IPADDR=192.168.104.1
GATEWAY=192.168.104.1
NETMASK=255.255.255.0
ONBOOT=yes


IPTABLES are setup correctly, doesn't work with the firewall on or off.

NOTE: You can ping FROM the guest to anywhere on the network, but you can't ping TO the guest from ANYWHERE.


Can anyone give me a hint as to why this doesnt work? OR alternative, tell me another way of doing what I am trying to do?

Please help!

Thank you so much!
 
Old 10-04-2012, 05:19 AM   #2
cultavix
Member
 
Registered: Feb 2004
Location: England
Distribution: RedHat
Posts: 39

Original Poster
Rep: Reputation: 15
Hi guys, thanks for taking the time to read it. After playing around with it for the past day or so, pretty much non-stop, I have figured out that there is a problem with KVM and the "macvtap" adapter in which the host/guest cannot communicate because the adapters are on different layers. There is a solution however which you can read about here:

http://www.lostgeeks.org/npen/2011/1...o-communicate/

What I have ended up doing was to use the KVM GUI to create a new bridge adapater, then set a different IP to the host/guest and then add that adapter to the guest. It now works.

I've got a small issue around routing now, but nothing that cannot be fixed with a simple command.

route add default gw 172.16.28.250

For some reason, when you restart the networking service, it will only set one default gateway, but my environment requires 2 gateways.

Thanks again
 
  


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
LXer: How To Install KVM And libvirt On CentOS 6.2 With Bridged Networking LXer Syndicated Linux News 0 03-02-2012 02:20 PM
Nested KVM networking problem priyankgupta1984 Linux - Networking 2 11-14-2011 05:27 AM
Problem with configuring Xen Bridge Networking l2g Linux - Networking 4 04-30-2010 05:04 AM
KVM on Centos 5.4 - bridge issue on virtual interfaces asmar Linux - Networking 1 03-01-2010 11:11 PM


All times are GMT -5. The time now is 07:59 AM.

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