• AVR Freaks

Hot!What does the Stack dio if the DHCP Lease expires

Page: 12 > Showing page 1 of 2
Author
NKurzman
A Guy on the Net
  • Total Posts : 18847
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
2020/03/24 15:08:23 (permalink)
0

What does the Stack dio if the DHCP Lease expires

I am having an issue with a fielded unit using Harmony V1.11
The Unit works fine after a reboot.  But some time later the IP Address shows up as 0.0.0.0.  The Other network Parameters appear to be normal. Is this related to a DHCP lease renewal issue?
Is this something the Stack would do if there was failure to renew the lease?
Or is it something the DHCP Server would send under some condition?
I am aware of the function TCPIP_DHCP_InfoGet() but it is not in my current build.
 
#1

27 Replies Related Threads

    rainad
    Moderator
    • Total Posts : 1384
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/25 06:24:09 (permalink)
    0
    What is the static IP address that's used for the network configuration?
    If the lease renewal fails, the IP address will revert to the static one. Maybe that's what you see.
     
    The DHCP should re-contact the server to ask for a 'rebind'.
    But there's been some changes/fixes in the DHCP service since v1.11.
    Would it be possible to use the latest version of DHCP or at least to port some of the updates to your version?
     
    P.S. If you have a console on that board, there is a command "dhcp eth0 info" that will give some details.
     
    #2
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/25 07:07:32 (permalink)
    0
    rainad
    This just popped up up at one location. (I hope)
    I will check the default IP address.
    It my be 0.0.0.0. Maybe I should make it 127.0.0.1?
    Yes I can compare the 2.06 to the 1.11 release and see if I can update just DHCP.
    No console available in this implementation
    I think TCPIP_DHCP_InfoGet() provides some good information. I will have to make a screen to display it.

    Thank you for the information.
    #3
    rainad
    Moderator
    • Total Posts : 1384
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/26 07:08:49 (permalink)
    0
    A static address will be good as a backup as long as it's a valid address on that network. Otherwise it's useless. So I guess 0.0.0.0 is OK.
    The DHCP issue needs to be solved.
    Let me know if you have issues with porting the DHCP and I may be able to help.
     
     
    #4
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/26 07:37:50 (permalink)
    0
    Then 0.0.0.0 it is.
    There’s no way to know what a valid address would be on one of our many different customers networks.

    No the porting actually went fairly smoothly.
    The DHCP filed just swapped with one external macro in a different header file.
    I see you were quite busy. It appears to be almost a complete rewrite.
    I assume the only way to verify this would be to try it at my customer site where it doesn’t work.
    Are you aware of any specific DHCP servers that V1.11 did not work with?
    #5
    rainad
    Moderator
    • Total Posts : 1384
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/26 07:47:45 (permalink)
    0
    Yes, there were some major changes to that module: allowing new options to be added in a modular way, providing debug options, improving the rebind, renew phase, etc.
     
    Most of the DHCP servers allow configuration. So you can set a fairly short lease and see that the DHCP module correctly requires the lease again and the rebind process is successful. You can use the debug symbol in the dhcp_private.h:
    #define TCPIP_DHCP_DEBUG_MASK (0x13)
    i.e enable the TCPIP_DHCP_DEBUG_MASK_LEASE_EVENTS | TCPIP_DHCP_DEBUG_MASK_CONN_EVENTS | TCPIP_DHCP_DEBUG_MASK_STATUS
    and that will even show at the console the progress of the DHCP and the events.
    You can do this on a test board, that has a console attached, not necessarily on the customer board.
    I hope that will give you a good idea that the lease renewing works fine.
     
    #6
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/26 08:10:09 (permalink)
    0
    My issues is that V1.11 works fine on my company network, and at my house.
    This issue is currently at one customer site. I’m not sure what DHCP server they are using. But I do know the least time is only one or two hours. After the expiration their logs show our unit requesting a lease once a minute. With our unit showing the default IP on the screen.
    Would knowing what DHCP server software they are using provide any insight as to why the only their location has this issue. (I assume not them for now).
    #7
    rainad
    Moderator
    • Total Posts : 1384
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/26 11:14:20 (permalink)
    0
    There were some fixes in v2.06, so I'd still suggest you use the latest DHCP version instead of v1.11.
    But knowing that DHCP server/router and making some tests directly on that one it's a must in this case, to get to the bottom of it.
     
    #8
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/26 11:38:02 (permalink)
    0
    Thank You rainad, I will send a Copy to my Customer and see if it solves the Problem.
    #9
    friesen
    Super Member
    • Total Posts : 2147
    • Reward points : 0
    • Joined: 2008/05/08 05:23:35
    • Location: Indiana, USA
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/27 12:17:44 (permalink)
    0
    About the only way to really figure this out is going to be to capture a wireshark.  Alternately I suppose you could implement some heavy debug logs of the dhcp packets, or process.  DHCP isn't done exactly the same everywhere unfortunately.  Hopefully MCHP has tested a lot of scenarious with the module.  The interface doesn't happen to be a wilc module, does it?

    Erik Friesen
    #10
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/27 13:12:51 (permalink)
    0
    The Fun of selling Network-able products.  The Service Person is not a Computer specialist. They pass though our request to the locations network people.  All in a far away State. With a Pandemic going on.  Wire shark logs would answer some Questions.  If I can get them.  At this point it appears easier to send a new build with the V2.06 DHCP Client.  If that does not work, maybe I capture the packets to USB and see if that helps.
    #11
    friesen
    Super Member
    • Total Posts : 2147
    • Reward points : 0
    • Joined: 2008/05/08 05:23:35
    • Location: Indiana, USA
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/27 13:26:05 (permalink)
    0
     I have felt that pain.  That is why one of the products I deal with has a wireshark to usb drive lib that can be started and stopped by normal people, I just use some special key presses to get it started and stopped.  It is relatively easy to implement, you basically just have to intercept the packets and forward them to the save library.  I did it in Harmony 2.04 on the ethernet interface.

    Erik Friesen
    #12
    friesen
    Super Member
    • Total Posts : 2147
    • Reward points : 0
    • Joined: 2008/05/08 05:23:35
    • Location: Indiana, USA
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/27 13:33:29 (permalink)
    0
    I have a bit of doubt about the wilc1000 firmware, I occasionally have issues with DHCP on it, and I'm not sure whether to blame the FreeRTOS tcp stack or the module.  When you connect a debug tool to the module, it spits out data about every dhcp transaction.  So some sniffing is going on with the packets in the module, which I don't completely trust software wise.
     

    Erik Friesen
    #13
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/27 14:11:21 (permalink)
    0
    I was thinking more of trapping the Packet that the DHCP code gets.  Then I can look at it or feed it in the debugger and see why it is rejected.
    Hopefully the Patch fixes it.  If not rainad may need to see the packets.
    I will work to get wire shark logs if it does not. I am keeping my hopes up.
    #14
    rainad
    Moderator
    • Total Posts : 1384
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/30 06:41:57 (permalink)
    0
    It'd be helpful too if you can get some details about what server is used where the situation occurs. Then we can test/investigate a bit, maybe we understand what's going on. Unfortunately some servers have a 'non standard' behavior.
     
     
    #15
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/03/30 07:22:53 (permalink)
    0
    Rainad If the V2.06 code does not work I will take you up on that. I am hoping it’s something that you already fixed. V1.11 is several years old.
    #16
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/04/02 14:18:12 (permalink)
    4 (1)
    An Update.  Using the V2.06 DHCP Client fixed one of the two sites where I was having a lease renewal issue.
    The Second site has not been updated Yet.
     
    Thank rainad.
    #17
    rainad
    Moderator
    • Total Posts : 1384
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/05/05 08:28:29 (permalink)
    5 (1)
    Hi NKurzman,
     
    Any update on this, is the DHCP working as expected or you still have issues with it?
    You mentioned that it's not solved 100%.
     
    #18
    NKurzman
    A Guy on the Net
    • Total Posts : 18847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: What does the Stack dio if the DHCP Lease expires 2020/05/05 11:45:50 (permalink)
    0
    Thanks for checking back.  It appears better but I am not sure it is fixed.
    One site stopped after 2 days but after a reset worked for several weeks.
    Another site switch their authentication server. This stopped out communication, But did not affect other equipment.
    I am not sure this one is fair.  I will need to set up a private network with wire shark to test this.  My building's network is a 10 day lease.
    So, I am not sure at this time.
    #19
    aschen0866
    Super Member
    • Total Posts : 4572
    • Reward points : 0
    • Joined: 2006/01/08 22:18:32
    • Location: San Diego
    • Status: offline
    Re: What does the Stack dio if the DHCP Lease expires 2020/05/05 16:05:25 (permalink)
    0
    When I was troubleshooting DHCP related issue, I used Cisco RV130 router, which allows the DHCP lease time to be set to minutes instead of hours.
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5