[157648] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: IPv6 Netowrk Device Numbering BP

daemon@ATHENA.MIT.EDU (Owen DeLong)
Thu Nov 1 15:31:42 2012

From: Owen DeLong <owen@delong.com>
In-Reply-To: <20121101174313.GA58868@2bithacker.net>
Date: Thu, 1 Nov 2012 12:28:05 -0700
To: chip@2bithacker.net
Cc: nanog@nanog.org
Errors-To: nanog-bounces+nanog.discuss=bloom-picayune.mit.edu@nanog.org


On Nov 1, 2012, at 10:43 , Chip Marshall <chip@2bithacker.net> wrote:

> On 01-Nov-2012, Owen DeLong <owen@delong.com> sent:
>> The only exceptions to this parsing would be if someone handed
>> you a textual representation of an IPv4 mapped address
>> (::ffff:192.0.2.50), which essentially represents the partial
>> decimal format Masataka is requesting.
>=20
> I might be missing something here, but isn't that format already
> valid for any IPv6 address, not just the special v4-in-v6
> representation?
>=20
>>>> import socket
>>>> p =3D '2001:abcd::192.16.10.10'
>>>> n =3D socket.inet_pton(socket.AF_INET6, p)
>>>> socket.inet_ntop(socket.AF_INET6, n)
> '2001:abcd::c010:a0a'
>=20
> Or is the issue just the ntop part not giving you back the
> decimalized string?

That's not a problem and I certainly wouldn't expect it to do so.

I guess the silly notation is more widely supported than I thought, but, =
IMHO, it's a kind of poor choice of syntax outside of the limited use of =
displaying IPv4-mapped addresses for dual-stack socket connections =
displaying IPv4 connections in IPv6 format.

Owen



home help back first fref pref prev next nref lref last post