[one-users] onevnet base address

Tiago Batista tiagosbatista at gmail.com
Mon Mar 1 11:37:47 PST 2010


Well, this is what happens when I do not read the source! I thought that
the base and size addresses were used in a way more simpler way, such as
"give me SIZE addresses starting from BASE". Now that you put it this
way, it makes more sense to me!

If you calculate the addresses like this, it should be quite easy to add
a parameter like

NETMASK=[MASK,"network name"] to the context section. It is not on my
plans, but I will look at it if I have any spare time!

On the other hand, this does allow for a different setup. I am now using
a setup where I have a private network NAT'ed by the one frontend host,
because I do not have access to the datacenter router!


Tiago

On Mon, 2010-03-01 at 16:41 +0100, Tino Vazquez wrote: 
> 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