IPV6 BASICS : PROTOCOL, ADDRESSING
Piers OHanlon
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv6 Address Space
Ashgabat, Turkmenistan April 2007 Ashgabat, Turkmenistan April 2007
IPv6 Header
The IPv6 header is redesigned. Minimize header overhead and reduce the header process for the majority of the packets. Less essential and optional fields are moved to extension headers IPv6 and IPv4 headers are not interoperable!
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv4 and IPv6 Header Comparison
IPv4 Header
Version
IPv6 Header
Total Length Fragment Offset
Version
HL
Type of Service
Traffic Class
Flow Label
Identification
Flags
Payload Length
Next Header
Hop Limit
Time to Live
Protocol
Header Checksum
Source Address Destination Address Options Padding
Source Address
Fields Name Kept from IPv4 to IPv6 Fields Not Kept in IPv6 Name and Position Changed in IPv6 New Field in IPv6 Destination Address
Ashgabat, Turkmenistan April 2007 Ashgabat, Turkmenistan April 2007
Extension Headers (RFC2460)
Processed only by node identified in IPv6 Destination Address field => much lower overhead than IPv4 options
exception: Hop-by-Hop Options header
Eliminated IPv4s 40-octet limit on options
In IPv6, limit is total packet size, or Path MTU in some cases Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Extension Headers
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 = Destination
Destination Header Next Header = TCP
Fragment of TCP Header + Data
Extension Headers Are Daisy Chained
Ashgabat, Turkmenistan April 2007 Ashgabat, Turkmenistan April 2007
IPv6 extension headers: order is important
IPv6 Hop by hop (0) Destination Routing (43) Fragmentation(44) Authentication(51) Security Destination (60) Upper Layer
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
RFC 2460
Processed by every router Processed by routers listed in Routing extension List of routers to cross Processed by the destination After reassembling the packet Cipher the content of the remaining information Processed only by the destination
v4 options vs. v6 extensions
A R1 A -> B R1
A -> R1 B
IPv4 options : processed in each router slow down packets B
Ashgabat, Turkmenistan April 2007 Ashgabat, Turkmenistan April 2007
v4 options vs. v6 extensions
A R1
A -> R1 B
A -> B R1
IPv6 extensions (except Hop-by-Hop) are processed only by the destination. B
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv6 Address Representation (Example)
Base format (16-byte)
[Link]
Compact Format:
[Link] [Link] [Link]
Litteral representation
[Link]
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv6 Addressing
Prefix Representation
Representation of prefix is just like CIDR [address prefix / prefix length] In this representation you attach the prefix length
IPv4 address: [Link]/16 IPv6 address: [Link]/48
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv6 Address Representation
Loopback address representation
[Link]=> ::1 Same as [Link] in IPv4 Identifies self
Unspecified address representation
[Link]=> :: Used as a placeholder when no address available (Initial DHCP request, Duplicate Address Detection DAD)
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv6 Address Representation
IPv4 mapped
[Link]IPv4 = ::FFFF:IPv4 [Link][Link] = [Link]
IPv4 compatible
[Link]IPv4 = ::IPv4 [Link][Link] = ::[Link] = [Link]
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv6 Addressing Architecture
IPv6 Addressing rules are covered by multiples RFCs Architecture initially defined by RFC 2373 Now RFC [Link] (obsoletes 3513 which obsoletes RFC 2373) Address Types are : Unicast : One to One (Global, Link local, Site local, Compatible) Anycast : One to Nearest (Allocated from Unicast) Multicast : One to Many A single interface may be assigned multiple IPv6 addresses of any type (unicast, anycast, multicast)
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
IPv6 - Addressing Model
Addresses are assigned to interfaces
change from IPv4 model :
Interface 'expected' to have multiple addresses Addresses have scope
Link Local Site Local Global
Global
Site
Link
Addresses have lifetime
Valid and Preferred lifetime
Site-Local Address Deprecated in RFC 3879 now it is Unique Local Address (ULA) RFC 4193
Ashgabat, Turkmenistan April 2007 Ashgabat, Turkmenistan April 2007
Aggregatable Global Unicast Addresses
Provider 3 45 bits
Global Routing Prefix 001
LAN Prefix 16 Bits
Subnet
Host 64 bits
Interface ID
Aggregatable global unicast addresses are:
Addresses for generic use of IPv6 Structured as a hierarchy to keep the aggregation
See RFC 4291
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Link-Local
128 bits 0
1111 1110 10 FE80::/10
Interface ID 64 bits
10 bits
Link-local addresses:
Have a limited scope of the link Are automatically configured with the interface ID
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Link-Local
Aggregatable Address
2001::4: [Link]
Link-Local Address
[Link] [Link]
Ashgabat, Turkmenistan April 2007 Ashgabat, Turkmenistan April 2007
Unique-Local
128 bits Global ID 41 bits
1111 110 FC00::/7
Interface ID Subnet ID 16 bits
7 bits
Unique-local addresses used for:
Local communications Inter-site VPNs Not routable on the Internet
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Aggregatable Global Unicast Addresses
Lowest-order 64-bit field of unicast addresses may be assigned in several different ways:
Manually configured Auto-configured from a 64-bit EUI-64, or expanded from a 48-bit MAC address (e.g. Ethernet address) Auto-generated pseudo-random number (to address privacy concerns) Assigned via DHCP
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
EUI-64
Ethernet MAC Address (48 bits) 00 00 90 90 27 FF 64-bit Version Uniqueness of the MAC EUI-64 Address 00 90 27 FF FE FE 17 FC 0F 27 17 FC 17 0F FC 0F
000000X0 X=1 02 90
1 = Unique Where X= 0 = Not Unique FE 17 FC 0F
27
FF
EUI-64 address is formed by inserting "FFFE" and ORing a bit identifying the uniqueness of the MAC address
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Interface Identifier: Example
MAC address 00-08-0d-4e-6b-c6 (Toshiba Interface!) 4e:6bc6 EUI-64
0008:0d
ff:fe
[Link] [Link]/64 IPv6 link prefix
Interface ID
+ [Link] IPv6 global unicast address
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Anycast Addresses
(RFC 3513)
Anycast addresses allow a packet to be routed to one of a number of different nodes all responding to the same address Anycast addresses are taken from the unicast address spaces (of any scope) and are not syntactically distinguishable from unicast addresses it may be assigned to an IPv6 router only
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Anycast Addresses
(RFC 3513)
Anycast address can not be a used as a source address of an IPv6 packet must be assigned only to routers Reserved anycast addresses are defined in RFC 2526
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Anycast Address
Subnet Router Anycast address
128 bits n bits Prefix (128-n) bits 00000
Reserved Subnet Anycast address
128 bits Prefix 111111X111111 111 0 If EUI-64 Format
Anycast ID
Anycast:
X=
1 If Non-EUI-64 Format
7 bits
Syntactical the same as a Unicast address Is one-to-nearest type of address Has a current limited use
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007
Multicast
128 bits 0
1111 1111
Multicast Group ID 0 If Permanent Flag =
F 8 bits
Flag
Scope
1 If Temporary 1 = Node 2 = Link
8 bits Scope =
5 = Site (Deprecated) 8 = Organization E = Global
Multicast is used in the context of one-to-many A multicast scope is new in IPv6
Ashgabat, Turkmenistan April Ashgabat, Turkmenistan April 2007 2007