DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
IPv6
NuttX has supported the Internet Protocol Version 4 (IPv4) for many years. There have been fragments of IPv6 in the code base for many years as well, but these fragments were not more than place markers and not functional.
...
Current status: Basic functionality is complete and verified. That includes ICMPPv6 Neighbor Discover Protocol, IPCMPv6 Echo Request/Response (for ping6), TCP/IPv6, and UDP/IPv6. It has also been proven that you can support a platform with both IPv4 and IPv6 enabled.
Ethernet Driver Requirements
Basic Driver Requirements
In order to support IPv6, Ethernet drivers must do the following:
...
All existing NuttX Ethernet drivers have already been modified to support the requirements of the first two bullets. However, additional logic must be added to most of the existing Ethernet drivers to support the final requirement.
Multicast Address Filtering
Each Ethernet device connects to the Ethernet wire via a PHY and so potentially has access to every packet that passes on the wire. In promiscuous mode, that is the behavior that is desired but normally it is not: The amount of traffic that appears on the wire would swamp most modest MCUs in promiscuous mode. So instead, the Ethernet MAC hardware will support address filtering. That is, the hardware will look at the Ethernet header at the beginning of each packet and will ignore packets that do not have the desired information in the Ethernet header. The software will see only those filtered packets that are desired.
...
These interface is only required if IGMP is supported, but the underlying ability to program multicast address filtered is required for full IPv6 support. This interface exists in all Ethernet drivers but most are currently place holders and are to-be-provided. At present, only the STMicro STM32, the TI Tiva TM4C, and the Atmel SAM3/4 and SAMA5D3/4 Ethernet drivers support multicast hash tables. This capability will have to be added to any additional Ethernet drivers that are modified to support IPv6.
ICMPv6 Neighbor Discovery Protocol
The ICMPv6 Neighbor Discover protocol is the reason for this additional address filtering. The ICMPv6 Neighbor Discovery Protocol is the replacement for IPv4's ARP. It differents from ARP in the it is implemented not at the Ethernet link layer, but within the IPv6 layer. In order to receive broadcast packets to ICMPv6, the IPv6 Multicast address of 33.33.ff.xx.xx.xx is used, where the xx.xx.xx part derives from the IPv6 address. The Ethernet driver filtering logic must be modified so that it accepts packets directed to the that MAC address.
...
- STMicro STM32
- TI Tiva TM4C
- Atmel SAMA5D4
- NXP LPC17xx
Board Configurations
At present, there are three board configuration that are pre-configured to use IPv6: nuttx/boards/arm/tiva/dk-tm4c129x/configs/ipv6, {{ nuttx/boards/arm/stm32/stm32f4discovery/ipv6}}, and nuttx/boards/arm/tiva/tm4c1294-launchpad/configs/ipv6. These default configurations have only IPv6 enabled. But the README files at in those board directories describes how to enable both IPv4 and IPv6 simultaneously.
Ping
Ping from Host PC
Ping from Windows cmd Terminal
| Code Block |
|---|
ping -6 fc00::2
|
Ping from Linux shell
| Code Block |
|---|
ping6 fc00::2
|
Ping from the NuttShell (NSH)
| Code Block |
|---|
nsh> ping6 fc00::2
|
NSH ifconfig
IPv4 Only
CONFIG_NET_IPv4=y and CONFIG_NET_IPv6=n
...
NOTE: The detailed packet statistics only appear if CONFIG_NET_STATISTICS is enabled.
IPv6 Only
CONFIG_NET_IPv4=n and CONFIG_NET_IPv6=y
| Code Block |
|---|
nsh> ifconfig
eth0 Link encap: Ethernet HWaddr 00:1a:b6:02:81:14 at UP
inet6 addr:fc00::2
inet6 DRaddr:fc00::1
inet6 Mask:ffff:ffff:ffff::ffff:ffff:ffff:ff80
IPv6 TCP UDP ICMPv6
Received 0007 0000 0000 0007
Dropped 0000 0000 0000 0000
IPv6 VHL: 0000
Checksum ---- 0000 0000 ----
TCP ACK: 0000 SYN: 0000
RST: 0000 0000
Type 0000 ---- ---- 0000
Sent 0011 0000 0000 0011
Rexmit ---- ---- 0000 ----
|
Both IPv4 and IPv6
CONFIG_NET_IPv4=y and CONFIG_NET_IPv6=y
| Code Block |
|---|
nsh> ifconfig
eth0 Link encap: Ethernet HWaddr 00:1a:b6:02:81:14 at UP
inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0
inet6 addr:fc00::2
inet6 DRaddr:fc00::1
inet6 Mask:ffff:ffff:ffff::ffff:ffff:ffff:ff80
IPv4 IPv6 TCP UDP ICMP ICMPv6
Received 0047 000a 001c 0000 0004 000a
Dropped 0027 0000 0000 0000 0000 0000
IPv4 VHL: 0000 Frg: 0000
IPv6 VHL: 0000
Checksum 0000 ---- 0000 0000 ---- ----
TCP ACK: 0000 SYN: 0000
RST: 0000 0000
Type 0000 0000 ---- ---- 0000 0000
Sent 0033 000a 002f 0000 0004 000a
Rexmit ---- ---- ---- 0000 ---- ----
|
Tests, Applications, and Network Utilities
In addition to the core RTOS support IPv6, changes are also required to networking tests, to networking aware applications, and, of course, to all of the network utils (netutils).
...