This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[Question] DHCP client IP time out period depends on switch



Hello all,

I have question about dhcp client time out.

I'm working on TI MCU for DHCP client part. When I had test with almost switch and DHCP server for getting DHCP IP, it works fine. ( At that time, I set 10 sec for DHCP time out )

However, when I tested with Dell switch and DHCP server, I couldn't get DHCP IP. After I expanded DHCP timeout (1min), I could get DHCP IP from DHCP server ( around 40~45 sec).

My question is which elements can affect to DHCP IP assignment speed?

Is there any way to check it?

 

Thank you in advance.

  • Have you tried using WireShark to see the flow of DHCP requests? You should see the broadcast go out from the MCU relatively quickly.

    Todd 

  • 6327.timeout 1min_OK_140721.zip

    Todd,

    Yes, I already checked Wireshark, but I couldn't see any clue.

    When client send DHCP discover signal , server reply offer signal in a second, even less than that.

    Totally, discover-offer-request-ack process is in very fast.  

    But the problem is client send DHCP discover signal very late like 35~40 sec later after system starts.

    The attached zip file is wireshark file what I captured.

    192.168.200.1 : DHCP server

    192.168.200.199 : user PC

    192.168.200.200 : DHCP client

    Could you check for me?

    Ronie

  • What is your application doing at the beginning? Do you have higher priority tasks running that would starve the NDK's main thread? Can you put a breakpoint on the EMAC driver's transmit call and see how long it takes to get hit.

    Todd

  • Todd,

     

    Basically, my application runs DHCP service before main function. DHCP service is running when TI-RTOS is set up to MCU. So I think any task can not interfere with DHCP service because task starts to run after main function. Is it correct?

     

    Ronie

  • Ronie,

    I took a look at your Wireshark capture, thanks for sending that.

    I only see DHCP requests for a host with a "Hitachi" MAC address.  This host gets the IP 192.168.200.188.  What is this host?  Is it another PC on your network?

    I also see that host *.199 is constantly trying to ping *.200.  But there is never any response from *.200 (the MCU).


    Based on this capture, I'm not sure that the MCU was running at the time.  Either that, or the MCU has not yet sent its discover packet.  Can you please try to capture again?

    Also, what's the MAC address of your MCU?


    You can use the "bootp" filter to see all of the DHCP transactions, as shown in the above screen shot.  Then you can look at the MAC address labeled "source" in the DHCP offer.  Do you see an offer coming from the MAC of your MCU?

    Steve