Workflow Tools Control Yard

Home / Network

IPv6 expander, compressor and reverse name

Paste an IPv6 address in any form to get it in full and in its shortest form, with the ip6.arpa name for its PTR record. Add a prefix length such as /48 for the network and its reverse zone, or paste an ip6.arpa name to get the address back.

To see what kind of address it is, use the IP address type checker.

From a MAC address

SLAAC can make the last 64 bits of an address from the MAC address of the interface: FF FE goes into the middle of the six bytes, and the universal/local bit of the first byte is turned over (RFC 4291 appendix A). Enter a MAC address and a prefix. With no prefix the page uses fe80::/64, the link-local prefix.

RFC 9542 calls this way of making an interface ID deprecated, and RFC 8064 recommends against putting a stable link-layer address such as the MAC into it: it lets others link a host's activity together and follow the host from network to network.

The rules for the shortest form

RFC 5952 asks programs to write an address this way:

The longer forms are still valid addresses, and RFC 5952 says that every program must accept them. For an address with an IPv4 address in its last 32 bits under a well-known prefix, such as ::ffff:192.0.2.1, it recommends writing that part in dotted form.

The reverse name

A PTR record for an IPv6 address sits under ip6.arpa. Its name is the 32 hex digits of the address, one to a label, from the last digit to the first (RFC 3596 section 2.5). RFC 3596's own example, 4321:0:1:2:3:4:567:89ab, becomes:

b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.ip6.arpa

The reverse zone of a prefix holds only the digits of the prefix, so its length must be a multiple of 4. The zone of 2001:db8:abcd::/48 is:

d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa

The part after %

fe80::1%eth0 tells which link a link-local address is on, here by the name of an interface. RFC 4007 section 11 writes it as the address, a % sign and a string for the zone, which may be a number such as %1 or an interface name. The zone is not part of the address, and the page shows the address without it.

Sources

More Network tools