FreeRTOS TCP+ Second IP Address on Interface

sebde wrote on Friday, June 07, 2019:


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

heinbali01 wrote on Sunday, June 09, 2019:

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…

sebde wrote on Sunday, June 09, 2019:

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_FillEndPointright all my endpoints need also a dedicated MAC-Address?

Again, many thanks and best regards


heinbali01 wrote on Monday, June 10, 2019:

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.

sebde wrote on Tuesday, June 11, 2019:

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