The newest Internet protocol expands address space but at the cost of software changes and more memory.
Most networked equipment uses Internet Protocol version 4, or IPv4, which provides for about four billion 32-bit IP addresses. Concerns about exhausting these addresses--and other technical issues--led the Internet Engineering Task Force (IETF)to develop Internet Protocol version 6, or IPv6. This "new" protocol--IPv6 is over 10 years old--uses a 128-bit address field that covers 3.4x1038 unique addresses. While the IETF worked on IPv6, others developed the network address translation (NAT) that greatly expanded the Internet address space. So the IPv4 address space still has many unused addresses--between 400K and 800K as I write this.
But IPv6 goes not only increasing Internet addresses, it requires the use of IP security (IPsec) and adopted a new packet format that decreases header processing needs. Most application and transport layers within the standard ISO "stack" remain the same, and IPv6 still relies on the same transmission-control protocol (TCP) and user datagram protocol (UDP) inherent in IPv4. Yet, devices that use IPv6 cannot directly communicate with those that use IPv4, although both types of devices can coexist on a network. That network, though, requires routers that will work with both protocols.
So, how does IPv6 affect developers of embedded systems? According to Vishal Kakkad, software engineering manager at Lantronix, new networks of sensors provide a good application for pure-IPv6 devices because such networks do not have to conform to an existing deployment framework. "A network of wireless sensors can be quite large and you might not have IPv4 subnets available for them in a typical installation," said Kakkad.
In other cases, though, developers must create or update products to use both IPv4 and IPv6. Newer operating systems such as Windows Vista, Windows 7, Mac OS X, VxWorks, Nucleus, and ThreadX already include or add on a dual stack that can handle IPv6 and IPv4 communications. Those stacks include application program interfaces (APIs) for application code. "Older applications communicate only with IPv4," noted Kakkad. "So for those applications to communicate with an IPv6 end point, the stack must provide a transparent layer to do the transition from IPv4 to IPv6."
Thus developers must determine how best to include a dual stack in their software. "We went through that process with some of our products and it presented a large challenge," said Mike Zarns, director of engineering at Digi International. "It's difficult to expand an IPv4 stack to add IPv6, so we started fresh with a new stack that would support both from the beginning."
"People who have done network programming and worked with sockets shouldn't have problems using an IPv6 stack," said Zarns. "The API is fairly obvious, although the IPv4 and IPv6 APIs have a few small differences. A socket is basically a file-description holdover from the Unix world that indicates what type of communications an application needs to use. How you open and configure sockets determines whether an application uses IPv4, IPv6, or both protocols."
Developers must realize a dual-stack implementation will increase the amount of Flash and SRAM they need. "Although the stacks share a few things, they increase stack memory almost two fold," explained Zarns. "Also, a table that stores 32-bit IPv4 addresses now must store 128-bit IPv6 addresses, which increases memory requirements and processor overhead."
"Any IPv6 stack must pass rigorous certification tests specified by, for example, the US government and Department of Defense, which has its own certification demands," said Kakkad. "If you try to cut corners in an embedded device with an IPv6 stack, you can run into problems because your device cannot pass certification tests. Compliance requires a large amount of work and then certification requires even more." For those reasons, many developers purchase or license a certified dual-IP stack, or an operating system that includes such a stack.
Design teams can use industry-standard test suites to check for compliance. The TAHI Project (www.tahi.org) has developed conformance tests and interoperability tests for IPv6. The IPv6 Ready program (www.ipv6ready.org) provides access to free self-testing tool so designers can verify protocol implementation and validate the interoperability of IPv6 products. This program provides lists of certified hardware and software. For the Department of Defense document, "DoD IPv6 Standard Profiles For IPv6 Capable Products," visit: jitc.fhu.disa.mil/apl/ipv6/pdf/disr_ipv6_product_profile_v2.pdf.
The management of IPv4-to-IPv6 transition schemes requires continuing support. "It's essential that people understand how to deploy the IPv6 devices on a network," stresses Kakkad. "They cannot just provide an IPv6 device and connect it to a network. They must understand the overall network design and how it will let people within and outside an organization communicate."
For further reading
"Cisco IPv6 Certification Testing," http://www.cisco.com/web/strategy/docs/gov/IPv6CertificationTesting.pdf.
"Beej's Guide to Network Programming Using Internet Sockets," http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html#theory.
"Transition from IPv4 to IPv6," http://www.tascomm.fi/~jlv/ngtrans/.