[ECOS] IP configuration

Dan Searles DanS@bops.com
Tue Jan 29 10:02:00 GMT 2002


Would it be possible to get a few more details on "configuring" an IP
address, in regards to the 'Original Message' below?

I've added 'ecosconfig add net' to my "configuration" of ecos. The
build goes ok, and the sample(s) compile, but I think I'm running
into the problem mentioned below, with RedBoot intercepting
packets.

I would like to just get to the point where I could provide
the defines for:
CYGHWR_NET_DRIVER_ETH0_ADDRS_IP
CYGHWR_NET_DRIVER_ETH0_ADDRS_NETMASK
CYGHWR_NET_DRIVER_ETH0_ADDRS_BROADCAST
CYGHWR_NET_DRIVER_ETH0_ADDRS_GATEWAY
CYGHWR_NET_DRIVER_ETH0_ADDRS_SERVER

but I'm not sure where I should put them, or what is
the proper way to do so.

Thanks

Dan Searles

-----Original Message-----
From: Hugo Tyson [mailto:hmt@redhat.com]
Sent: Friday, January 18, 2002 6:55 AM
To: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] BOOTP/DHCP failed on eth0



Robert Lee <rlee_1900@yahoo.com> writes:

> I got this message
> 
> BOOTP/DHCP failed on eth0
> 
> while calling init_all_network_interfaces().  
> 
> However, I am not using BOOTP/DHCP.  I use Assabet and
> the Compact Flash Ethernet has a fixed IP address. 
> The  networking is ok because I can use "load" (by
> tftp) in RedBoot.

To expand a little on Jifl's reply... 

RedBoot is using a fixed IP address for the Compact Flash Ethernet.
That works OK because you can use "load" (by tftp) in RedBoot.

The application is trying to bring up the application network stack using
BOOTP/DHCP, as is the default behaviour of init_all_network_interfaces().

> RedBoot> fconfig
> Run script at boot: false 
> Use BOOTP for network configuration: false 

That only controls RedBoot's behaviour, not the eCos application at all.[1]
 
> Does anybody know what's wrong and how to fix it?

Think of the application (test program, eCos program) as a completely
separate host which happens to use the same physical hardware as RedBoot.

They must have different IP addresses.  The system distinguishes packets
intended for RedBoot from packets intended for the application stack, by
the IP address alone.

NB, if you statically configure the app to have the same IP address as
RedBoot's IP address, RedBoot will probably consume incoming packets
intended for the application.  I recommend using RedBoot's static IP as you
are doing, and using DHCP for the application, so that they end up with
distinct IP addresses.  This rules out using BOOTP for both RedBoot and the
app, because BOOTP/DHCP is keyed on ESA, which does not change, so RedBoot
and the app would acquire the same IP.

HTH,
	- Huge


[1] Exception: for some hardware the ESA is in RedBoot's fconfig Flash; the
    eCos app shares *that* information, alone, because the ESA must not
    change.
>  



More information about the Ecos-discuss mailing list