Future Internet Technologies Internet Protocol version 6 (IPv6) Dr. Dennis Pfisterer Institut für Telematik, Universität zu Lübeck http://www.itm.uni-luebeck.de/people/pfisterer Contents Motivation & Origins Addressing & Routing Address Notation Unicast, Anycast, and Multicast Required addresses Header Format Functionalities and Properties ICMPv6 Fragmentation (Path MTU Discovery) Neighbor Discovery Protocol (NDP) DHCPv6, DNS, and IPv6 2 1
Motivation & Origins IPv4 Address Space Exhaustion January 2011, the last two /8 address blocks were allocated Exhaustion-aggravating developments Increasing number of (mobile) devices Always-on connections Inefficient address space usage Mitigating measures Classless Inter-Domain Routing (CIDR) Topological Address Allocation Strategy Network Address Translation (NAT) Dynamic Host Configuration Protocol (DHCP) Name-based virtual hosting of web sites 2
IPv4 Address Space Exhaustion IPv4 address space size: 32 bit 2 32 = 4,294,967,296 addresses in total IPv6 address space size: 128 bit 10 21 addresses/m 2 earth surface (!) If the allocation strategy is good End-to-End Principle Main motivation for the larger address space Ensuring the end-to-end principle RFC 2775 - Internet Transparency state should be maintained only in the endpoints, in such a way that the state can only be destroyed when the endpoint itself breaks Network Address Translation (NAT) Breaks this principle Introduces problems with protocols FTP, SIP, RTP, IPsec, 3
Addressing and Routing Address Notation Address Notation Hexadecimal representation using 8 groups of 4 hex digits, separated by a colon (:) Full length notation Omit leading zeros (in a group) Consecutive all-zero groups replaced by 2 colons (only once per address) In URLs 2001:0638:070a:c003:0000:0000:0000:0001 2001:638:70a:c003:0:0:0:1 2001:638:70a:c003::1 http://[2001:638:70a:c003::1]:8080/ CIDR subnet notation 2001:638:70a::/48 (University of Lübeck) IP and subnet notation 2001:638:70a:c003::1/64 4
Addressing & Routing Unicast Unicast Address Format Defined in RFC 4291 IP Version 6 Addressing Architecture Theoretically, all 128 bits may be used as node address However, addresses are structured into subnet and interface identifier Example: 2001:638:70a:c003:20c::1/80 5
Unicast Address Format Global unicast addresses 2001: 638: 70A: C003: 20C: 29FF: FEA8: F4A2 48 bits (or more) 16 bits (or less) 64 bits Routing Prefix Subnet ID Interface Identifier Network Prefix Interface identifiers in IPv6 unicast addresses are used to identify interfaces on a link. (RFC 4291) Usually derived using the interface link-layer (MAC) address: 48-bit MAC address 64-bit Interface Identifier 00:0c:29:a8:f4:a2 200c:29ff:fea8:f4a2 Unicast Address Types Link Local Unicast Address range: FE80::/10 (FE80 to FEBF ) Used for communication in the local subnet only, not routed Unique Local Unicast Address range: FC00::/7 (FC to FD ) Globally unique private addresses Used in non-global Internet (e.g. site-wide) communication, not routed Global Unicast Address range: 2000::/3 (2000 to 3FFF ) For global unicast communication Globally routed 6
Special Unicast Addresses ::/128 0:0:0:0:0:0:0:0 Unspecified address (128 0-bits) ::/0 Default route ::1/128 0:0:0:0:0:0:0:1 Loopback address Addressing & Routing Anycast 7
Anycast Address assigned to more than one interface Routed to the nearest interface According to the routing protocols measure of distance Subnet prefix identifies a specific link Packets sent to the subnet router anycast address will be delivered to one router on the subnet (i.e., any) Addressing & Routing Multicast 8
Multicast Address Format Multicast addresses are within the FF00::/8 address space flgs defines (amongst others) if an address is Permanently-assigned ( well-known ) Non-permanently-assigned ( transient ); for temporary or dynamically assigned addresses Multicast Address Scopes scop defines the (routing) scope of an address Scope Description Value Address node-local Loopback only 1 16 =0001 2 FF01 link-local Only delivered in the local subnet, not routed 2 16 =0010 2 FF02 site-local Routed, but not by border routers 5 16 =0101 2 FF05 organization-local Routed inside an org, also by border routers 8 16 =1000 2 FF08 global Globally routed E 16 =11102 FF0E 9
Permanently-assigned Multicast Addresses Several addresses (or address ranges) of the multicast address range are reserved for special (protocol) purposes Assigned by the Internet Assigned Numbers Authority (IANA) Examples All IPv6 nodes FF01::1 (node-local scope) FF02::1 (link-local scope) All IPv6 routers FF01::2 (node-local scope) FF02::2 (link-local scope) FF05::2 (site-local scope) Addressing and Routing Required addresses 10
Required addresses Each IPv6 node always has at least one address Link-local address (FE80 ) Automatically calculated using the link-layer (MAC) address fe80::20c:29ff:fea8:f4a2 above Enables plug&play communication in the local subnet Required addresses When connected to a router At least one additional global unicast address Retrieved using the Neighbor Discovery Protocol (more later) May have additional manually or automatically assigned unicast/multicast addresses 11
Header Format Header Format (IPv4 vs. IPv6) Header format simplified Reduces common-case processing cost 0 8 16 24 32 0 64 128 v(=4) IHL TOS Total Length Identification Flags Fragment Offset TTL Protocol Header Checksum Source Address (32 bit) Destination Address (32 bit) Options and Padding (optional) Reduces bandwidth cost 64 0 8 16 24 32 0 v(=6) Traffic Class Flow Label Payload Length Next Header Hop Limit Source Address (128 bit) Improved support for extensions (next header) 192 Destination Address (128 bit) = removed = new 12
Header Format (IPv4 vs. IPv6) Traffic Class Quality of Service Flow Label QoS/Real-time applications. Packets using the same flow label are treated identically Next Header Upper-layer protocol or extensions Hop Limit Maximum number of hops (TTL in IPv4) 64 0 8 16 24 32 0 v(=6) Traffic Class Flow Label Payload Length Next Header Hop Limit Source Address (128 bit) 192 Destination Address (128 bit) IPv6 Header Extensions Extension Headers are optional Identified by Next Header Processed only at the destination Exception: Hop-by-Hop Options IPv6 Header Next Header = TCP TCP Header + Data IPv6 Header Next Header = Routing Routing Header Next Header = TCP TCP Header + Data IPv6 Header Next Header = Routing Routing Header Next Header = Fragment Fragment Header Next Header = TCP TCP Header + Data 13
Functionalities and Properties ICMPv6 ICMPv6 Integral part of IPv6, used for Diagnostics (ping, traceroute, ) Path MTU Discovery Neighbor Discovery Protocol (NDP) In contrast to IPv4, ICMPv6 packets are encapsulated in IPv6 packets as next headers 14
ICMPv6 Messages RFC 4443 defines a set of core messages Error messages Destination Unreachable Packet Too Big Time Exceeded Parameter Problem Informational messages Echo Request Echo Reply Other RFCs define additional ICMPv6 messages Functionalities and Properties Fragmentation (Path MTU Discovery) 15
Fragmentation (Path MTU Discovery) IPv4: Packets (potentially) fragmented at each hop IPv6: Fragmentation MUST occur at the sending node Routers don t fragment ICMPv6 Packet Too Big message returned Sender must try again with smaller MTU MTU: 1500 MTU: 1280 MTU: 1500 Functionalities and Properties Neighbor Discovery Protocol (NDP) 16
NDP - Functionalities Specified in RFC 4861 for IPv6 nodes on the same link Router Discovery Locate routers on a link (like RDISC in IPv4, RFC 1256) Prefix Discovery Discover address prefixes that are on-link Parameter Discovery Link parameters (MTU) or Internet parameters (hop limit) Address Autoconfiguration Mechanisms needed for stateless address autoconfiguration (RFC 4862) NDP - Functionalities Address resolution Determine the link-layer address of an on-link destination (ARP in IPv4) Next-hop determination Algorithm for next-hop, can be a router or the destination itself Neighbor Unreachability Detection (NUD) For routers, alternate default routers can be tried Duplicate Address Detection (DAD) Determine whether or not an address is already in use by another node Redirect How a router informs a host of a better first-hop node (comparable to ICMP Redirect in IPv4) 17
NDP - Router & Prefix Discovery Routers send Router Advertisement (RA) messages periodically To the all-nodes multicast address (FF02::1, link-local scope) Additionally, nodes can send Router Solicitation (RS) messages To the all-routers multicast address (FF02::2, link-local scope) Routers answer immediately with an RA message RA messages contain the subnet prefix NDP - Neighbor Messages Neighbor Solicitation (NS) Address Resolution Neighbor Unreachability Detection (NUD) Duplicate Address Detection (DAD) Neighbor Advertisement (NA) Response to a Neighbor Solicitation Also sent unsolicited to announce new information 18
Stateless Address Autoconfiguration (RFC 4862) 1. Creation of Link-Local Addresses Link-local multicast prefix fe80::/64, concatenated with interface identifier Example: fe80::20c:29ff:fea8:f4a2/64 2. Duplicate Address Detection (DAD) 3. Creation of Global Addresses Use prefix from RA messages Lifetime values according the prefix information option Example: 2001:638:70a:c003:20c:29ff:fea8:f4a2/64 4. Duplicate Address Detection (DAD) Functionalities and Properties DHCPv6 19
DHCPv6 Defined in RFC 3315 Essentially a stateful counterpart to Stateless Address Autoconfiguration Used when no routers were found (no RAs) or RAs enable DHCPv6 DHCPv6 provides no routing information Less important than with IPv4 due to the NDPs autoconfiguration features Allows e.g. centralized control of network nodes DHCPv6 - Add-ons RFC 3736: Stateless Dynamic Host Configuration Protocol (DHCP) Service for IPv6 Options RFC 3319: Session Initiation Protocol (SIP) Servers RFC 3633: Prefix Options RFC 3646: DNS RFC 3898: Network Information Service (NIS) RFC 4075: Simple Network Time Protocol (SNTP) RFC 4242: Information Refresh Time (stateless DHCP only) RFC 4280: Broadcast and Multicast Control Servers (3G cell phones) 20
Functionalities and Properties DNS and IPv6 IPv6 and DNS RFC 3596 defines DNS Extensions to Support IPv6 AAAA records ( quad-a records ) Similar to A Resource Record (RR) for IPv4 21
IPv6 and DNS PTR: Reverse lookup (IPv6 address name) Takes place under ip6.arpa IPv4 uses in-addr.arpa 22