Menu
Coddy logo textTech

Reading IPv6

Lesson 39 of 46 in Coddy's IP Addressing and Subnetting course.

Two rules shrink IPv6 addresses to something humans can read:

  1. Drop leading zeros in each group: 0db8 becomes db8, 0000 becomes 0.
  2. Replace one run of all-zero groups with ::, choosing the longest run. Only once per address, or it would be ambiguous.

So 2001:0db8:0000:0000:0000:0000:0000:0001 compresses to 2001:db8::1, and the loopback collapses all the way to ::1.

challenge icon

Challenge

Beginner

Compress 2001:0db8:0000:0000:0000:0000:0000:0001 as far as the rules allow and print the result.

Expected output:

2001:db8::1

Try it yourself

Terminal

All lessons in IP Addressing and Subnetting

Practice on your own: Terminal playground