Regular Expression for IPv6 addresses

James Hess mysidia at
Sat Feb 6 22:52:33 UTC 2010

On Fri, Feb 5, 2010 at 12:15 AM,  <sthaug at> wrote:
>> > And now for the trick question.  Is ::ffff: a legal
>> > mapped address and if it, does it match

Wasn't there an  internet draft on that subject, recently?  is equivalent to  if valid at all
RFC 4038  is very clear that the text representation of a mapped IPv4
address is Base 10.

This is a bit like asking if          "::ffff:10.1.2"  is a valid IP
address though.
And is it the same as the ip address "10.1.2"  ?

(Which of course expands to, on common implementations of
inet_pton,  inet_aton, and  getaddrinfo)     Or  ::ffff:0xA010002

I would say these are perfectly  valid  _shorthands_  and
abbreviations  for entering an IP address, which may be provided by
some systems,  but that they are non-canonical  text representations
for displaying  publishing or sharing IP addresses.


More information about the NANOG mailing list