FreeRTOS-TCPIP DHCP issue

Do I need to proactively close all TCP and UDP connection sockets and re establish sockets if the IP address changes when using DHCP?
If I call the “FreeRTOS_SetEndPointConfiguration” function to change the IP, do I need to proactively close all TCP and UDP connection sockets and re establish them?

Hi @hane_vv,
For TCP, it’s mandatory to re-establish connection because it keeps communication info via 3 way handshake. So the IP/port addresses are important for peer to know who you are.

For UDP, IMHO, it’s possible to not re-establish connection as client side, but it depends on your application. If you’re using DTLS or somethings have dependency with previous messages, you might need to re-establish the connection to re-communicate. As server side, you still need a method to tell clients that your IP address has been changed.

Thank you.

1 Like