[one-users] onevnet base address

Tino Vazquez tinova at fdi.ucm.es
Mon Mar 1 07:41:01 PST 2010


Hi Tiago,

OpenNebula uses the network size to calculate the number of 1s in the
network mask:

    network_address =  0xFFFFFFFF << (int) ceil(log(size)/log(2));
    network_address &= net_addr;

Therefore, with your address and size, the network mask is last 8 bits
are 10000000, and given your net address, the first lease will be
172.24.1.1.

With the net adress 172.24.1.32 you can fix the first lease to
172.24.1.32, but you will have a rather small one (just 14 in size),
since you will be setting a 172.24.1.0/28 network.

Regards,

-Tino

--
Constantino Vázquez, Grid & Virtualization Technology
Engineer/Researcher: http://www.dsa-research.org/tinova
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org



On Fri, Feb 26, 2010 at 11:24 PM, Tiago Batista <tiagosbatista at gmail.com> wrote:
> Hello all
>
> I am trying to create a network configuration.
>
> What I want is to use the 172.24.1.0/24 network in the following way:
>
> 172.24.1.1-19 ->physical hosts
> 172.24.1.20-? -> virtual hosts
>
> Now, if I use the following vnet template, the first VM I create uses the
> 172.24.1.1 address, wich would be fine if it were not the fact that it is
> causing an address collision!
>
> NAME = "Xen Network"
> TYPE = RANGED
>
> BRIDGE = "xenbr0"
>
> NETWORK_SIZE    = 230
> NETWORK_ADDRESS = 172.24.1.20
>
> I believe this should create a pool of 230 hosts, the first of them with a
> .20 address, am I right? If that is the case, then address generation should
> be revised as it is creating a lease for .1
>
> If I am wrong, then the contextualization script supplied on the web page
> should set the router to a .254 address instead of a .1 address, this to
> avoid assigning the router address to any VM... I believe this is easier to
> do than the modification above, yet I will look at the code to find out if
> it is easy to perform the modification stated above.
>
>
> Any comments on this?
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



More information about the Users mailing list