DHCP Lease Issue

Discussion to talk about software related topics only.
Post Reply
craiglindley
Posts: 19
Joined: Sat Apr 26, 2008 6:19 am

DHCP Lease Issue

Post 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
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: DHCP Lease Issue

Post 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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
craiglindley
Posts: 19
Joined: Sat Apr 26, 2008 6:19 am

Re: DHCP Lease Issue

Post by craiglindley »

I do not have a switch between the dsl modem/router and the mod 5270.
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: DHCP Lease Issue

Post 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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
thomastaranowski
Posts: 82
Joined: Sun May 11, 2008 2:17 pm
Location: Los Angeles, CA
Contact:

Re: DHCP Lease Issue

Post 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--|
craiglindley
Posts: 19
Joined: Sat Apr 26, 2008 6:19 am

Re: DHCP Lease Issue

Post 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.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: DHCP Lease Issue

Post 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.
User avatar
Forrest
Posts: 286
Joined: Wed Apr 23, 2008 10:05 am

Re: DHCP Lease Issue

Post 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)
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
Post Reply