The problem with using
Reverse Address Resolution Protocol (RARP)
(
RFC 903) for assigning IP addresses to clients
is that it operates at the data link layer and is therefore limited to the local LAN.
Bootp however uses IP/UDP (port 67 for the server destination port, and port 68 for the client source port) and can cross routers.
If a client does not know its own IP address when it boots up then it can utilise a
Bootp
server to obtain its IP address. It will use a IP broadcast address
of 255.255.255.255. This IP broadcast is transmitted in a link-layer broadcast of FFFF.FFFF.FFFF.
If the client is on the same LAN as the Bootp server, then the Bootp server will
respond to the broadcast, by using the MAC address of the client, and the IP address will be given to the client. If the Bootp
server is on another LAN i.e. on the other side of a router then we are left with the
situation whereby broadcasts are being sent by the client and the router is designed not to
pass broadcasts. Consider the following scenaro:
Note that the TCP/IP stack needs to be in place on the client, since the client needs to be able to send an IP broadcast (not
a layer 2 broadcast!).
DHCP works slightly differently from Bootp. The following steps occur when a client retrieves IP configuration details
from a DHCP server:
The DHCP server may have a number of scopes configured for different subnets, it knows from which subnet
a request comes from because the unicast sent from the local router contains the source IP address of the LAN interface on
which the client's broadcast request was received.
RFC 951 describes Bootp in detail
whereas
RFC 2131 describes DHCP in detail
(superceding
RFC 1541).