This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: dhcp fails on second ethernet port


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]