[libvirt] routed networking

Daniel P. Berrange berrange at redhat.com
Tue Jul 8 15:36:22 UTC 2008


On Tue, Jul 08, 2008 at 11:08:09AM -0400, Ben Guthro wrote:
> Hello
> 
> Perhaps this is my limited understanding of bridging, and I would 
> appreciate someone to educate me in the way this is supposed to work, 
> and/or point me to the documentation on where this is covered.
> 
> If I create a routed network using the following xml:
> <network>
>        <name>mybr0</name>
>        <bridge name="mybr0" />
>        <ip address="10.1.220.1" netmask="255.255.255.0" />
>        <forward type="route" dev="eth1"/>
> </network>
> 
> I would expect to see the eth1 interface enslaved to this bridge.
> However, "brctl show" does not show any devices enslaved.

No, a routed network config does not enslave any physical interfaces
because that would be layer-2 bridging. This is layer-3 forwarding /
routing, controlled/constrained via iptables FORWARD rules.

> My goal is to have the guest get its IP address from a DHCP server not 
> on dom0, but out on the network attached to by eth1, but as my guest 
> comes up, I see its virtual NIC added to the bridge, but without the 
> connection to eth1, it never has the proper connectivity.

You want to have the 'Bridged networking (aka "shared physical device")'
config from the follow docs:

  http://wiki.libvirt.org/page/Networking

The config you showed above is really a variant on the other setup 
labelled 'NAT forwarding (aka "virtual networks")', but without the
NAT mangling in the POST_ROUTING chain.

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list