[ECOS] Temporary IP address assignment trick
Jonathan Larmour
jifl@eCosCentric.com
Thu Mar 20 11:43:00 GMT 2003
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
More information about the Ecos-discuss
mailing list