# FreeRTOS TCP+ Second IP Address on Interface

**URL:** <https://forums.freertos.org/t/freertos-tcp-second-ip-address-on-interface/7902>\
**Category:** Kernel\
**Created:** [June 7, 2019, 3:54pm UTC](https://forums.freertos.org/t/freertos-tcp-second-ip-address-on-interface/7902 "2019-06-07T15:54:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 7, 2019, 3:54pm UTC](https://forums.freertos.org/t/freertos-tcp-second-ip-address-on-interface/7902/1 "2019-06-07T15:54:34Z")

</div>

**[sebde](https://sourceforge.net/u/sebde/)** wrote on [Friday, June 07, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/938089c433/#65fe):

Hello,

is there any way to configure the TCP+ Stack to have a second IP Address on the same interface. The search told me about the TCP+/multi implementation but I didn’t find any additional informations about the progress and if it is possible to have a second IP Address on the same interface (not to have multiple interfaces). In general I search a solution for the following problem: per default my configuration will use DHCP to obtain a IP Address. I have a large timeout to get an IP via DHCP (5 minutes). After the timeout the IP Task will start with a configured default address (in my case calculated from the MAC-Address) to have a way to talk to the OS. Now I search for a solution to query infinitely for a DHCP Address, but also to reach to OS via its “Fallback IP” for the rare cases that there is no DHCP Server available. At the moment I need to wait the timeout period (5 Minutes) before the stack starts with the default address. Any ideas or informations are welcome, many thanks for your help.

Best regards  
Sebastian

---

<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:** [June 9, 2019, 10:03am UTC](https://forums.freertos.org/t/freertos-tcp-second-ip-address-on-interface/7902/2 "2019-06-09T10:03:33Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Sunday, June 09, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/938089c433/#2b71):

The reason that you find little information about +TCP /multi /IPv6, is that it is still under development. I did write some minimal documentation, which I will attach to this post.  
When using /multi, you can have multiple end-points on a single NIC.  
Make sure that the NIC will allow two or more MAC-addresses, that will be bound to IP-addresses. Each end-point has it’s own cycle, for instance: end-point-1 has a static address and will be up within a split-second. end-point-2 may be configured to use DHCP, and that may take more time.

In a meanwhile, +TCP /multi has been used/applied by several developers and it is stable. It still needs some adaptations to avoid security holes (as was previously done with the IPv4 branch.  
The /IPv6 option (which you can disable) will be further developed soon.

If you have more questions, don’t hesitate…

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 9, 2019, 10:22am UTC](https://forums.freertos.org/t/freertos-tcp-second-ip-address-on-interface/7902/3 "2019-06-09T10:22:39Z")

</div>

**[sebde](https://sourceforge.net/u/sebde/)** wrote on [Sunday, June 09, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/938089c433/#7661):

Hello Hein,

many thanks for this informations - it make the procedure much clearer. If I understand it right, for my use-case, I only need a second endpoint for my Interface (cause I only have one interface). One endpoint will have the static configured IP-Address (Fallback) and the other endpoint will be the default Endpoint with DHCP enabled. If I understand the function `FreeRTOS_FillEndPoint`right all my endpoints need also a dedicated MAC-Address?

Again, many thanks and best regards

Sebastian

---

<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:** [June 10, 2019, 10:34am UTC](https://forums.freertos.org/t/freertos-tcp-second-ip-address-on-interface/7902/4 "2019-06-10T10:34:53Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Monday, June 10, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/938089c433/#e358):

> If I understand the function `FreeRTOS_FillEndPoint()` right,  
> all my endpoints need also a dedicated MAC-Address?

Hm, good question. I’m afraid that at this moment each end-point must have a unique MAC-address. It would be more correct though, to allow multiple IP-addresses share the same MAC-address. I will test that.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 11, 2019, 9:10am UTC](https://forums.freertos.org/t/freertos-tcp-second-ip-address-on-interface/7902/5 "2019-06-11T09:10:26Z")

</div>

**[sebde](https://sourceforge.net/u/sebde/)** wrote on [Tuesday, June 11, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/938089c433/#cb8d):

Thanks for your help and the further investigation. I just thought about another “workaround” for my problem. Is it possible to restart the DHCP Discovery Process even after the default IP Settings in `FreeRTOS_IPInit` are active? If there is a possibility I could aim a timer that will try e.g. every 5 Minutes to get dynamic address via DHCP.

Best regards  
Sebastian
