As I said, you should track both. If you do lookups on names *and* ip's, you should have both values indexed as keys.