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


Hello,

I find your mail below in the ecos-discuss and I got the same problem on an
ecosPRO 2.0.66.
My purpose is to initialize 2 Ethernet interfaces in a separate thread
because sometime one of them can be unplugged and then, we want to continue
the application on the plugged interface and, in the meantime, we want the
other one to wait until an ethernet link.
So that, I can't use init_all_network_interface().

Then I notice that :
- When the Eth0 (with static adress) is initialized before the second one
(with DHCP configuration), the DISCOVER packet never make it out onto the
wire.
- When the Eth0 (with static adress) is initialized after the second one
(with DHCP configuration), it works fine.
- When the 2 interfaces are initializes with static adress, it works fine.

we tryed a lot of other tests but we don't know how to avoid this problem.

Did you find a solution to solve your problem, and if so, is it possible to
share your solution ?

thank you and best regards,

Emmanuel Coullien



http://www.cygwin.com/ml/ecos-discuss/2007-07/msg00134.html


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
a.. From: "Mike Arthur" <arth2219 at gmail dot com>
b.. To: "Daniel Paape" <dpaape at amtelco dot com>
c.. Cc: ecos-discuss at ecos dot sourceware dot org
d.. Date: Tue, 17 Jul 2007 10:53:32 -0500
e.. Subject: Re: [ECOS] dhcp fails on second ethernet port
f.. References:
<8D5709AC1061E8499884E0CD03B75CBF02071A70@MAIL1.amtelco.com>

---------------------------------------------------------------------------
-----
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

---------------------------------------------------------------------------
-----

a.. References:
 a.. RE: dhcp fails on second ethernet port
   a.. From: Daniel Paape
   Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
   Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]


--
J'utilise la version gratuíte de SPAMfighter pour utilisateurs privés.
Ce programme a supprimé22236 d'e-mails spam à ce jour.
Les utilisateurs qui paient n'ont pas ce message dans leurse-mails.
Obtenez la version gratuite de SPAMfighter ici:
http://www.spamfighter.com/lfr


--
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]