[libvirt] [PATCH 0/1] Added Networking API to change/create/etc. hostonly/internal network in VirtualBox

Pritesh Kothari Pritesh.Kothari at Sun.COM
Wed May 6 10:10:05 UTC 2009


> > change/create/etc. hostonly/internal network in VirtualBox
> >
> > <network>
> > 	<name>vboxnet0</name>
> > 	<uuid>786f6276-656e-4074-8000-0a0027000000</uuid>
> > 	<forward mode='hostonly'/>
>
> This line isn't neccessary - AFAICT there is no forwarding off traffic
> from hostonly networks to the LAN. Just set VIR_NETWORK_FORWARD_NONE
> for this.

Will do this.

> > 	<bridge stp='off' forwardDelay='0' />
>
> This looks like a bug in our XML formatter - it shouldn't be generating
> a <bridge> tag if there is no bridge :-)

will post a patch for this as well.

> > 	<ip address='192.168.27.6' netmask='255.255.255.0'>
> > 		<dhcp>
> > 			<range start='192.168.27.7' end='192.168.27.8' />
> > 			<host mac='78:16:3e:4d:c7:9e' name='vboxnet0' ip='192.168.27.10' />
> > 		</dhcp>
> > 	</ip>
>
> The IP address is confusing me a litle here. I'm not sure why there
> are two different IP addresses for the host.
>
> In my test box I have an interface
>
> vboxnet0  Link encap:Ethernet  HWaddr 00:76:62:6E:65:74
>           inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
>           inet6 addr: fe80::276:62ff:fe6e:6574/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 b)  TX bytes:5320 (5.1 KiB)
>
> And the XML is shown as
>
>   <ip address='192.168.56.100' netmask='255.255.255.0'>
>     <dhcp>
>       <range start='192.168.56.101' end='192.168.56.254' />
>       <host mac='00:76:62:6e:65:74' name='vboxnet0' ip='192.168.56.1' />
>     </dhcp>
>   </ip>
>
> What I'd expect though, is that the IP address of the interface is
> listed as the <ip address=''> tag, not as a <host>  tag - the latter
> is for defining static IP mapping for guest VMs. So I'd expect the
> XML to loook like
>
>   <ip address='192.168.56.1' netmask='255.255.255.0'>
>     <dhcp>
>       <range start='192.168.56.101' end='192.168.56.254' />
>     </dhcp>
>   </ip>
>
>
> But what is this second IP address virtualbox seems to have for the DHCP
> server ?!?!

Oh the main thing here is VirtualBox has its own dhcp server and <ip 
address='192.168.56.1' netmask='255.255.255.0'> refers to its IP address and 
not the interface IP address. now the vboxnet0 interface is just like any 
other interface to dhcpserver and thus its IP address is under the <host> tag. 
the <host> tag currently needs to be specified if you want to give a static 
config to the hostonly adaptor, else in 2.5+ it will support automatic IPconfig 
through the same dhcp server.

Hope that explains it.

Regards,
Pritesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090506/1526f2f1/attachment-0001.htm>


More information about the libvir-list mailing list