IPv6 Basics Part 1 - Address Format & Types

Like many people, I've spent a fair amount of time trying to pretend IPv6 doesn't exist. So when one of my clients asked me to help them with their dual-stack IPv6 implementation, it was with some dread that I opened Pandora's box.

I started out by going back to basics. Old text books were dusted off, RFCs studied and networking blogs read.

So whilst the subject is still comparatively fresh in my mind, I thought it might be useful to summarise some of the more basic IPv6 concepts in blog form. (as much for my own reference as anything else)

#### IPv6 Address Format Given that the shortage of IPv4 addresses is the biggest driver behind IPv6, this seems like a sensible place to start.

IPv4 uses 32-bit addresses and whilst the dotted decimal notation we are all used to works well for 32-bit addresses, IPv6's 128-bit addresses displayed in that format are practically unreadable. For example, one of Google's IPv6 DNS addresses would read like this.

Clearly this is not an option, so for IPv6 we use colon hex notation instead.
In colon hex, that same IPv6 address looks like this.

This is better, but still not the easiest thing in the world to read. One extra trick we can apply to make it more readable is to use zero compression, whereby we replace strings of repeated zeros with a pair of colons. (Note: you can only use zero compression once in an IPv6 address)
So now that original address we started with looks like this.

Naturally, we've also dispensed with dotted decimal notation for subnet mask, which we're now calling Prefix Length, and sensibly adopted the CIDR notation we are used to from IPv4.
So if we assume that this IPv6 address is using a 64-bit prefix, the address with prefix length would look like this.

And the network address for this subnet would look like this.

IPv6 Address Types

IPv6 specifies just three main types of IPv6 Address - Unicast, Anycast and Multicast. The headline grabber here is that broadcast is gone, (particularly given the number of IPv4 services that rely on broadcast), but in reality the functionality provided by broadcast in IPv4 is achieved in IPv6 using special multicast groups.

I'll cover much of this in more detail later, but for now I'm going to declare Anycast out of scope for these posts on the basis that the use cases are still fairly niche. (RFC7094 is a reasonable place to start to learn more about anycast if you're interested though)

IPv6 Basics Part 1 - IPv6 Address Format & IPv6 Address Types

IPv6 Basics Part 2 - Unicast Addressing

IPv6 Basics Part 3 - Protocol Differences

IPv6 Basics Part 4 - Multicast

IPv6 Basics Part 5 - Planning an IPv6 Network