Forkort og udvid IPv6
Én adresse pr. linje. Konverteres i din browser, mens du skriver.
3 af 3 linjer er gyldige IPv6-adresser.
- Forkortet (RFC 5952)
2001:db8::ff00:42:8329
Udvidet2001:0db8:0000:0000:0000:ff00:0042:8329
- Forkortet (RFC 5952)
2a00:1450:4010:c0b::64
Udvidet2a00:1450:4010:0c0b:0000:0000:0000:0064
- Forkortet (RFC 5952)
::ffff:192.0.2.1
Udvidet0000:0000:0000:0000:0000:ffff:c000:0201
Denne tekst findes endnu ikke på dansk. Den vises på engelsk, indtil en oversættelse er udgivet.
An IPv6 address has 128 bits, written as eight groups of four hexadecimal digits. Almost nobody writes all 32 digits: leading zeros in a group may be dropped, and one run of all-zero groups may be replaced by ::.
Because several short forms are possible, RFC 5952 defines one canonical form that every tool should output: lower-case hex, no leading zeros, :: used for the longest run of two or more zero groups (the first one if there is a tie), and never for a single zero group. 2001:0db8:0000:0000:0000:ff00:0042:8329 becomes 2001:db8::ff00:42:8329.
The expanded form, with all eight groups and every leading zero, is what you need for sorting text, for some configuration files and for building reverse DNS names (ip6.arpa).
Ofte stillede spørgsmål
Why does :: appear only once?
Because two :: would be ambiguous: in 2001::1::2 nobody could tell how many zero groups each one stands for.
Are upper-case letters wrong?
They are valid input, but RFC 5952 asks for lower case in output, so logs, configuration and comparisons stay consistent.
What about addresses with an IPv4 part, like ::ffff:192.0.2.1?
They are accepted. The compressed output keeps the dotted IPv4 part for IPv4-mapped addresses, as RFC 5952 recommends.