North American Network Operators Group

Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical

Summary: Managing allocatiions out of a CIDR block

  • From: Mark Prior
  • Date: Thu Feb 26 02:24:10 1998

A couple of weeks ago I asked:

     I am trying to rewrite the system that we use to allocate blocks from
     our provider blocks to customers. Previously the smallest block we
     allocated was a class C and so this process was pretty easy but now I
     want to be able to optimally use our allocations and allocate blocks
     down to a /30. Does anyone have any ideas, or code, that will manage
     multiple CIDR blocks and keep track of the currently unused parts of
     the block and given a requirement find an appropriate allocation
     (while not fragmenting it like crazy). It would be also useful if it
     could collect together POP specific blocks so that, for example, two
     parts of the same class C were at the same POP.

     Ideas, suggestions?

Well I had a number of people respond, some with ideas and some asking
to find out what I found out so ...

The only publically available code I was pointed at was "Tree"

This seems to handle the basic allocation OK, although I'm not sure it
conforms to the APNIC's guidelines on the block size to allocate. Also
it could be painful if you have a number of separate blocks to
allocate out of since you must specify the block before requesting the
allocation. You will also still need some other DB (lookaside file,
whatever) to associate the allocation to a customer, which isn't a
real drama since you need to keep all sorts of other stuff to keep the
registries happy anyway :-)

Some other people provided ideas on how they might do it and I have
decided to follow that route, ie roll my own in perl. This will allow
me to do my own "specials" and easily integrate it with the rest of my

Thanks to everyone for the pointers and advice,