[one-users] Ranged network!

Lars Kellogg-Stedman lars at seas.harvard.edu
Thu Apr 28 10:49:29 PDT 2011


> we have setup up a ranged virtual network for our ONE-2.2 VMs but the gateway
> IP address keeps being assigned to VMs.

Ahmad,

I just asked a very similar question on the list.  I agree that the
existing documentation isn't particularly clear.

The only response I received was a suggestion to use FIXED networks
rather than RANGED networks, and then to programmatically generate the
list of leases.  So our network configuration looks like this:

  BRIDGE=br619
  NAME=Cloud Private
  TYPE=FIXED

Followed by the output of the following shell script:

  for (( ip=20; ip<255; ip++ )); do
    printf "LEASES  = [IP=10.243.19.%d,
MAC=5E:A5:%02X:%02X:%02X:%02X]\n" $ip 10 243 19 $ip
  done

This generates output that looks like this:

  LEASES  = [IP=10.243.19.20, MAC=5E:A5:0A:F3:13:14]
  LEASES  = [IP=10.243.19.21, MAC=5E:A5:0A:F3:13:15]
  [...]
  LEASES  = [IP=10.243.19.254, MAC=5E:A5:0A:F3:13:FE]

In this case, we're using the "MAC prefix" model, so we're able to
pre-generate this list.  This has solved the problem of OpenNebula
handing out the router address to virtual machines, at the cost of a
small amount of complexity.

-- 
Lars Kellogg-Stedman <lars at seas.harvard.edu>
Senior Technologist
Harvard University SEAS
Academic and Research Computing (ARC)


More information about the Users mailing list