Comment 3 for bug 1008029

Revision history for this message
Gary Kotton (garyk) wrote :

MAC allocation: this is a rudimentary algorithm. a random mac address will be created above a base MAC address. the address will be checked for uniqueness on the network. if this fails then another address will be generated. this will be done n times. n and the basemac should be defined in the configuration file (pending common config update)
IP allocation: for the first stage a similar algorithm as above will be used. a random ip in the defined subnet will be selected. this will be checked for uniqueness. if this fails then another address will be generated. this will be done n times. the range of ip's will exclude the gateway address.
Once the above are in we can work on improving the IP allocation. Dan had a great idea for the IP allocations. A database table will maintain a range of free ip addresses. when an ip is to be allocated the first or last address from the range is allocated. the database entry is updated with the new range. when an entry is freed it will either be added to an existing range or a new entry will be created. deletion may require linking ranges together.