Transcript
This is one IPv6 address. Thirty-nine characters. Two rules shrink it to twenty-two, and you can do it in ten seconds. An IPv6 address is eight groups, each four hex digits, split by colons. In this one, nineteen of the thirty-two digits are zeros. Zeros are what we get to delete. Level one: drop the leading zeros in every group. Zero-D-B-8 becomes D-B-8. Zero-zero-four-two becomes 42. A group of four zeros keeps just one zero. Twenty-seven characters left. Careful with F-F-zero-zero. Those zeros sit at the end, so they stay. Drop them and you'd have F-F, a completely different number. Level two: find the longest run of zero groups. Here it's three in a row. Replace the whole run with a double colon. Twenty-two characters. Same address, nothing lost. Now the catch. The double colon can appear only once. This address has two zero runs. Squash both, and nobody can tell how many zeros each one hid. Two and two? One and three? So you squash the longest run, or the first one if they tie. And a lone zero group? It stays a plain zero. The standard says don't squash just one. Going back is just counting. Here you can see five groups. An address always has eight, so the double colon hides three groups of zeros. Put them back, and you have the full address again. So remember it like this: drop leading zeros, squash the longest zero run once, count to eight to undo it. Want all of this on one page? Comment CHEAT and I'll send you the free cheat sheet. Practise it at seclern.com, and follow for more.