What data structure to use for large scale DHCP server
A good data structure for IPv4 translation is a 256-way trie, this means any lookup always requires exactly 4 memory accesses, and shared prefixes will be hot in cache.
You can do the same for IPv6 but implementing a unique suffix check (instead of always expanding trie nodes) is probably worth it.