This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Temporary IP address assignment trick
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Grant Edwards <grante at visi dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 20 Mar 2003 11:36:37 +0000
- Subject: Re: [ECOS] Temporary IP address assignment trick
- References: <20030319164731.A26896@visi.com>
Grant Edwards wrote:
I've noticed that a couple embedded devices I've played with
allow you to assign an IP address temporarily using an arp
trick...
If the device starts up with no IP address, and it subsequently
receives an Ethernet frame with its MAC address, the IP stack
will adopt the IP address in that frame as its own. Typically
one then points a telnet client or web browser at the device
and configures its IP address permanently.
[snip]
This is a very handy way to get a brand-new-out-of-the-box
embedded device up and running without requiring a DHCP server.
How hard would it be to get either of the eCos stacks to behave
like that?
This looks very similar to Reverse ARP, or RARP:
<http://www.networksorcery.com/enp/rfc/rfc903.txt>. This technique is
older than BOOTP I believe. Looking at the man page for rarpd, I see it
has a -A option that's probably what you're seeing.
RARP servers certainly exist and are used, although it'd probably be
better to implement "real" RARP (for all it is) if anything, then a
kludged ARP, although we could do the latter as an option of course.
As for getting the stacks to do it - I'd have thought it would be pretty
simple - you only need to change init_all_network_interfaces.
One slightly annoying thing with the stack is that it "pretends" it got a
DHCP/BOOTP address even if it's statically defined - sticking stuff in the
global eth0_bootp_data structure (bad namespacing, no biscuit). The same
would unfortunately have to happen for RARP.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss