Make IP and Network hashable so they can be used as keys.