[TriLUG] Preparing Applications for IPv6

Alan Porter via TriLUG trilug at trilug.org
Fri Jul 10 10:08:11 EDT 2015


> I think normalization of all
> addresses is extremely important and to treat all addresses as 16 bytes
> and representing IPv4 addresses as V4MAPPED.

I had a question about this when I was Tekelec/Oracle.  Are a.b.c.d
and ::FFFF:a.b.c.d equivalent?  By munging them together, are we
losing some useful information?

Since I was not sure, we chose to store our IP addresses in a text
field 39 digits long, fully expanding all addresses with leading 0's
(even IPv4 ones, even though that technically means they'd be
octal numbers) and standardizing on lower-case.  Using this
deterministic scheme, we could sort and filter and relate tables
using these database columns.

examples:
066.228.045.063
2600:3c03:0000:0000:f03c:91ff:fe50:f21e

The problems came when we interfaced with other (internally-
developed) projects that chose to store their IPs differently.  So we
had to be VERY careful with all addresses as they "entered the system"
and convert them back to human-readable before they "left the
system".

Alan






More information about the TriLUG mailing list