34
Short Introduction to IPv6 Martin Schütte

Short Introduction to IPv6

Embed Size (px)

DESCRIPTION

Slides for my short IPv6 introduction at the Freifunk Geekend

Citation preview

Page 1: Short Introduction to IPv6

Short Introduction to IPv6

Martin Schütte

Page 2: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Network Working Group S. DeeringRequest for Comments: 2460 CiscoObsoletes: 1883 R. HindenCategory: Standards Track Nokia

December 1998

Internet Protocol, Version 6 (IPv6)Specification

Status of this Memo

...

Abstract

This document specifies version 6 of the Internet Protocol (IPv6),also sometimes referred to as IP Next Generation or IPng.

Martin Schütte Short Introduction to IPv6 2013-09-28 2 / 34

Page 3: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

The Hourglass Internet Architecture

IP

TCP UDP

HTTPIMAP SkypeP2P RTP

FirefoxKMailThunderbird Skype Kazaa MPlayer

EthernetPPP DOCSIS

CoaxialFiberTwistedPair CDMA TDMA byCo

nstantineDovrolis

Martin Schütte Short Introduction to IPv6 2013-09-28 3 / 34

Page 4: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Addresses

IPv4: 32 bits

11001011000000000111000100010111

11001011 00000000 01110001 00010111

0xcb 0x00 0x71 0x17

203 0 113 23

203.0.113.23

Martin Schütte Short Introduction to IPv6 2013-09-28 4 / 34

Page 5: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Addresses

IPv6: 128 bits

00100000000000010000011000111000000010000000011100000000001110100000001000000101010111011111111111111110111110110011100000010010

0010000000000001 0000011000111000 0000100000000111 00000000001110100000001000000101 0101110111111111 1111111011111011 0011100000010010

0x2001 0x0638 0x0807 0x003a0x0205 0x5dff 0xfefb 0x3812

2001:0638:0807:003a:0205:5dff:fefb:3812

Martin Schütte Short Introduction to IPv6 2013-09-28 5 / 34

Page 6: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Notation

2a01:0198:0200:01e4:0000:0000:0000:0002= 2a01:198:200:1e4:0:0:0:2= 2a01:198:200:1e4::2

2001:0db8:0000:0000:0001:0000:0000:0001= 2001:db8:0:0:1:0:0:1= 2001:db8::1:0:0:1

Ports: [2001:db8::1:0:0:1]:443http://[2001:db8::1:0:0:1]:443/index.html

Martin Schütte Short Introduction to IPv6 2013-09-28 6 / 34

Page 7: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Address Structure

1 8 16 24 32

IPv4 Address

1 32 64 96 128

IPv6 Address

1 40 64 128

Global Routing Prefix Subnet ID Interface ID

Martin Schütte Short Introduction to IPv6 2013-09-28 7 / 34

Page 8: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Address Allocation

1 23 32 48 64 128

IANA RIPE LIR Site Interface ID

Example: University Server 2001:638:807:3a:205:5dff:fefb:3812

1 23 32 48 64 128

IANA2001:06

RIPE38:

DFN0807:

Uni003a:

Interface ID0205:5dff:fefb:3812

Martin Schütte Short Introduction to IPv6 2013-09-28 8 / 34

Page 9: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Address Usage

Example: Comcast (USA)• 20M customers• avg. 2.5 set-top boxes (STB) per customer• 2 IPs per STB⇒ 20M× 2.5× 2 = 100M IPs

Comparison:10.0.0.0/8 has 224 ≈ 16.5 M IPs

Martin Schütte Short Introduction to IPv6 2013-09-28 9 / 34

Page 10: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Address Usage

Hypothetical example: China Mobile• 740M customers• avg. 2 devices per customer• 2 IPs per device⇒ 740M× 2× 2 ≈ 3000M IPs

Comparison:0/1 has 231 ≈ 2150 M IPsIPv4 has 232 ≈ 4300 M IPs

Martin Schütte Short Introduction to IPv6 2013-09-28 10 / 34

Page 11: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Some Special Address Ranges

:: unspecified::1 localhost::ffff:192.0.2.1 IPv4-mapped2000::/3 unicastfe80::/10 link-localfd00::/8 site-localff00::/8 multicastff02::1 multicast, all hostsff02::2 multicast, all routersff02::101 multicast, all NTP serversff05::1:3 multicast, all DHCP servers

Martin Schütte Short Introduction to IPv6 2013-09-28 11 / 34

Page 12: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

ScopeMulticast addresses have scope:

• ff01::101 means all NTP servers on the same interface (i.e., thesame node) as the sender.

• ff02::101 means all NTP servers on the same link as the sender.• ff05::101 means all NTP servers in the same site as the sender.• ff0e::101 means all NTP servers in the Internet.

Example:

mschuett@zula:~$ ssh root@fe80::6670:2ff:fe4c:3a61ssh: connect to host fe80::6670:2ff:fe4c:3a61 port 22: Invalid argument

mschuett@zula:~$ ssh root@fe80::6670:2ff:fe4c:3a61%eth0

BusyBox v1.19.4 (2013-04-07 13:28:47 CEST) built-in shell (ash)Enter ’help’ for a list of built-in commands....

Martin Schütte Short Introduction to IPv6 2013-09-28 12 / 34

Page 13: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

IPv4 Header Format

0 3 4 7 8 15 16 18 19 31

Version IH Len ToS/ECN Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Options

Padding

IPheader(20–60octets)

Martin Schütte Short Introduction to IPv6 2013-09-28 13 / 34

Page 14: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

IPv6 Header Format0 3 4 7 8 11 12 15 16 23 24 31

Version Traffic Class Flow Label

Payload Length Next Header Hop Limit

Source Address

Destination Address

basicheader(40 octets)

Martin Schütte Short Introduction to IPv6 2013-09-28 14 / 34

Page 15: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

IPv6 Extension Header

Martin Schütte Short Introduction to IPv6 2013-09-28 15 / 34

Page 16: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Destination/Hop-by-Hop Option Header

0 7 8 15 16 23 24 31

Next Header Hdr Ext Len Opt Type Opt Len

Opt Value . . .

0 7 8 15 16 23 24 31

Next Header: 0x3aICMPv6

Hdr Ext Len: 0x008 octets

Opt Type:0x05 Rtr alert

Opt Data Len:0x02 2 octets

Opt Data:0x00 0x00 MLD

Opt Type:0x01 PadN

Opt Data Len:0x00 0 octets

Martin Schütte Short Introduction to IPv6 2013-09-28 16 / 34

Page 17: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

ICMPv6

ICMPv6 includes:• control messages (like ICMPv4)• Link-Layer address resolution (like ARP)• multicast group membership (like IGMP)• Path MTU Discovery• Neighbor Discovery/Autoconfiguration

Martin Schütte Short Introduction to IPv6 2013-09-28 17 / 34

Page 18: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Stateless Address Autoconfiguration

1. select tentative address2. send Router Solicitation to ff02::2

3. join multicast groups for all nodes and Solicited-Node address4. Duplicate Address Detection

⇒ acquired link-local IP

receive Router Advertisement(s) with network info:• routers with lifetime and preference• local network MTU• global address prefix• DHCP management flag

⇒ acquire global address

Martin Schütte Short Introduction to IPv6 2013-09-28 18 / 34

Page 19: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Link-Layer Address Resolution

Solicited-Node Address: FF02:0:0:0:0:1:FFXX:XXXX

Mapping:Unicast fe80::218:f3ff:fe3a:3f55⇒ Multicast ff02::1:ff3a:3f55⇒ MAC 33:33:ff3a:3f:55

send Neighbor Solicitation to multicast⇒ receive Neighbor Advertisement with IP and MAC address

Note: no broadcast required(!)

Martin Schütte Short Introduction to IPv6 2013-09-28 19 / 34

Page 20: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Duplicate Address Detection

Solicited-Node Address: FF02:0:0:0:0:1:FFXX:XXXX

Mapping:Unicast fe80::218:f3ff:fe3a:3f55⇒ Multicast ff02::1:ff3a:3f55⇒ MAC 33:33:ff3a:3f:55

send Neighbor Solicitation to multicast• receive Neighbor Advertisement with IP and MAC address • no answer, address is free X

Martin Schütte Short Introduction to IPv6 2013-09-28 20 / 34

Page 21: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Autoconfiguration and Neighbor Discovery

Design assumption: secure and trustworthy LAN

Simple Denial of Service:1. Host Alice starts Duplicate Address Detection:

"Anyone using IP X?"2. Host Eve answers "I have IP X."3. goto 1

Routing/Man in the Middle:1. Host Eve sends ICMPv6 Redirect:

"This is router Bob, for google.com please use router Eve."

Martin Schütte Short Introduction to IPv6 2013-09-28 21 / 34

Page 22: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

DNSIPv4: A Record — IPv6: AAAA Record

[mschuett@cayce] ~> dig +short quux.de a88.198.11.141[mschuett@cayce] ~> dig +short quux.de aaaa2001:6f8:1138::1[mschuett@cayce] ~> dig +short -x 2001:6f8:1138::1mail.quux.de.[mschuett@cayce] ~> dig -x 2001:6f8:1138::1...;; QUESTION SECTION:;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.

8.3.1.1.8.f.6.0.1.0.0.2.ip6.arpa. IN PTR...

Martin Schütte Short Introduction to IPv6 2013-09-28 22 / 34

Page 23: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Happy Eyeballs

byDan

WingandAnd

rew

Yourtchenko

Martin Schütte Short Introduction to IPv6 2013-09-28 23 / 34

Page 24: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Known for Some Time

Frank Solensky’s Report on Address Depletion, Proceedings of IETF 18, p. 61, Vancouver, August 1990

Martin Schütte Short Introduction to IPv6 2013-09-28 24 / 34

Page 25: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

The Plan

byGeoffHuston

Martin Schütte Short Introduction to IPv6 2013-09-28 25 / 34

Page 26: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Plan B

byGeoffHuston

Martin Schütte Short Introduction to IPv6 2013-09-28 26 / 34

Page 27: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Status Quo

byGeoffHuston

Martin Schütte Short Introduction to IPv6 2013-09-28 27 / 34

Page 28: Short Introduction to IPv6
Page 31: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

IPv6 @ Home

A few ISPs finally offer native IPv6 to consumers.

If not available: use a tunnel brokers, e. g.:• SixXS• Hurricane Electric

Martin Schütte Short Introduction to IPv6 2013-09-28 31 / 34

Page 32: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Security Consideration

• IPv6 restores end-to-end connectivity• no NAT ⇒ no implicit packet filter• problem: insecure L2 net and First Hop Security (just like with IPv4)• (still) missing support in common tools (firewalls, IDS, config UIs, etc)• little experience

Martin Schütte Short Introduction to IPv6 2013-09-28 32 / 34

Page 33: Short Introduction to IPv6

Intro Addresses Headers Autoconfiguration DNS Transition First Steps

Tips for transition

• external connectivity matters• your printer does not need IPv6• neither does your DB backend (probably)• start with an additional load balancer or reverse proxy

Martin Schütte Short Introduction to IPv6 2013-09-28 33 / 34

Page 34: Short Introduction to IPv6