[Libvir] Virtual networking (not the rathole thread :-)

Mark McLoughlin markmc at redhat.com
Thu Jan 25 15:52:03 UTC 2007


On Wed, 2007-01-17 at 18:38 +0000, Mark McLoughlin wrote:
> On Tue, 2007-01-16 at 22:28 +0000, Daniel P. Berrange wrote:
> > On Mon, Jan 15, 2007 at 08:06:18PM +0000, Mark McLoughlin wrote:

> > > Virtual Networks will be implemented in libvirt. First, there will be an
> > > XML description of Virtual Networks e.g.:
> > > 
> > >   <network id="0">
> > >     <name>Foo</name>
> > >     <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
> > >     <listen address="172.31.0.5" port="1234" />
> > >     <connections>
> > >       <connection address="172.31.0.6" port="4321" />
> > >     </conections>
> > >     <dhcp enabled="true">
> > >       <ip address="10.0.0.1" 
> > >           netmask="255.255.255.0" 
> > >           start="10.0.0.128"
> > >           end="10.0.0.254" />
> > >     </dhcp>
> > >     <forwarding enabled="true">
> > >       <incoming default="deny">
> > >         <allow port="123" domain="foobar" destport="321" />
> > >       </incoming>
> > >       <outgoing default="allow">
> > >         <deny port="25" />
> > >       </outgoing>
> > >     </forwarding>
> > >   <network>
> > 
> > Got to also think how we connect guest domains to the virtual network.
> 
> 	Right, further on in the mail I said:
> 
>       * Where is the connection between domains and networks in either
>         the API or the XML format? How is a domain associated with a
>         network? You put a bridge name in the <network> definition
>         and use that in the domains <interface> definition? Or you put
>         the network name in the interface definition and have libvirt
>         look up the bridge name when creating the guest? 
> 
> > Currently we just have something really simple like
> > 
> >   <interface type="bridge">
> >     <source bridge='xenbr0'/>
> >     <mac address='00:11:22:33:44:55'/>
> >   </interface>
> > 
> > I guess we've probably want to refer to the UUID of the network to map
> > it into the guest.
> 
> 	Well, the UUID isn't much good if you can't map it. So, it would
> probably be the name and libvirt URI, right?

	Related to the last patch, how about we just put the network name in
the interface definition?

	Attached are patches implementing this for both QEMU and Xen guests.

Cheers,
Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-network-qemu-iface.patch
Type: text/x-patch
Size: 10157 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070125/bce3665f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-network-xen-iface.patch
Type: text/x-patch
Size: 2778 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070125/bce3665f/attachment-0003.bin>


More information about the libvir-list mailing list