Bug 58420 - Cannot set IP address manually
Summary: Cannot set IP address manually
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: eCos
Classification: Retired
Component: RedBoot
Version: CVS
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: eCos bugs internal list
QA Contact: eCos bugs internal list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-16 10:09 UTC by Alex Schuilenburg
Modified: 2007-04-18 16:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-02-05 13:33:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Alex Schuilenburg 2002-01-16 10:09:55 UTC
Description of Problem:
You cannot manually set the IP address of a board without using fconfig, and 
fconfig is not available if you do not have flash (e.g. i386 floppy 
bootstrap). fconfig should be used to preserve the settings through reboot, as 
well as keep the startup script.  But if flash is not available, you should 
still be able to set everything manually that you can set via fconfig (except 
startup script, although an alternative may be ppossible).

How Reproducible:
Every time


Steps to Reproduce:
1. Bootstrap i386 platform from floppy, without BOOTP
2. Try set IP address et al.
3. 

Actual Results:
No way to set IP address et al

Expected Results:
Should be able to set IP address et al manually

Additional Information:

Comment 1 Hugo Tyson 2002-02-04 17:41:00 UTC
Just FYI: this is not so simple as it seems.  Eg. setting the IP address:
the network interface et al initializes itself during startup.  If you have
flash and use "fconfig ip_address 10.1.2.3" this HAS NO EFFECT until you
next reboot the board (or start some other instance of RedBoot).  In general
fconfig commands do not have immediate effect.  So having a set of key-value
pairs that you can mess with does not achieve anything *unless* they can
persist over a reset.  That makes sense, so long as RAM is preserved over
reset; but if you have to wreck RAM as part of auto-sizing it, methinks you
just can't do it - or you must save the RAM size in there also, and defend
strongly against mistaking random RAM contents at power-on for good RAM size
and config info.

I guess for the x86 from floppy, the BIOS has already wrecked RAM contents
for us during the traditional memory test?  So this is a dead end for 
the specific platform mentioned?

	- Huge


Comment 2 Alex Schuilenburg 2002-02-04 18:20:37 UTC
You appear to mis-understood the problem. It is not an issue of having the IP
address set up on boot/startup. It is an issue of being able to set the IP
address manually, if at all, on platforms where no 

The current method gives us three mechanisms:
* fconfig, for which flash/persistent storage is required
* BOOTP, for which a BOOTP/DHCP server is required
* Hard coded in the redboot image itself

I used the PC platform as an example. It has no persistent storage. This means
that I have to create either a RedBoot image that does DHCP on startup, or I
have a hard-coded IP address for RedBoot. This means for multiple PC platforms I
either have to use BOOTP, or create multiple RedBoot images. This is not going
to be a suitable solution for everyone, hence my request to be able to set the
IP address within the RedBoot prompt.

Comment 3 Hugo Tyson 2002-02-04 19:27:07 UTC
I understand fine.  I clarify that a quick fix to make fconfig operate
only on a RAM buffer in the absence of flash, is no fix at all for
this problem.

That was all.

	- Huge

Comment 4 Jonathan Larmour 2002-02-05 13:33:00 UTC
Hugo is right about fconfig.

But still I wonder about what just setting __local_ip_addr anyway, perhaps by a
new command (the set/settings command discussed before?). I think it may "just
work" since the net stack, and the code that uses it, is quite simple. The only
extra thing needed would be a call to net_io_init().

There's a few more complications if we also allow changing an existing valid IP
address, rather than an unset one, e.g. for closing connections and cleaning up
the stack, but that isn't very difficult either.

Not that I have time to do anything about it anyway of course!




Comment 5 George Thomas 2002-04-03 15:26:04 UTC
I added a new command "ip_address" which can set both the local IP address
as well as the default server address.


Note You need to log in before you can comment on or make changes to this bug.