I've been reseraching the best way(s) to store both ipv4 & ipv6 ip addresses.
Simply put, so far there seems to be much debate as to how to do so properly ranging from storing them as varchar or in a binary format.
I'm really not sure at this point.
I suppose I would like to hear from some folks here as to your experience doing so.
Some things I need to consider:
At some point, I may be storing possibly millions of ips, so I do need to consider storage size in advance, obviously.
- I also assume when I capture ips, I would have to store each type in a seperate row, or can one store both types together then sort them at a later time? I'm sorry, I'm not sure if that question makes sense.
Can both types be caputured in the same manner and treated in a similar manner until I have to actually present them in a readable format to someone in the future? (At this point, I'm not concerned how they appear when stored, as long as they can be dealt with later in a human-readable manner.)
I'm also learning about inet_ntop(), inet_pton() from this site and think this may be somehow related to what I'm inquiring about.
Any hint or push in the right direction would be highly appreciated; a link to an apporiate article/thread/site, etc.
Thank you in advance for your time.