in reply to Storing and searching sets of IP address ranges

It might be helpful to know a little bit more about the intended use. If you know the netmasks then it seems to me that you could simplyfy the matching greatly by using bitwise operations and not a range based approach like spanning.

-- Time flies when you don't know what you're doing
  • Comment on Re: Storing and searching sets of IP address ranges

Replies are listed 'Best First'.
Re^2: Storing and searching sets of IP address ranges
by acferen (Sexton) on Jul 07, 2010 at 12:24 UTC

    The address will probably have some order, but may not have a known netmask.

    Probably less than 100's of entries per set.

    This will be overwhelmingly for lookups very few insert/delete operations. There will likely be 1000s of lookups per second.

    At present exceptions like your example would simply be two ranges A..O and R..Z.

    -Andrew