Wednesday, September 08, 2010

  • Print
  • |
  • |
  • Reprints
  • |
  • RSS
  • |
 

TCP/IP Embedded Internet Applications - The Network Layer, Part 2: IPv6, ICMP and UDP

Part 2 of an excerpt from the book "TCP/IP Embedded Internet Applications" covers IPv6 and extended addressing capability, the Internet control message protocol (ICMP) and using the user datagram protocol (UDP).

Edward Insam

Page 1 of 5

[Part 1 of this article looks at the IP header, the IP checksum and fragmentation.]

IPv6
The current IP address scheme of 32-bit words is fast becoming inadequate. It would appear that 232 = 4 294 967 296 combinations of addresses should be enough for everybody, but in practice this is not so. Address ranges are sub-divided into classes, making many subsets of addresses unusable. Furthermore, with the advent of small-scale appliance networking, we shall soon need IP addresses for every component and subcomponent of equipment in an office, factory or the home. The next generation of IP protocols is generically known as version 6, or IPv6. The areas it addresses are described in the following text.

Extended addressing capability. The current 32 bit IP addresses are extended to 128 bits. A more comprehensive hierarchical scheme is also defined to subdivide the address into ranges. Broadcast and multicast addresses are combined into three generic systems: (a) Unicast, any packets sent to a unicast address are always delivered only to the interface identified by the address; (b) Anycast, an identifier for a set of addresses belonging to different nodes (a packet sent to an anycast address is sent to one of the interfaces described by that address); and (c) Multicast, one that identifies a number of interfaces that will typically belong to different nodes (packets sent to a multicast address are delivered to all interfaces identified by that address).

Simplified header format. Many of the fields used in IPv4 are rarely used at present. The new IPv6 header includes only those fields that are necessary (Figure 7-8).

Figure 7-8: IPv6 datagram format

Version: a 4 bit nibble set to six. Priority: the next nibble of 4 bits, which defines the priority of this packet with respect to others. Flow label: a 24 bit field used by the source to identify packets for which special handling may be required. Payload length: a 16 bit field denoting the size of the user payload in bytes. Next header: an 8 bit field identifying the type of header that follows the IP header. Codes here are the same as those used for IPv4, but also include extension headers. Hop limit: a field equivalent to the TTL field in IPv4. Finally, the two 128 bit source and destination addresses.

The way current IP options are encoded have been improved to allow for greater flexibility and to provide a more flexible approach for further options in the future. IPv6 also introduces the concept of series of packets belonging to a traffic flow. This allows sets of packets to have special characteristics such as quality of service and real-time service. Additional extensions are used to allow authentication, data integrity, checking and confidentiality. Some aspects of IPv6 are still under development.

The transition between IPv4 and IPv6 will take a long time and is not going to be very easy. Most existing IPv4 systems will be in use for many years to come, so do not expect an overnight switch. Luckily, IPv6 has been designed to coexist with IPv4 and many new designs can carry traffic from both environments and at the same time. It is recommended that any new designs should be 'IPv6 ready'. That is, they should be able to handle both IPv6 and IPv4 traffic. IPv6 is described in more detail in RFC 1883, 2460 and 2373. Mechanisms for transitioning between IPv4 and IPv6 are found in RFC 1933.

Page 2: Internet Control Message Protocol (ICMP)
Page 3: Implementing ping
Page 4: User Datagram Protocol (UDP)
Page 5: Implementing a simple UDP transaction

Page 1 2 3 4 5
Intel Embedded Design Center