[comp.protocols.tcp-ip] bootp/rarp

hedrick@aramis.rutgers.EDU (Charles Hedrick) (01/08/88)

I am sending a copy of bootp to Jeff under separate cover.  We recommend
using bootp rather than rarp where possible:
  - it is designed to go through gateways.  You can boot a large
	network of cisco equipment from a single boot host (or from
	more than one, as long as they are all on one subnet) if
	if want to.  THis may be convenient for networks where it
	is not practical to have servers at each location.
  - it does not need a kernel change to install.  Rarp does not use
	TCP or UDP, so you need to hack some kernel tables if your
	system doesn't already implement it.  Note that Sun, which
	does claim to implement it, often can't be used to boot
	cisco equipment, because Sun's RARP drops all but one request
	when it gets several at once.
Bootp requests that your kernel have an ioctl to install a new
ARP table entry.  This is needed in order to get the response back
to the requestor.  Obviously the requestor is not yet in a position
to respond to an ARP request.  4.3, and most vendor-supplied versions
of 4.2, has such a call.

kre@munnari.oz (Robert Elz) (01/13/88)

I have a small box that has a prom monitor, and wants to use some
protocol to discover its IP address (or might want to, if it hasn't
been configured).

I currently use rarp, and would like to add bootp as an alternative.

My problem is that bootp requires sending udp to the IP broadcast
address, and that is something which (unfortunately) isn't a
constant.  That is, on many cables in the world, packets with
255's in them will be forwarded, or dropped, or just about anything
other than what you would hope.  There are many networks that still
use 0's as the broadcast address, regardless of whether or not that's
the right thing to do.

I don't much like this as a solution, but I'm contemplating sending
the broadcast to 255.255.255.255 initially, and if that works, fine.
If there's no response, I'll try 0.0.0.0 and see if that might happen
to succeed.  Then alternate.  I'm not sure if 4.2 really accepted
0.0.0.0 as a broadcast address, or only net.0, and I no longer have
virgin 4.2 sources around to check it.  Anyone know for sure?

Also, any opinions on mangling bootp this way?  Please don't bother
saying "ignore the 0 stuff", that's not acceptable.

kre

mminnich@UDEL.EDU (Mike Minnich) (01/15/88)

> I'm not sure if 4.2 really accepted
> 0.0.0.0 as a broadcast address, or only net.0, and I no longer have
> virgin 4.2 sources around to check it.  

Robert,

Last I tried using 0.0.0.0 as a BOOTP broadcast address in a 4.2
environment, most if not all of our  Unix UDP servers went belly-up,
into some kind of tight loop.  Since at the time I was interested in
making BOOTP work, I decided to use a hard-wired (non-broadcast) IP
address and wait for 4.3 to resolve the broadcast problem.

Hope this helps.  

mike

PS - I didn't try net.0, but I would strongly suspect that it would work.

ddp+@ANDREW.CMU.EDU (Drew Daniel Perkins) (01/16/88)

I'm pretty sure that the original 4.2bsd only supported net.0.  I'm sure Mike 
Karel's will correct me if I'm wrong...  We were faced with the same problem 
when we implemented a BOOTP for PCIP (IBMPC).  My solution was to use 
255.255.255.255 as the defautl, as was specified by the RFC.  However I left a 
hook to extend it to net.0 if desired.  With PCIP, the IP address is normally 
stored on a disk and is loaded into memory at boot time.  All programs use the 
IP address in memory, not the disk.  Thus, my BOOTP program modified the IP 
address in memory after it found the address.  However, it figures out which 
broadcast address to use by seeing what is in memory when it starts, which is 
the IP address on the disk.  If the address is 0.0.0.0, it uses the default of 
255.255.255.255.  However, if it is stored as net.0 or net.subnet.0, it uses 
that as the address.  This is not per the spec, but I couldn't think of 
anything it would break.  Currently all of our PC's are configured to use 
128.2.0.0 since we still have plenty of 4.2 machines.  Of course if you are 
using a ROM and can't even store this much info (i.e. you don't have an EEPROM 
or battery backed up memory or...) then I don't think there is going to be 
much you can do.

Drew