ipv6-prefix

Pattern: 
'((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' 
 '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' 
 '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' Pattern: 
 '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' 
 '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; 
Pattern: 
'(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' 
 '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' 
 '(/.+)' 

The ipv6-prefix type represents an IPv6 address prefix. The prefix length is given by the number following the slash character and must be less than or equal to 128.

A prefix length value of n corresponds to an IP address mask that has n contiguous 1-bits from the most significant bit (MSB) and all other bits set to 0.

The IPv6 address should have all bits that do not belong to the prefix set to zero. The canonical format of an IPv6 prefix has all bits of the IPv6 address set to zero that are not part of the IPv6 prefix. Furthermore, the IPv6 address is represented as defined in Section 4 of RFC 5952

Reference:

  • RFC 5952: A Recommendation for IPv6 Address Text Representation