Daniel P. Berrange wrote:
On Tue, Feb 03, 2009 at 03:58:38PM +0800, Zhengang Li wrote:
> Hi All,
>
> The documentation on the libvirt website explains the way to define a
> bridge to LAN network interfaces with a 'bridge' type. E.g.:
> <interface type='bridge'>
> <source bridge='br0'/>
> <mac address='52:54:00:00:00:11'/>
> </interface>
>
> I'm working in a limited environment. Only 'network' type interfaces can
> be defined for a guest. Is it possible to define a bridge-to-lan
> interfaces with a 'network' type? The question actually goes to: How to
> write a network definition xml for libvirt to use as bridge to LAN type
> NIC in guest?
You are mixing up terminology here. The 'network' type explicitly provides
a connection where the guest only has NAT access to the LAN, while the
'bridge' type connects the guest directly to the LAN. It makes no sense to
ask for 'network' to provide a direct LAN connection, since you'd just
use 'bridge' for that.
If you want to bridge to the LAN, you need to make sure your real eth0
device is part of a bridge. We have instructions on this setup for
various distros on this page:
http://wiki.libvirt.org/page/Networking
Under the 'shared physical device' heading
Daniel
Sorry to bring up an old thread... with the "shared physical device",
you lose the pooling capabilities that you have with the virtual network
APIs. It would be nice to represent a bridge similar to how the virtual
network pools are represented...
I thought that was the purpose of this project:
https://fedoraproject.org/wiki/Features/Shared_Network_Interface
On list discussion:
http://www.redhat.com/archives/libvir-list/2009-January/msg00350.html
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com