[ECOS] dhcp fails on second ethernet port

Mike Arthur arth2219@gmail.com
Tue Jul 17 15:53:00 GMT 2007


Daniel,

Do you have any problems with your eth0 dhcp & eth1 static
configuration when eth0's dhcp lease expires?

I am running eCosPro 2.0.51, with an in house HAL.  I have found that
if I ping flood eth0, it stops responding once its dhcp lease expires.
 If I run with eth0 dhcp and eth1 disabled in my configuration, there
isn't an interruption when eth0's lease expires.

I am still trying to track down the source of this problem,
Mike



On 7/9/07, Daniel Paape <dpaape@amtelco.com> wrote:
> Thank you Andrew...  I had been concentrating on the stack code.  I'll
> take a closer look at the state machine.
>
> Dan
>
> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Sunday, July 08, 2007 1:37 PM
> To: Daniel Paape
> Cc: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] dhcp fails on second ethernet port
>
> On Fri, Jul 06, 2007 at 11:36:21AM -0500, Daniel Paape wrote:
> > Hello,
> >
> > I'm running eCos2.1 on a MIPS variant (w/ bsd_tcip) and am having some
> trouble getting the second Ethernet port to configure via DHCP.? Both
> ports are connected to the same switch.? Eth0 has a statically
> configured (10.9.8.188) address while eth1 is set to configure from a
> DHCP server providing 192.168.20.x addresses.? If I reverse the
> assignments (eth0 DHCP & eth1 static) the ports work fine.? I am not
> calling 'init_all_networks()' rather, I call (what I believe to be) the
> common init code 'cyg_net_init()' and then by way of two threads each
> associated with a specific port, " call 'dhcp_config(port)' or
> 'init_net("ethx", &bootp_data)'.
> >
> > When the second port attempts DHCP, the DISCOVER packets never make it
> out onto the wire, which I believe is due to the variable 'isbcast' in
> the 'ip_output routine evaluating to zero as a consequence of the
> RTF_HOST flag being set.? It's as if -any- established route interferes
> with subsequent DHCP configuration.
> >
> > Does anyone have any idea as to what might be occurring?
>
> I think you are right about a route on the other interface causing
> problems. Take a look at the state machine and the way it clears out
> the routing tables when doing DHCP. It might be better to use
> init_all_network interfaces().
>
>        Andrew
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list