Using IPv6

A collection of things I learned about IPv6 addresses and how to use them for my sites and services.
created by on 2015-07-05

I initially started this document in June 2015 while I was working on IPv6 support for allmark and will update it as I learn new things about using IPv6. These are some of the topics I still have on the roadmap:

Format

Mapping: Binary ⇔ Hexadecimal ⇔ Decimal
BitsHexadecimalDecimal
000000
000111
001022
001133
010044
010155
011066
011177
100088
100199
1010A10
1011B11
1100C12
1101D13
1110E14
1111F15

Components of an IPv6 Addresses

  1. Network Prefix (≈ Street)
    • 64bit
    • The first four groups of every IPv6 address
    • The network prefix replaces the IPv4 subnet masks
  2. Interface / Host ID (≈ House Number)
    • 64bit
    • The last four groups of every IPv6 address

The dividing line between Network Prefix and Host ID is defined by the mask. The mask is usually 64 bit (half of the address space).

Size

The sheer size of the IPv6 address space is mind-blowing (!).

The IPv6 address space is so freaking big that there aren’t even any good visualizations out there so I tried to create my own visualization of the IPv6 address space using a Pie-Chart in Google Docs Spreadsheets.

But the IPv4 is so small compared to the IPv6 address space that it would not even show up in the chart. So to give you an idea on how much bigger the IPv6 address space is I increased the powers of ten of the IPv4 address space starting with 9 up to 37.9999:

Animation: Visualizing the the scale of the IPv6 address space in comparison to the IPv4 address space by increasing the IPv4 address space until it becomes visible

Try it yourself: Google Docs > Visualizing the the scale of the IPv6 address space

And here are a two videos that can give an idea of the scale:

Powers of Ten™ (1977)
Gigapixels of Andromeda

Address Types

Unicast
Send a paket to a specific host

Figure: Unicast

Unicast Address Prefixes:

Multicast
Send a paket to all hosts in a subnet

Figure: Multicast

Multicast Address Prefix: FF00::/8

Anycast
Send a paket to the nearest node in the system

Figure: Anycast

IPv6 prefixes for the different address types: iana.org » Internet Protocol Version 6 Address Space

Link Local addresses

Keith Barker - IPv6-02 Lov'n the Link Local Address

Practical Examples on how work with IPv6 addresses

Ping

To ping a IPv6 address you must use ping6 instead of the normal ping tool:

ping6 2001:4860:4860::8888

Curl

Access andykdocs.de via IPv6:

curl -g -6 --insecure -H 'Host: andykdocs.de' "https://[2604:a880:800:10::194:7001]/"

Add a new IPv6 address to your interface

ip -6 addr add public_ipv6_address/64 dev eth0

SSH

To connect to a host via an IPv6 address you must add the -6 flag:

ssh -6 user@2001:4860:4860::8888

Show the IPv6 status in Chrome

Screenshot of the integration of the IPvFoo Chrome extension into your address bar

I do recommend the IPvFoo extension for Chrome. This extension adds a small indicator to your address bar which indicates whether the site is accessed via IPv4 and/or IPv6 and shows you an overview of the different IPv4 and IPv6 hosts used by the site:

Animation: Using the IPvFoo Chrome extension to visualize IPv6 availability

You will notice that many sites are already using IPv6 and you will also notice that some big sites for some reason don’t offer IPv6 (e.g. Bing 😯).

Useful tutorials and videos about IPv6

Making sense of of an IPv6 Address

Making sense of an IPv6 Addres

IPv6 Addressing

IPv6 Addressing

Lessons Learned

I started switching my sites to IPv6 in June 2015 and these are the things I learned since then.

IPv6 Availability (as of July 2015)

Not all networks will resolve IPv6 addresses:

So I created IPv4 proxies for the sites I am hosting on IPv6. I hope this will not be necessary too long.

Shortlink:
Tags: