[libvirt-users] Network/bridge questions

Alex mysqlstudent at gmail.com
Sat Feb 5 06:06:23 UTC 2011


Hi,

I have an fc14 install and would like to install a few kvm guests but
am having difficulty with the networking. On the host I have disabled
NetworkManager and configured a bridge which has eth0, the only
physical interface on the server.

I have a dhcp server on the local lan, and if I add a mac address
entry to my dhcpd.conf, the guest will find an IP from there. I think
somehow the guest interface is not properly being routed through the
virtual gateway created by libvirtd, and is instead just routed
through br0 directly on the host. What am I missing?

Here is some relevant output from some of the things I know:

# # brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.485b3961b55c       no              eth0
                                                        vnet0
virbr0          8000.000000000000       yes

I don't understand what purpose the vnet0 has, or even how it got
there in the first place. Is it necessary, or did I do something wrong
here?

# virsh net-list --all
Name                 State      Autostart
-----------------------------------------
default              active     yes

>From the guest xml file in /etc/libvirt/qemu/

    <interface type='bridge'>
      <mac address='52:54:00:a8:c5:9d'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
    </interface>

I've also flushed the firewall rules, so I'm sure the dhcp request
isn't being blocked. I've also tried changing the br0 above to virbr0,
with no change.

This is from "net-edit default" in virsh:

<network>
  <name>default</name>
  <uuid>3d1f153f-fc0f-4de5-98c8-7f99f96f34d6</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>

Sure would appreciate any ideas you may have.

Thanks,
Alex




More information about the libvirt-users mailing list