IPv6
The next generation internet protocol
The emNet IPv6 add-on is an optional extension which can be be integrated seamlessly into your emNet TCP/IP application. The emNet implementation of the Internet Protocol version 6 (IPv6) allows you a fast and easy transition from IPv4-only applications to dual IPv4 and IPv6 applications. It combines a maximum of performance with a small memory footprint.
Overview
The Internet is currently undergoing the biggest upgrading process so far. IPv4 as the established routing and transit protocol for the Internet has reached its limits and IPv6 is intended to replace IPv4 in the near future.
The name IPv6 is commonly used as a generic term for an Internet protocol suite and summarizes the following protocols:
- Internet Protocol version 6 (IPv6)
- Internet Control Message Protocol (ICMPv6)
- Neighbor Discovery Protocol (NDP)
- Multicast Listener Discovery (MLD)
IPv6 has a larger address space, supports stateless address autoconfiguration and makes extensive use of multicasting. The IPv6 protocol header is designed to simplify processing by routers and is extensible for new requirements.
The most conspicuous difference between IPv4 and IPv6 is the length of the address. The length of an IPv6 address is 128 bits, compared to 32 bits in IPv4. The address space therefore has 2^128 addresses. Today public IPv4 addresses have become relatively scarce. This problem can be solved by using IPv6.
Key features
- Low memory footprint
- Easy to implement
- Internet Protocol version 6 (IPv6)
- Internet Control Message Protocol (ICMPv6)
- Neighbor Discovery Protocol (NDP)
- Multicast Listener Discovery (MLD)
- Stateless Address Autoconfiguration (SLAAC)
- Standard socket interface
- Seamless integration into the emNet stack
- No configuration required
Internet Protocol Header Comparison
A simple way to understand the differences between IPv4 and IPv6 is to compare the structure of their headers. The IPv6 header has a fixed length of 40 bytes and does not include any options. Contrary to IPv4, options are stored in extension headers. The benefit of this separation is that a router never needs to parse the header. As a result, processing is more efficient, although the header size is at least twice the size of an IPv4 header.
The IPv6 header contains the Internet Protocol version, traffic classification options, the length of the payload, the optional extension or payload which follows the header, a hop limit and the source and destination addresses.
Compared to the IPv4 header, the number of header elements is lower. Unnecessary or ambiguous elements such as header checksum or IHL were removed. Other elements like Time to live, which is in practice used as hop limit, were renamed.
The IPv6 Header
The IPv4 Header
Comment
Porting an IPv4 Application to IPv6
TCP/IP applications written using the socket API have enjoyed a high degree of portability in the past. This portability was kept in mind when the socket API was extended to support IPv6. Complete compatibility to existing IPv4 applications is always ensured. In addition to smaller enhancements like some new socket options, a new socket address structure has been added to carry IPv6 addresses.
The emNet IPv6 add-on comes with sample applications, which demonstrate how simple IPv4 applications can be ported to IPv6. Sample applications for other emNet add-ons like the Web Server or the FTP Server are part of the emNet IPv6 shipment.
IPv6 Resource Usage
ROM usage depends on the compiler options, the compiler version and the CPU used. The memory requirements of the IPv6 modules presented in the tables below have been measured on a Cortex-M3 system. Details about the further configuration can be found in the sections of the specific example.
ROM Usage
The resource usage of the IPv6 add-on has been measured on a Cortex-M3 system size optimization.
Add-On | ROM |
---|---|
emNet IPv6 | Approx. 8.00 KByte |
RAM Usage
The total memory requirements of the IPv6 add-on can basically be computed as the sum of the following components:
Add-On | RAM |
---|---|
emNet IPv6 Add-On | Approx. 200 Byte |
Unicast address | n * approx. 48 Byte |
Multicast address | n * approx. 28 Byte |
NDP entry | n * 52 Byte |
An IPv6 target with two unicast addresses, four Multicast addresses and five NDP entries needs app. 660 bytes additional RAM. For detailed information about the configuration and the memory requirements for each TCP/UDP connection, refer to the emNet manual.
The required memory is taken from the memory pool of the stack. For further information about how to increase the memory pool, please refer to IP_AssignMemory() of the emNet manual.
Relevant parts
The IPv6 add-on implements the relevant parts of the following Request For Comments (RFC):
RFC# | Description |
---|---|
[RFC 2460] | Direct Link: Internet Protocol, Version 6 (IPv6) Specification |
[RFC 2464] | Direct Link: Transmission of IPv6 Packets over Ethernet Networks |
[RFC 2710] | Direct Link: Multicast Listener Discovery (MLD) for IPv6 |
[RFC 3306] | Direct Link: Unicast-Prefix-based IPv6 Multicast Addresses |
[RFC 3587] | Direct Link: IPv6 Global Unicast Address Format |
[RFC 3590] | Direct Link: Source Address Selection for the Multicast Listener Discovery (MLD) Protocol |
[RFC 3810] | Direct Link: Multicast Listener Discovery Version 2 (MLDv2) for IPv6 |
[RFC 4291] | Direct Link: IP Version 6 Addressing Architecture |
[RFC 4443] | Direct Link: Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification |
[RFC 4861] | Direct Link: Neighbor Discovery for IP version 6 (IPv6) |
[RFC 4862] | Direct Link: IPv6 Stateless Address Autoconfiguration |
[RFC 5952] | Direct Link: A Recommendation for IPv6 Address Text Representation |