Dropping contiguous zeroes once

The first time I heard the term contiguous, I thought I had misheard the instructor and they had said continuous, but no, contiguous it was. With that in mind, I think it is important to briefly define what the word actually means, although you may still think it the same as continuous. Contiguous means adjacent or being in contact with. This will become clearer when I go through an example.

Take the following IPv6 address:

2001:0034:09FA:0000:0000:1030:0001:4BC2

In the center of it, we can see that it has two groups of numbers made up solely of zeroes, and these two groups are adjacent to each other. They are contiguous, so we can drop them:

2001:0034:09FA:0000:0000:1030:0001:4BC2

This leaves us with the ...

Get Networking Fundamentals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.