Dr. Sanjay P. Ahuja, Ph.D. Professor School of Computing, UNF Goals of Ipv6
Total Page:16
File Type:pdf, Size:1020Kb
IPv6 Dr. Sanjay P. Ahuja, Ph.D. Professor School of Computing, UNF Goals of IPv6 1. Support billions of hosts, even with inefficient address space utilization. 2. Reduce the size of routing tables. 3. Simplify the protocol to allow routers to process packets faster. 4. Provide better security. 5. Support for real-time data. 6. Permit the old and new protocols to co-exist for years. 2 IPv6 vs. IPv4 1. IPv6 is compatible with TCP, UDP, ICMP, OSPF, and DNS. 2. IPv6 addresses are 128 bits (16-bytes) providing an effectively unlimited supply of Internet addresses. 3. IPv6 header is simplified compared to IPv4 header. It contains only 8 fields (vs. 13 in IPv4) thus allowing routers to process packets faster and so improving throughput. 4. IPv6 has better support for options. Options are represented so that it is simpler for routers to skip over options not intended for them. This speeds up packet processing. 5. IPv6 represents an advance in security: authentication and privacy are features of the new IP. 3 IPv6 Formats • The IPv6 packet has the general form: 40 bytes | 0 or more extension headers -------- | IPv6 header Extension Extension Transport level Header ……… header PDU (e.g. TCP segment) Extension headers defined include: 1. Hop-by-hop Options header: defines special options that require hop-by-hop (at each router) processing at every router. 2. Routing header: similar to IPv4 source routing. 3. Fragment header: contains fragmentation and reassembly information. 4. Authentication header: provides packet integrity and authentication. 5. Encapsulating Security Payload header: provides privacy (encryption). 6. Destination Options header: contains optional information to be examined by the ultimate destination of the IP datagram. 4 IPv6 Formats … • Note that the IPv6 header and each extension header include a NextHeader field (except the Encapsulating Security Payload header). This field identifies the type (of header) immediately following the header. • If the next header is an extension header then this field contains the type ID of that header. Else this field contains the protocol ID of the higher layer (transport layer) protocol using IPv6 (e.g. TCP or UDP). This ID is the same as used by IPv4 to identify the receiving transport protocol. 5 IPv6 Formats … • 6 IPv6 Header • 7 IPv6 Header Fields • Version (4-bits): Specifies the IP version, i.e. 6. • DS (6-bits) and ECN (2-bits): These are fields represent Differentiated Services and Explicit Congestion Notification, respectively. These 2 fields have replaced the old Type of Service field (also 8-bits) in IPv4. – DS field is similar to the Type of Service field and marks how the router should treat packets and if the router treats packets differently based on the service. – ECN field lets the source routers know of a router’s congestion before the router actually starts to drop packets so that the source routers can slow down their data transmission rate before the router actually needs to drop packets. Of the 2-bits in this field, the most significant bit (MSB) represents ECT (ECN Capable Transport) and the LSB represents CE (Congestion Experienced). • Flow Label (20-bits): Relates to QoS issues. It allows source and destination to set up a pseudo-connection within the IP layer (not an actual VC) with particular properties and requirements. Each flow is identified by <source address, destination address, flow #> so that many flows may be active between a given pair of IP addresses. 8 IPv6 Header Fields … • Payload Length (16-bits): Its name has been changed from Total Length in IPv4 since the 40 header bytes is no longer counted as part of the length as it used to be. • Next Header (8-bits): The reason that the IPv4 header could be simplified is that now there can be additional (optional) extension headers. The Next Header field indicates what this optional header is (if any). If none, this field specifies the TCP or UDP protocol used, thus replacing 2 fields of IPv4: IP Options and Protocol. – If there is an extension header(s), then the last extension header’s Next Header field will indicate TCP or UDP protocol (i.e. TCP or UDP segment will follow). • Hop Limit (8-bits): Is the TTL of IPv4, renamed to reflect the way it is actually used. • Source and Destination Addresses (128-bits or 16-bytes each): Thus the IPv6 header is always 40 bytes long. Considering that IPv6 addresses are 4-times the length of IPv4 addresses, the IPv6 header size (40 bytes) compares favorably with the IPv4 header size of 20 bytes in the absence of options. 9 IPv6 Address Space Allocation • There are 2^128 = 3 * 10^38 addresses (of 16-bytes each) if the addresses are assigned with 100% efficiency. This gives 7 * 10^23 addresses per square meter if the entire earth, land and water were covered with computers! – In practice, the address space will not be used efficiently. Still, IPv6 is predicted to provide over 1000 addresses per square meter of the earth’s surface! • There are 2^128 = 3 * 10^38 addresses (of 16-bytes each) if the addresses are assigned with 100% efficiency. This gives 7 * 10^23 addresses per square meter if the entire earth, land and water were covered with computers! – In practice, the address space will not be used efficiently. Still, IPv6 is predicted to provide over 1000 addresses per square meter of the earth’s surface! This is more than enough even if toasters, computers, TVs, PDAs, smart phones have IP addresses (toasters even on Mars)!! 10 IPv6/IPv4 Address Embedding • IPv4 and IPv6 will coexist for at least a decade. IPv6 hosts must be capable of talking to each other with some of the infrastructure between them only supporting IPv4. Also IPv4 nodes (routers) should be able to talk to other IPv4 and IPv6 nodes indefinitely. • Two types of mechanisms: dual-stack and tunneling. • In dual-stack mode, IPv6 nodes run both IPv6 and IPv4 and use the Version field to decide which stack should process an arriving packet. Here the IPv6 address could be unrelated to IPv4 address or the ―IPv4-mapped IPv6 address‖ (80 zeros – 16 ones – IPv4 address) is used (arriving from nodes that only understand IPv4). • In tunneling, an IPv6 packet is encapsulated within an IPv4 header that has the tunnel end point in its header and then transmitted across the IPv4 only network and de-encapsulated at the end point (either a node or a host). In either case, the end point must be able to process the IPv6 packet after de-encapsulation. 11 IPv4-Mapped IPv6 Addresses • These are regular IPv4 addresses that have been mapped into the IPv6 address space, and are used for devices that are only IPv4-capable. They have a set of 16 ones (FFFF in hex) after the initial string of 80 zeroes, and then the IPv4 address. So, if an IPv4 device has the address 222.1.41.90, it would be represented as 0:0:0:0:0:FFFF:222.1.41.90, or ::FFFF:222.1.41.90. 12 IPv4-Compatible IPv6 Addresses • These are special addresses assigned to IPv6-capable devices, such as so-called ―dual stack‖ devices that speak both IPv4 and IPv6. They have all zeroes for the middle 16 bits; thus, they start off with a string of 96 zeroes, followed by the IPv4 address. An example of such an address, would be 0:0:0:0:0:0:101.45.75.219 in mixed notation, or more succinctly, ::101.45.75.219. 13 IPv6 Extension Headers • 14 IPv6 Extension Headers … • The only field common to all extension header types is the Next Header field. The 8-bit Next Header field is used to logically link all the headers in an IPv6 datagram as follows: – The Next Header field in the main header contains a reference number for the first extension header type. – The Next Header field in the first extension header contains the number of the second extension header type, if there is a second one. If there's a third, the second header's Next Header points to it, and so on. – The Next Header field of the last extension header contains the protocol number of the encapsulated higher-layer protocol (e.g. TCP). • Example: An IP datagram that encapsulates TCP has a Hop-By-Hop Options extension header and a Fragment extension header. Then, the Next Header fields of these headers would contain the following values: • The main header would have a Next Header value of 0, indicating the Hop-By-Hop Options header. • The Hop-By-Hop Options header would have a Next Header value of 44 (decimal), the value for the Fragment extension header. • The Fragment header would have a Next Header value of 6 (for TCP). 15 IPv6 Option Extension Header Types • The two extension header types are: • Destination Options: Contains options that are intended only for the ultimate destination of the datagram • Hop-By-Hop Options: Contains options that carry information for every router between the source and destination • IPv6 Option Format • Each of these header types has a one-byte Next Header field, and a one-byte Header Extension Length field that indicates the header’s overall length in 8-byte words. The rest of the header has one or more option fields. Each option is expressed as a <Type, Data Length, Data Value> tuple. 16 IPv6 Option Extension Header Types … • 17 IPv6 Extension Headers (Jumbograms) • The Hop-By-Hop Options is used to support datagrams that exceed 64K (jumbograms). • The Next Header specifies the type of the next header.