[158386] in North American Network Operators' Group
Re: "Programmers can't get IPv6 thus that is why they do not have
daemon@ATHENA.MIT.EDU (=?utf-8?B?TcOlbnM=?= Nilsson)
Thu Nov 29 12:27:56 2012
Date: Thu, 29 Nov 2012 18:26:26 +0100
From: =?utf-8?B?TcOlbnM=?= Nilsson <mansaxel@besserwisser.org>
To: William Herrin <bill@herrin.us>
In-Reply-To: <CAP-guGUAP2hiPy3eeXSnaTRYAuA5xUstubDAs0Tf_+saQD9G3A@mail.gmail.com>
Cc: NANOG list <nanog@nanog.org>
Errors-To: nanog-bounces+nanog.discuss=bloom-picayune.mit.edu@nanog.org
--ctP54qlpMx3WjD+/
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: Re: "Programmers can't get IPv6 thus that is why they do not have =
IPv6 in their applications".... Date: Thu, Nov 29, 2012 at 09:55:19AM -0500=
Quoting William Herrin (bill@herrin.us):
> On Thu, Nov 29, 2012 at 9:01 AM, Ray Soucy <rps@maine.edu> wrote:
> > You should store IPv6 as a pair of 64-bit integers. While PHP lacks
> > the function set to do this on its own, it's not very difficult to do.
>=20
> Hi Ray,
>=20
> I have to disagree. In your SQL database you should store addresses as
> a fixed length character string containing a zero-padded hexadecimal
> representation of the IPv4 or IPv6 address with A through F forced to
> the consistent case of your choice. Expand :: and optionally strip the
> colons entirely. If you want to store a block of addresses, store it
> as two character strings: start and end of the range.
No, you are both worng. The answer is simple and practical:=20
Use a database that has a modern IP adress database type. Like
Postgres. Its IP-adress data types understand and parse both adress
strings and network strings (and, of course -- a network with the proper
netmask set might be interpreted like a host.)
The 32-bit integer trick might, just might make do for IPv4, but a proper
data type is so much simpler to use.
<non-technical ranting part>
Also, stepping away from MySQL or Oracle makes Larry less powerful.=20
</non-technical ranting part>
--=20
M=C3=A5ns Nilsson primary/secondary/besserwisser/machina
MN-1334-RIPE +46 705 989668
I am covered with pure vegetable oil and I am writing a best seller!
--ctP54qlpMx3WjD+/
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAlC3msIACgkQ02/pMZDM1cUeDwCfXFnYu1gy3Hdc3sPITNN9Jv4B
iRcAoKEE1SKshBhEAG3FiLDZ4E9+/I/x
=1Op3
-----END PGP SIGNATURE-----
--ctP54qlpMx3WjD+/--