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.
Name for a PTR record
Reverse zone of the prefix
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:
- Leave out the leading zeros of each group: 0db8 becomes db8, and a group of zeros becomes 0.
- Replace the longest run of two or more groups of zeros with ::, once. When two runs are equally long, shorten the first.
- Do not use :: for a single group of zeros: 2001:db8:0:1:1:1:1:1 stays as it is.
- Write the letters a to f in lower case.
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
- The shortest form: RFC 5952 sections 4 and 5. The forms an address may take and prefixes: RFC 4291 sections 2.2 and 2.3.
- Reverse names: RFC 3596 section 2.5. Zones: RFC 4007 section 11.
- Interface IDs from a MAC address: RFC 4291 section 2.5.1 and appendix A; RFC 9542 section 2.2.1; RFC 8064. The link-local prefix: RFC 4291 section 2.5.6.
More Network tools
-
CIDR subnet calculator
Network, broadcast, host range, subnet mask and wildcard mask for IPv4 and IPv6 prefixes.
-
IP range to CIDR converter
Turn a range such as 10.0.0.5-10.0.0.70 into CIDR blocks, merge a list of blocks, and check whether an address is in it.
-
IP address type checker
See whether an address is private, CGNAT, link-local, loopback, documentation, multicast or public, with its RFC.
-
MAC address format converter
Convert MAC addresses between colons, dashes, Cisco's dotted form and plain hex, and read the multicast and local bits.
-
MTU and MSS calculator
Work out the MTU and TCP MSS inside PPPoE, GRE, VXLAN, WireGuard and IPsec, with ping commands that test them.
-
Port number lookup
Look up a port such as 445 or 5985, or a service name, in IANA's registry, with what Windows and Active Directory use it for.
-
DHCP option encoder and decoder
Build or read the hex of option 121 and 249 static routes, option 119 search lists and option 43 for Cisco and UniFi.
-
NPS reason code lookup
Read why Network Policy Server denied a request: events 6273 and 6274, and reason codes such as 16, 48 and 65.
-
Wi-Fi reason and status codes
Look up 802.11 deauthentication and disassociation reason codes and association status codes.
-
DSCP and ToS converter
Convert DSCP, ToS and CoS values, with the Wi-Fi priorities of RFC 8325 and the Teams QoS markings.