Outline Background IPv6 Structure Transition from IPv4 to IPv6 Example IPv6 Client / Server cs423-cotter2
IPv4 Developed – 1981 –Internet Size: 200 – 300 hosts Internet Grew –1985 - about 1000 computers –1990 - about 100,000 – 2,000,000 –1995 - about 10,000,000 – 45,000,000 –2000 - about 100,000,000 – 400,000,000 –2005 - about 325,000,000 – 1,000,000,000 –2010 - ? – 2,000,000,000 – 5,000,000,000
4 The Motivation for Change Large growth by Asian Carriers 200 million addresses allocated in first 8 months of 2010 Many addresses inefficiently allocated Intermediate sites (~500 – 1000 hosts) require class B address (64k addresses) Addresses projected to run out (9/2011) www.potaroo.net/tools/ipv4/index.html US government required to convert by September 2012
Intermediate Changes Private IPv4 addresses and NAT –10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Classless Interdomain Routing (CIDR) –Remove the address class limitation DHCP –Share addresses within a network Carrier Grade NAT – Use NAT at carrier level.
IPv6 Goals Support lots (~billions) of hosts Reduce the size of routing tables Simplify the routing protocol Provide better security Support QoS Improve multi-casting Support host roaming (w/o changing address) Support future protocol expansion / evolution Coexist with IPv4
IPv6 Flow Label Flow represents a sequence of packets from one source to one (unicast, anycast, multicast) destination with special handling requriements for the intermediate routers. Could be a single TCP connection or multiple connections (think FTP) Special handling conditions must be set up prior to flow commencement Intermediate Router rules –Routers that do not support flow labeling must set the field to 0 on originating packets and pass the field unchanged for forwarded packets –All packets that share the same flow label must have the same source addr, destination addr, hop-by-hop options and router header options (if used) –Source assigns the flow label. All labels are pseudo-random numbers between 1 and 220 -1. Zero label is reserved for no flow label use.
Multiple Extension Headers When multiple extension headers are used in an IPv6 packet, their order must be as follows: Basic IPv6 header Hop-by-Hop Options Destination Options (if the Routing header is used) Routing Fragment Authentication Encapsulating Security Payload Destination Options Upper-layer (TCP, UDP, ICMPv6,...)
IPv6 Address Format 128 bit colon hexidecimal notation –8 groups of 16 bits, separated by colons –2001:0DB8:0000:0000:0000:0000:FF00:0000 Addresses can be abbreviated –2001:DB8:0:0:0:0:FF00:0 –2001:0DB8::FF00:0000 –2001:DB8::FF00:0
IPv6 Address Types Address TypeRangeApplication Aggregatable global unicast 2000::/3Host-to-Host communications; same as IPv4 unicast MulticastFF00::/8One-to-many and many-to-many; same as IPv4 multicast AnycastSame as UnicastApp. Based (load balancing, optimixing traffic, redundancy) Link-local unicastFE80::/10Connected-link communications Solicited-node multicast FF02::1:FF00:0/104Neighbor solicitation
Aggregatable Global Unicast Addresses ( 2000::/3) IPv6 Address Format 001 Global PrefixInterface ID 16 bit SLA or Subnet ID 64 bits48 bits SLA: Site Local Aggregator
Aggregatable Global Unicast Addresses 2001::/16IPv6 Internet address 2002::/166to4 Transition Mechanism 2003::/16 to 3FFD::/16Unassigned 3FFE::/166bone (legacy – dropped 2006)
IPv6 Address Format Link-local Address IPv4 Compatible IPv6 Addresses FE80:0000:0000:0000:0000:0050:56C0:0001 MAC addresszeros 0000:0000:0000:0000:134:193:123:234 IPv4 addresszeros 0000:0000:0000:0000:0086:00C1:007B:00EA IPv4 addresszeros
IPv6 Address Format Multicast Addresses FFLS:0000:0000:0000:xxxx:xxxx:xxxx:xxxx L: Lifetime (0 = Permanent, 1= Temporary) S: Scope 0001 = Node (Interface) 0010 = Link 0011 = Subnet 0101 = Site (deprecated 1000 = Organization 1110 = Global
Anycast Addresses Use aggregatable global unicast addresses Can use site-local o rlink-local addresses Reserved anycast address –Unicast_prefix:0:0:0:0
Solicited-node Multicast Addresses Used as a replacement for ARP function of identifying MAC addr for IP addr. Used to test whether a proposed new IPv6 address is already assigned Format –FF02:0:0:0:0:1:FFxx:xxxx /104 –Where xx:xxxx is least significant 24 bits of IPv6 address.
IPv6 Address Autoconfiguration Extended Unique Identifier - 64 bit –Use Network prefix (typically 48 bits) Use SLA / subnet mask for 16 bits –Use 48 bit MAC address as seed for 64 bit EUID Insert FFFF in the middle of the MAC addr. Insert FFFE in the middle of an EUI-64 addr. –Preferred - 2001:0DB8:001F:F123:2001:0DB8:001F:0050:56FF:FEC0:0001F123:
IPv6 Address Autoconfiguration Stateless Autoconfiguration Objectives: No manual configuration required SOHO should not require a stateful server / router Large site should not require an address server Should support gradeful renumbering of sites Router advertisements should support multiple configuration methods
Stateless Autoconfiguration Process Host generates a link-local address for the interface Send Neighbor Solicitation msgs containing tentative address to verify that the address isn’t being used If address is not unique, process stops If address is unique, host has connectivity Wait for router advertisement from router to determine what kind of autoconfig to use (link-local, site-local, etc). May send Router Solicitations to the all-routers multicast group to get a faster answer.
IPv6 Address Autoconfiguration Stateful Autoconfiguration – DHCPv6 –Client creates a link-local address –Client communicates with a reserved link-scoped multicast address (FF02::1:2) using UDP –Four message exchange used to acquire initial IPv6 address (solicit, advertise, request, reply) –Two message exchange used to update or renew IPv6 address (solicit, reply)
Transition Strategies Do Nothing Dual Stack Large Scale NAT (LSN) Dual Stack Lite (DSLite) 6to4 Transition
Dual Stack Best (most long-term) approach Requires IPv4 Addresses for all sites Host IPv4 Network IPv6 Network Ipv4 channel Ipv6 channel ISP
Large Scale NAT (LSN) AKA Carrier Grade NAT (NAT444) Utilizes IPv4 address space well Problems with incoming connections Host IPv4 Network ISP IPv4 NAT
Endpoint Independent Mapping NAT (NAPT) must always translates a given source address into the same outgoing address, independent of the destination. 126.96.36.199 188.8.131.52 192.168.10.25 184.108.40.206 S: 192.168.10.25:80 D: 220.127.116.11:789 S: 18.104.22.168:123 D: 22.214.171.124:789 S: 192.168.10.25:80 D: 126.96.36.199:678 S: 188.8.131.52:123 D: 184.108.40.206:789
cs423-cotter39 Client / Server with IPv6 New Functions, structures, constants –inet_pton( ) - instead of inet_addr( ) –inet_ntop( ) – instead of inet_ntoa( ) –struct sockaddr_in6 addr –AF_INET6, PF_INET6
Example: Client Side - Windows cs423-cotter47 C:\data\cs423_fs12\examples\IPv6\ipv6_client\Debug>ipv6_client.exe 2610:e0:a040:cdfd:210:4bff:fe2b:22c2 23456 We are using port 1377 This is a test Reply = This is a test This is only a test Reply = This is only a test If this was useful, it would say something Reply = If this was useful, it would say something quit Reply = quit C:\data\cs423_fs12\examples\IPv6\ipv6_client\Debug>
Example: Server Side - Linux cs423-cotter48 [rcotter@kc-sce-450p2 IPv6]$./server6_v2 23456 Connected to 2610:e0:a040:cdfd:e46d:ebb2:2057:d582 port = 1377 Server received: This is a test Server received: This is only a test Server received: If this was useful, it would say something Server received: quit ^C [rcotter@kc-sce-450p2 IPv6]$
cs423-cotter49 References RFC 2460 – IPv6 Specification RFC 2462 – IPv6 Stateless Address Autoconfig RFC 3056 - Connection of IPv6 Domains via IPv4 Clouds RFC3315 – DHCPv6 RFC 4443 – ICMP v6 RFC 4861 – Neighbor Discovery Protocol RFC 2553 – Basic Socket Interface Extensions for IPv6 Computer Networks and Internets – 5ed – Comer, Prentice Hall, 2009 CCIE Routing and Switching Certification Guide 4 ed – Odom, Healy, Donohue – Cisco Press, 2010 Computer Networks 5 ed – Tanenbaum, Wetherall – Prentice hall, 2011 Data and Computer Communications 9 ed – Stallings – Prentice Hall, 2011
cs423-cotter50 Summary IPv6 Needed SOON! Deployment much slower than expected. IPv6 very different from IPv4 –Much more flexible –More secure –Less overhead for routers Interworking with IPv4 will be needed for a long time.