DHCP takes some time

Hi I’m noticing some long time for a DHCP address to be assigned to our system. It could take up to 6 or 7 seconds for vApplicationIPNetworkEventHook() callback function to be called. The system is connected to a Westermo POE switch. Could you tell me about the reasons for this? Anything special that I could look on the network with wireshark? thanks

DHCP takes some time

WireShark would be useful, but I’m afraid you will only see the broadcast packets, and not the unicast between DHCP server and device. You could try out the Windows demo and run it from your laptop: in that case you can see the complete DHCP negotiations. Or if your device is able to send logging, you could enable debug logging in FreeRTOSIPConfig.h: ~~~

define ipconfigHASDEBUGPRINTF 1

if( ipconfigHASDEBUGPRINTF == 1 )

extern void uart_printf( const pcFormat, ... );
#define FreeRTOS_debug_printf(X)    uart_printf X

endif

~~~ DHCP may last a while, but I think that 7 seconds is very long.

DHCP takes some time

How long would you consider an acceptable time for DHCP negotiations?

DHCP takes some time

I just tried out the pc demo program with DHCP enabled, find attached a PCAP. The DHCP server in my router needs 2 seconds to send an answer. Btw, all packets are broadcasted, so wireshark might also be able to follow a remote DHCP session

DHCP takes some time

Hi We have disabled DHCP on the Wetermo switch and 2 things happened: 1) The vApplicationIPNetworkEventHook() is called with a Network UP event after 37 seconds showing an IP address of 0.0.0.0 2) Some ARP requests are being sent to the Network every 30 seconds with both source and target addresses as 0.0.0.0 see the attachments please. Any ideas?

DHCP takes some time

An the starup file attachment

DHCP takes some time

Apparently the Hirschamnn switches we are using take something like 380 seconds to perform an acknowledgement of a DHCP request! We have experimented the Westermo switches and they take a reasonable time of less than 2 seconds for the Acknowledge to be issue. When the Westermo switch is powered up it takes longer. I have seen times between 7 and 10 seconds. So far FreeRTOS IP stack is found innocent of any wrong doings 🙂