Regular Expression for IPv6 addresses

James Hess mysidia at gmail.com
Sat Feb 6 16:52:33 CST 2010


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

Wasn't there an  internet draft on that subject, recently?
http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04

077.077.077.077  is equivalent to  77.77.77.77  if valid at all
RFC 4038  is very clear that the text representation of a mapped IPv4
address is Base 10.     http://tools.ietf.org/html/rfc4038#section-5.1

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  10.1.0.2, 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.

--
-J




More information about the NANOG mailing list