iMapper Community

Rich Brown

Update: A Regular Expression for IPv6 Addresses

Last week, I posted a regular expression for recognizing whether an IPv6 address has a valid format. Now there's a Javascript implementation that uses the regular expression.

Check out the Interactive IPv6 Address Validator at http://www.intermapper.com/ipv6validator. You can enter an IPv6 address, and the page will indicate whether the entered address has the proper format or not.

This is useful for becoming familiar with the IPv6 address format. As has widely been reported (for example, here, here), the number of unassigned IPv4 addresses is dwindling quickly, requiring a new way of addressing hosts. Although this new network protocol won't affect everyone, many network operators and administrators will need to understand how IPv6 works and how it's configured. One step on this road is understanding the address format.

In addition, the IPv6 Validator page also rewrites the address into its "best text representation" according to the draft IETF Recommendation for IPv6 Address Text Representation. This converts the address to lower case, compresses runs of 16-bits of zeroes, suppresses leading zeroes, etc.

A bug in the Knowledgebase article and the IPv6 Address Validator have both been fixed. The typo in the regular expression for handling dotted-decimal addresses has been fixed.

Views: 51

Tags: format, ipv4, ipv6, ipv6 validator, parser, regex, regular expression, valid, validation, validator, More…well-formed

Comment

You need to be a member of iMapper Community to add comments!

Join iMapper Community

© 2012   Created by Community Admin.

Badges  |  Report an Issue  |  Terms of Service

InterMapper.com iMapper Community