lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Strategy Question for DHCP


From: Robert Deschambault
Subject: Re: [lwip-users] Strategy Question for DHCP
Date: Thu, 28 May 2015 16:47:46 -0400

Ok, here is what I am doing.  We are using CMSIS-RTOS/RTX on an STM32F4xx MCU, so we are using a threaded environment.  It is very similar to using FreeRTOS.  We are using lwIP v1.4.1.  Why we aren't using the master branch is another story to be left for another day.  The system is very stable, DHCP is working fine, we have several services running simultaneously and we are running several clients and have run them continuously for several weeks now.  Everything is great.  I am trying to enable autoip in cooperation with DHCP and I have attached a winmerge report and patch file to show what modifications I did to the autoip.c code to accommodate our IP address pool.

When I am running with this code, DHCP works fine and I can ping the assigned IP address with no problems.  When I disable DHCP assignment the autoip seems to work fine, I see the target report an IP assignment, but when I try to ping that address I don't get a response for my modified code.  I have attached wireshark records for the nominal and modified autoip cases.  The device in question has a MAC of 5e:70:12:95:92:1e.  In the modified code scenario the target is reporting an IP assignment of 192.168.252.11 but I can't ping it.  Actually, I can't ping the target in the nominal autoip configuration either.  If anyone can make a suggestion or comment it would be greatly appreciated.  I have placed several files at the link below:

https://drive.google.com/folderview?id=0B6k4_-oSl6qBflNXdXp5QUhlSWpROG5IYVZKeW9sNzBkSjRUbWFieDR5Uno3ZjFrWWRCVXM&usp=sharing


On Wed, May 27, 2015 at 3:17 PM, Zach Smith <address@hidden> wrote:

Sounds like you are almost there. Since you are getting the auto assigned link local address I assume you are calling autoip_start() and autoip_tmr() at the appropriate interval (AUTOIP_TMR_INTERVAL msces).

 

I’m not sure why you are not able to ping the address. Wireshark should show your device query for the address once the dhcp time-out hits. Then I think once it has taken the address you should see a gratuitous ARP for that address. When you start pinging from the PC Wireshark should show an ARP query first (Who has 169.254.x.x?) then the ping request. Is the device answering the ARP query from the PC? The PC must be on the same subnet of course.

 

So, you are not using the standard auto ip net (AUTOIP_NET         0xA9FE0000)? If you are changing that, maybe there is something else you didn’t quite get changed right?

 

Maybe attaching your Wireshark capture would help.

 

From: lwip-users-bounces+zsmith=address@hidden [mailto:lwip-users-bounces+zsmith=address@hidden] On Behalf Of Robert Deschambault
Sent: Wednesday, May 27, 2015 11:58 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Strategy Question for DHCP

 

Hi,

 

I have tried to use the approach with no success so far.  I needed to tweak the IP address pool to be compatible with our network.  I hope that isn't a problem.  In lwipopts.h I have:

 

// AUTOIP options

#define LWIP_AUTOIP             1

#define LWIP_DHCP_AUTOIP_COOP   1

#define LWIP_DHCP_AUTOIP_COOP_TRIES 3

 

and the DHCP tries is set to 6 in our application.  I can see our target board waiting for DHCP and then falling over to a valid address for our pool.  But I can't ping that address.  Wireshark shows the request for the local link address, but not much more than that.  Am I missing something?

 

Bob


--
Bob Deschambault

reply via email to

[Prev in Thread] Current Thread [Next in Thread]