Page 1 of 1

DHCP Lease Issue

Posted: Mon May 04, 2009 8:01 am
by craiglindley
Hello all,

I'm using a MOD5270 module as a web server for serving up some rather large files. Things are working really well except every couple of days my web server looses its IP address. I confirm this by looking at my DSL router and seeing that it has no knowledge of the web server as an active device.

I see in the dhcp.cpp code there is a defaulttmeout of 4 (seconds I think) and a defaultretry of 5. Is it possible that when the dhcp timer determines that it must issue a lease renewal request that my server is serving up a file for 2 - 3 minutes so the renewal is somehow lost?

I've been trying to understand the dhcp code but it is kinda hard to do out of context.

What happens if the code cannot renew its IP address does it keep trying or does it fail?

Thanks

Re: DHCP Lease Issue

Posted: Mon May 04, 2009 9:23 am
by Chris Ruff
When you say DSL router do you mean DSL Modem->Router?

Do you have a switch between the Router and the MOD5270?

If you do I would choose the switch as your problem.

Chris

Re: DHCP Lease Issue

Posted: Mon May 04, 2009 9:50 am
by craiglindley
I do not have a switch between the dsl modem/router and the mod 5270.

Re: DHCP Lease Issue

Posted: Mon May 04, 2009 10:05 am
by Chris Ruff
If there is no switch, then either:
- the the MOD5270 and the router interface hardware are occasionally not able to talk
- your code is growing somewhere and breaking the system library. (you're not 'new' or 'malloc' -ing are you?)
- or ??!!

I noted that an older MOD5270 I have here won't talk to my network occasionally, but the newer REV 3 boards don't suffer from that. Do you have a newer MOD5270?

I would go static IP and see if it stays up forever or not.

Chris

Re: DHCP Lease Issue

Posted: Mon May 04, 2009 10:43 am
by thomastaranowski
The netburner DHCP client will retry DEFAULTRETRY times. If it gets nothing back, then it just stops trying, leaving you with an offline target.

I would guess the problem is the DHCP server on the DSL router. See if you can set the DHCP lease time on your router to never time out, or a really long interval.

To diagnose the problem, put your target on a hub/switch, and attach your workstation to that hub. The idea is to set it up so that you can listen in on the netburner traffic. Then, use wireshark to sniff the local traffic and let it crank for awhile until you see the issue, being sure to do a capture filter for DHCP, otherwise you'll have massive logs.

Network should look like this (excuse the horrible ascii art).

Netburner----|
switch ----- router
Workstation--|

Re: DHCP Lease Issue

Posted: Mon May 04, 2009 11:51 am
by craiglindley
Thanks for the tips. I just changed to static IP addressing to see if I have a problem other than with DHCP. If I can go for a week I will assume the problem is with DHCP and not my code.

Re: DHCP Lease Issue

Posted: Mon May 04, 2009 12:51 pm
by rnixon
Hi,

I had a similar problem, and thought there was a post here (can't find it with search) indicating a problem with 2.1rcX. I needed to upgrade to 2.2rcX to fix it.

Re: DHCP Lease Issue

Posted: Mon May 04, 2009 1:33 pm
by Forrest
rnixon wrote:Hi,

I had a similar problem, and thought there was a post here (can't find it with search) indicating a problem with 2.1rcX. I needed to upgrade to 2.2rcX to fix it.

rnixon is right, this was a problem fixed in 2.2RC3. This was noted in the 2.2rc2 or 3 relase thread, but this got deleted when a newer release came out. I'll be sure not to delete these in the future.

You can download 2.3rc7 off the website, or if you need the 2.2rc3 release, create a support ticket at http://support.netburner.com and I'll set a link up for you. (2.2 and 2.3 have big NBEclipse project differences. If you developed on 2.0-2.2, you might want to stay on 2.2)