Socket Programming with IPv6. Why IPv6? Addressing and routing scalability Address space exhaustion Host autoconfiguration QoS of flow using flowlabel.

Slides:



Advertisements
Similar presentations
IPv6 Addressing Details LAC NIC VII October 26, 2004 Wilfried
Advertisements

Chapter 10 IPv4 and IPv6 Interoperability. contents Introduction IPv4 Client, IPv6 Server IPv6 Client, IPv4 Server IPv6 Address Testing Macros IPV6_ADDRFORM.
Future Directions For IP Architectures Ipv6 Cs686 Sadik Gokhan Caglar.
Cs423-cotter1 Internet Protocol version 6. Outline Background IPv6 Structure Transition from IPv4 to IPv6 Example IPv6 Client / Server cs423-cotter2.
IPv6 The New Internet Protocol Integrated Network Services Almerindo Graziano.
1 IPv6 5A7CE IP Next Generation (IPv6) what?what? why?why? when?when?
Transitioning to IPv6 April 15,2005 Presented By: Richard Moore PBS Enterprise Technology.
1 Features of IPv6 Larger Address Extended Address Hierarchy Flexible Header Format Improved Options Provision For Protocol Extension Support for Auto-configuration.
Netprog: IPv61 IPv6 Refs: Chapter 10, Appendix A.
1 May, 2007: American Registry for Internet Numbers (ARIN) “advises the Internet community that migration to IPv6 numbering resources is necessary for.
IPv6 AL-MAJRASHI, FAHAD AL-MUQAIREN, FAHAD
The Future of TCP/IP Always evolving: –New computer and communication technologies More powerful PCs, portables, PDAs ATM, packet-radio, fiber optic, satellite,
PRIVATE NETWORK INTERCONNECTION (NAT AND VPN) & IPv6
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
1 IPv6. 2 Problem: 32-bit address space will be completely allocated by Solution: Design a new IP with a larger address space, called the IP version.
CS440 Computer Networks 1 IPv6 Neil Tang 11/10/2008.
IPv6. Major goals 1.support billions of hosts, even with inefficient address space allocation. 2.reduce the size of the routing tables. 3.simplify the.
IPv6 Addressing. Agenda OSI & TCP/IP Model IPv4 Addressing IPv6 Addressing.
IPv6 Victor T. Norman.
OverView Over View Introduction to IPv6Introduction to IPv6 IPv4 and IPv6 ComparisonIPv4 and IPv6 Comparison Current issues in IPv4Current issues in IPv4.
IPv6 The Next Generation Presented by Anna La Mura Jens Waldecker.
IPv4 & IPv6 Coexistence & Migration Joe Zhao SW2 Great China R&D Center ZyXEL Communications, Inc.
IPv4 - The Internet Protocol Version 4
Chapter 22 IPv6 (Based on material from Markus Hidell, KTH)
IPv4 and IPv6 Interoperability Chap 12. IPv6 Objectives  Expanded Addressing Capabilities  Header Format Simplification  Improved Support for Extensions.
1 Internet Protocol Version 6 (IPv6) What the caterpillar calls the end of the world, nature calls a butterfly. - Anonymous.
Network Layer IPv6 Slides were original prepared by Dr. Tatsuya Suda.
IP Version 6 Next generation IP Prof. P Venkataram ECE Dept. IISc.
2: Comparing IPv4 and IPv6 Rick Graziani Cabrillo College
1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol.
IP Version 6 (IPv6) Dr. Adil Yousif. Why IPv6?  Deficiency of IPv4  Address space exhaustion  New types of service  Integration  Multicast  Quality.
CS 6401 IPv6 Outline Background Structure Deployment.
1 IPv6 Address Management Rajiv Kumar. 2 Lecture Overview Introduction to IP Address Management Rationale for IPv6 IPv6 Addressing IPv6 Policies & Procedures.
1 IPv6 Refs: Chapter 10, Appendix A. 2 IPv6 availability Generally not part of O.S. Available in beta for many operating systems. 6-Bone is experimental.
IP Version 6 COMT 222. © 2005 Hans Kruse & Shawn Ostermann, Ohio University 2 Why change IP Number of addresses Routing Table Size Client configuration.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public BSCI Module 8 Lessons 1 and 2 1 BSCI Module 8 Lessons 1 and 2 Introducing IPv6 and Defining.
1 Netprog 2002 TCP/IP TCP/IP Transmission Control Protocol / Internet Protocol Based on Notes by D. Hollinger.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. © The McGraw-Hill Companies, Inc. IP version 6 Asst. Prof. Chaiporn Jaikaeo,
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Protocols 1 Objective: Build a protocol foundation for Client / Server programming in an Internet Environment Note: RFCs available from
CS 6401 IPv6 Outline Background Structure Deployment.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
CSC 600 Internetworking with TCP/IP Unit 7: IPv6 (ch. 33) Dr. Cheer-Sun Yang Spring 2001.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
IPv4 to IPv6 Group A2 - Roland Hollis - EJ Chambers - Rachit Gupta.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
4: Network Layer4b-1 IPv6 r Initial motivation: 32-bit address space completely allocated by r Additional motivation: m header format helps speed.
Introduction to IPv6 ECE4110. Problems with IPv4 32-bit addresses give about 4,000,000 addresses IPv4 Addresses WILL run out at some point – Some predicted.
Network Layer by peterl. forwarding table routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer NAT, IPv6.
1 Review – The Internet’s Protocol Architecture. Protocols, Internetworking & the Internet 2 Introduction Internet standards Internet standards Layered.
CSE5803 Advanced Internet Protocols and Applications (13) Introduction Existing IP (v4) was developed in late 1970’s, when computer memory was about.
Chapter 3 TCP and IP 1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Internet.
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
IPv6 Internet Protocol, Version 6 Yen-Cheng Chen NCNU
Chapter 3 TCP and IP Chapter 3 TCP and IP.
IP Version 6 (IPv6).
Next Generation: Internet Protocol, Version 6 (IPv6) RFC 2460
Chapter 10 IPv4 and IPv6 Interoperability
The New Internet Protocol
LESSON 3.3_A Networking Fundamentals Understand IPv6 Part 1.
The New Internet Protocol
Guide to TCP/IP Fourth Edition
CSCI {4,6}900: Ubiquitous Computing
Chapter 20. Network Layer: IP
Refs: Chapter 10, Appendix A
IPv6, MPLS.
IPv4 and IPv6 Interoperability
Internet Protocol version 6 (IPv6)
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Socket Programming with IPv6

Why IPv6? Addressing and routing scalability Address space exhaustion Host autoconfiguration QoS of flow using flowlabel Mobile IP Multicast routing IP Security End to end semantics

3 IPv6 Design Issues Overcome IPv4 scaling problem  lack of address space. Flexible transition mechanism. New routing capabilities. Quality of service. Security. Ability to add features in the future.

4 IPv6 Headers Simpler header - faster processing by routers.  No optional fields - fixed size (40 bytes)  No fragmentation fields.  No checksum Support for multiple headers  more flexible than simple “protocol” field.

5 IPv4 Header VERSHL Fragment Offset Fragment LengthService Datagram IDFLAG TTLProtocolHeader Checksum Source Address Destination Address Options (if any) Data 1 byte

6 IPv6 Header VERSPRIO Hop Limit Flow Label Payload LengthNext Header 1 byte Source Address (128 bits - 16 bytes) Dest. Address (128 bits - 16 bytes)

7 IPv6 Header Fields VERS: 6 (IP version number) Priority: will be used in congestion control Flow Label: experimental - sender can label a sequence of packets as being in the same flow. Payload Length: number of bytes in everything following the 40 byte header, or 0 for a Jumbogram.

Netprog: IPv68 IPv6 Header Fields Next Header is similar to the IPv4 “protocol” field - indicates what type of header follows the IPv6 header. Hop Limit is similar to the IPv4 TTL.

9 Extension Headers Routing Header - source routing Fragmentation Header - supports fragmentation of IPv6 datagrams. Authentication Header Encapsulating Security Payload Header

Netprog: IPv610 IPv6 Addresses 128 bits - written as eight 16-bit hex numbers. 5f1b:df00:ce3e:e200:0020:0800:2078:e3e3 High order bits determine the type of address.

11 IPv6 Addressing The following address classes are defined  Unspecified: ::  Loopback::1  Multicast:FF0x:  Link-local:FE80:  Site-local:FE40:  Rest are Unicast and anycast addresses Unicast address composed of prefix and MAC address

12 IPv6 Addressing

13 IPv6 Aggregate Global Unicast Address 001TLA IDNLA IDSLA IDInterface ID TLA: top-level aggregation NLA: next-level SLA: site-level Interface ID is (typically) based on hardware MAC address

Netprog: IPv614 IPv4-Mapped IPv6 Address IPv4-Mapped addresses allow a host that support both IPv4 and IPv6 to communicate with a host that supports only IPv4. The IPv6 address is based completely on the IPv4 address.

Netprog: IPv615 IPv4-Mapped IPv6 Address 80 bits of 0s followed by 16 bits of ones, followed by a 32 bit IPv4 Address: IPv4 AddressFFFF 80 bits32 bits16 bits

Netprog: IPv616 Works with DNS An IPv6 application asks DNS for the address of a host, but the host only has an IPv4 address. DNS creates the IPv4-Mapped IPv6 address automatically. Kernel understands this is a special address and really uses IPv4 communication.

Netprog: IPv617 IPv4-Compatible IPv6 Address An IPv4 compatible address allows a host supporting IPv6 to talk IPv6 even if the local router(s) don’t talk IPv6. IPv4 compatible addresses tell endpoint software to create a tunnel by encapsulating the IPv6 packet in an IPv4 packet. No longer in use. Deprecated.

Netprog: IPv618 IPv4-Compatible IPv6 Address IPv4 Address bits32 bits16 bits 80 bits of 0s followed by 16 bits of 0s, followed by a 32 bit IPv4 Address:

19 Tunneling (done automatically by kernel when IPv4-Compatible IPv6 addresses used) IPv6 Host IPv6 Host IPv4 Routers IPv6 Datagram IPv4 Datagram

20 IPv6 Sockets programming New address family: AF_INET6 New address data type: in6_addr New address structure: sockaddr_in6 DNS lookup: getaddrinfo()

Netprog: IPv621 in6_addr struct in6_addr { uint8_t s6_addr[16]; };

Netprog: IPv622 sockaddr_in6 struct sockaddr_in6 { uint8_tsin6_len; sa_family_tsin6_family; in_port_tsin6_port; uint32_tsin6_flowinfo; struct in6_addrsin6_addr; };

Netprog: IPv623 Dual Server In the future it will be important to create servers that handle both IPv4 and IPv6. The work is handled by the O.S. (which contains protocol stacks for both v4 and v6):  automatic creation of IPv6 address from an IPv4 client (IPv4-mapped IPv6 address).

Netprog: IPv624 IPv4 client IPv4 client TCP IPv4 Datalink IPv6 client IPv6 client TCP IPv6 Datalink IPv6 server IPv6 server TCP Datalink IPv4 IPv6 IPv4-mapped IPv6 address

25 IPv6 Clients If an IPv6 client specifies an IPv4 address for the server, the kernel detects and talks IPv4 to the server. DNS support for IPv6 addresses can make everything work.  getaddrinfo() returns an IPv4 mapped IPv6 address for hosts that only support IPv4.

26 IPv6 - IPv4 Programming The kernel does the work, we can assume we are talking IPv6 to everyone! In case we really want to know, there are some macros that determine the type of an IPv6 address.  We can find out if we are talking to an IPv4 client or server by checking whether the address is an IPv4 mapped address.

Ipv4, Ipv6 Compatibility Introduction IPv4 Client, IPv6 Server IPv6 Client, IPv4 Server

Introduction Server and client combination  IPv4 IPv4(most server and client)  IPv4 IPv6  IPv6 IPv4  IPv6 IPv6 How IPv4 application and IPv6 application can communicate with each other. Host are running dual stacks, both an IPv4 protocol stack and IPv6 protocol stack

IPv4 Client, IPv6 Server IPv6 dual stack server can handle both IPv4 and IPv6 clients. This is done using IPv4-mapped IPv6 address server create an IPv6 listening socket that is bound to the IPv6 wildcard address

IPv6 client IPv6 server TCP IPv6 Data link Data link IPv4 TCP IPv4 client TCP IPv4IPv6 Data link Enet hdr IPv4 hdr TCP hdr TCP data Enet hdr IPv4 hdr TCP hdr TCP data Type080 0 Dport IPv4 mapped IPv6 address IPv6 listening socket, bound to 0::0, port 8888 IPv6 address 5flb:df00:ce 3e:e200:20: 800:2b37:64 26

IPv4 datagramIPv6 datagram AF_INET SOCK_STREAM sockaddr_in AF_INET SOCK_DGRAM sockaddr_in AF_INET6 SOCK_DGRAM sockaddr_in6 AF_INET6 SOCK_DGRAM sockaddr_in6 TCP IPv4 IPv6 UDP IPv4 sockets IPv6 sockets Address returned by accept or recvfrom IPv6 IPv4 IPv4 mapped

IPv6 client, IPv4 server IPv4 server start on an IPv4 only host and create an IPv4 listening socket IPv6 client start, call gethostbyname. IPv4 mapped IPv6 address is returned. Using IPv4 datagram

IPv4 datagramIPv6 datagram AF_INET SOCK_STREAM sockaddr_in AF_INET SOCK_DGRAM sockaddr_in AF_INET6 SOCK_DGRAM sockaddr_in6 AF_INET6 SOCK_DGRAM sockaddr_in6 TCP IPv4 IPv6 UDP IPv4 sockets IPv6 sockets Address for connect or sendto IPv6 IPv4 IPv4 mapped IPv6

Summary of interoperability between IPv4 and IPv6 clients and servers.