IPv6

A quick crash course

Benjamin Schmid
Technology Advisor
? for help
2015-06-26
Creative Commons Lizenzvertrag
IPv6 - a crash course by Benjamin Schmid is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License..
Based in parts on the work of Reveal.JS.
German flag Auf Deutsch ansehen (German version)
Navigation hint: use mouse wheel or space-bar

IPv4

## IPv4 in a Nutshell `192.168.144.177` - 4 Bytes - Dot-notation - 2³² = 4.294.967.296 IPs

IPv4 Networks

IP: `192.168.144.177` Network mask: `255.255.255.0` Subnet: `192.168.144.0`..`254`
##### Routing via - _Routing tables_ - _BGP_

Internet access

Generally ISPs assign only one IPv4 address per endpoint.
Typically your router owns this world-wide unique IP address.

But every devices in you local network needs its own IP.
How does this work?

Network Adress Translation (NAT)

##### Local to internet _(NAT)_ | LAN | |WAN | |-----|-|----| |192.168.0.**2:4701**| ⇒ |205.0.0.2:**6787**| |192.168.0.**3:5387**| ⇒ |205.0.0.2:**8709**| |192.168.0.**4:1001**| ⇒ |205.0.0.2:**4806**|
##### Internet to local _(Port mapping, UPnP)_ | LAN | | WAN | |-----|-|----| |205.0.0.2:**8888**| ⇐ |192.168.0.**4:8080**|
Regional Internet Registries World Map Anzahl verfügbarer IPv4-Adressblöcke zwischen 1995 und heute
Consequences: Fragmentation, IP trading

IPv6

... standard since 1998 = 17 years!

## IPv6 - Benefits - Virtual **unlimited IP adresses** - No NAT; **real end-to-end** - Subnets "built-in" & cheap - Simpler packet header

IPv6 adress space

16 Bytes = 2 128

340.282.366.920.938.000.000.000.000.000.000.000.000 nodes
read as: '340 sextillions'

IPv6 address representation

2001:085b:1f1f:0000:0000:0000:00a9:1234
- 8 groups of 4-digit hex-values - Separated by `:`
- You can ommit - Leading zeros - one contiguous groups of 0000 via `::`
2001:85b:1f1f::a9:1234
## IPv6 hierarchy & subnets CIDR notation: `2001:0db8:1234::/48`
    2607:f238:0000:0000:0000:0000:0000:0000
	|    |    |    |    |    |    |
	|    |    |    |    |    |    +– /112
	|    |    |    |    |    |
	|    |    |    |    |    +– /96
	|    |    |    |    |
	|    |    |    |    +– /80
	|    |    |    |
	|    |    |    +– /64
	|    |    |
	|    |    +– /48
	|    |
	|    +– /32
	|
	+– /16

IPv6 unicast address

2001:0db8:85a3:1319:8a2e:0370:7347/64

Routing prefix (/48 or more; ISP typically /32)

Subnet (/16 or less)

Interface-identifier (at least /64;
this allows Stateless autoconfiguration)

IPv6 addresses

Multiple IPs per device!

Address classes
  • Unicast One target
  • Anycast One out of multiple targets
  • Multicast Multiple targets
Scopes
  • Global Routed world-wide
  • Link-local Only valid in your LAN/WLAN/...
  • more...
## Special addresses | Address | | |---------|-| | `::/128` | Invalid IP | | `::1/128` | Loopback device | | `FE80::/10` | Link-local | | `FF00::/8` | Multicast | | `0100::/64` | Virtual: `/dev/null` |

IPv6 Features

  • Address autoconfiguration (independently IP assignment)
  • Duplicate address detection
  • Mobile IP (roaming IPs)
  • Multihoming (One IP at multiple providers)

Usage hints

URL notation
https://[2001:db8:85a3::7344]:8080/
Lookup IPs

nslookup -query=aaaa www.google.com
dig www.google.com AAAA

Refering link-local IPs

fe80::7686:7aff:fe71:1e25b%eth0

IPv6 Deployment

IPv6 transition mechanism

Dual-Stack: IPv4 and IPv6 at the same time

DS-Lite: IPv4 NAT done by ISP.
Euphemism: carrier-grade NAT

Tunneling mechanism (6⇆6):
6in4, 6to4, 6over4, ISATAP, Teredo, ...

Translation mechanism (6⇆4): NAT64

Deployment status

  • World-wide: ~6 %
  • Germany: ~15 %
End-Customers in germany

Sparse: Cable Providers
with small IPv4 pools like Unity (DS-lite),
or big players like 1&1 and Telekom (Dual-Stack)

IPv6 conclusion

##### Down sides - New, incompatible protocol - Reluctant deployment - therefore transition = _»PITA«_ - E2E ➟ privacy issues
##### Up sides - _The one & only option!_ - Real end-to-end - Simpler & more efficient - easier configuration