# FreeRTOS+TCP with multiple interfaces and IPv6

**URL:** <https://forums.freertos.org/t/freertos-tcp-with-multiple-interfaces-and-ipv6/12992>\
**Category:** Libraries\
**Created:** [July 4, 2021, 3:20pm UTC](https://forums.freertos.org/t/freertos-tcp-with-multiple-interfaces-and-ipv6/12992 "2021-07-04T15:20:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [July 4, 2021, 3:20pm UTC](https://forums.freertos.org/t/freertos-tcp-with-multiple-interfaces-and-ipv6/12992/1 "2021-07-04T15:20:22Z")

</div>

We all know that the Internet is running out of IPv4 addresses. Yet only a few companies / developers are taking the effort to make the step from IPv4 to IPv6. I was also lazy in this, and so is my ISP.

**IPv6 is great!** I like it because we get rid of [NAT routers](https://en.wikipedia.org/wiki/Network_address_translation). Your embedded device will get a public IP-address. It can communicate **directly** with any other device in the world. But it can also be reached by any device. When using NAT, the latter was possible but complicated.

Already 5 years ago I started developing a new branch: “Multi/IPv6”. It has support for multiple interfaces and endpoints. This is a must when you want to use IPv6. A device usually gets both a local link IP address ( `fe80::` ), and a public address ( e.g. `2001::` ). And of course the device will continue to support IPv4.

I know of a few developers and companies who adopted IPv6, but not many.

This year we also added a DHCPv6 client, so now you can chose to use either Router Advertisement ( RA ) or DHCPv6 to obtain IPv6 addresses. RA is preferred by many developers.  
Why RA: because it only provides a prefix, the device can choose its own public IP. It will test if the randomly chosen IP-address already exists, and then use it.

**My ISP has no IPv6** , but fortunately they do provide a public IPv4 address, which allows me to get IPv6 Internet access! I am using a [Raspberry PI](https://www.raspberrypi.org/) which makes a “6-in-4” tunnel to a server, in my case [Hurricane Electric](https://tunnelbroker.net). The Raspberry serves as an IPv6 router: it forwards all IPv6 packets to the Internet and it passes the replies back to the sender. Even my PC now has IPv6 access to the Internet, because it works totally transparent.

If anyone is interested in the details of setting up a “6-in-4” tunnel I will happy to publish a summary here.

The FreeRTOS Multi/IPv4 branch can be downloaded [here](https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/tree/labs/ipv6_multi).

Why do I write all this? We would like to get feedback from users, like [@setdebug](https://github.com/setdebug) in [his post here](https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/issues/235). And of course you can always ask questions about the IPv6 in this forum.

Here is some more to read:

> **[FreeRTOS+TCP Multiple Interfaces - FreeRTOS](https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/freertostcp-multiple-interfaces.html)**
>
> FreeRTOS+TCP is currently an IPv4 TCP/IP stack, but IPv6 functionality along with support for multiple network Interfaces is available as a FreeRTOS Labs project. The IPv6/Multi-interface version is fully functional but still undergoing optimization,...

> **[IPv6 - FreeRTOS](https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/IPv6/index.html)**
>
> FreeRTOS+TCP is currently an IPv4 TCP/IP stack, but IPv6 functionality along with support for multiple network Interfaces is available as a FreeRTOS Labs project. The IPv6/Multi-interface version is fully functional but still undergoing optimization,...
