|
» |
|
|
|
The Bootstrap Protocol (BOOTP) allows a client system to discover
its own IP address, the address of a BOOTP server, and the name
of a file to be loaded into memory and executed. The bootstrap operation happens in two phases. In the first
phase, address determination and bootfile selection occur. This
phase uses the BOOTP server, bootpd. After the address and file name information is obtained,
control passes to the second phase of the bootstrap where a file transfer
occurs. This phase uses the TFTP server, tftpd. Address Determination and Bootfile Selection | |
The first phase involves a bootrequest packet
that is broadcast by the BOOTP client. A BOOTP server that receives
the bootrequest can send a bootreply to the
client if it finds the client's boot information in its database.
Or, it can relay the bootrequest to other BOOTP servers if it finds
relay information for the client in its database. The BOOTP client formulates a bootrequest that it will broadcast. Before
sending the bootrequest, the client does the following: It sets the hops field of the bootrequest packet to 0. Each time
a BOOTP server relays the client's bootrequest, the hops field is incremented by 1. If the hops value exceeds the maximum hop value configured
for this client on a BOOTP server, the bootrequest is dropped. The hops value limits the number of times a bootrequest
can be relayed. It sets the secs field of the bootrequest packet to 0 for a first-time request.
If the client does not receive a reply to this request, it sets the
value of this field to the number of seconds since the first request
was sent. If the value of the secs field is less than the threshold value configured
for this client on a BOOTP server, the bootrequest is dropped. The
threshold value ensures that enough time is allowed for a bootreply
to be received by the client before a subsequent bootrequest for
the same client is relayed. It sets the giaddr (gateway IP address) field to 0. If a BOOTP server
finds that this field is 0, it fills it with its own IP address.
The client broadcasts the bootrequest packet on
its first LAN interface (lan0). The bootrequest also contains the client's
hardware address, and, if known, its IP address. The BOOTP server checks to see if boot information
for the client is in its database. If boot information for the client
is available in the server's database, the server answers
the bootrequest with a bootreply packet. If the BOOTP server does not find boot information
for the client in its database, it checks to see if there is relay
information for the client. If there is no relay information for
the client in the database, the bootrequest is dropped. If there
is relay information available and the relay function is enabled
for the client, the server checks the following: Does the hops value in the bootrequest packet exceed the maximum
configured for the client? If it does, the request is dropped. If
not, the hops field in the bootrequest packet is incremented. Is the secs value in the bootrequest packet less than the
threshold configured on the server for the client? If it is, the
request is dropped.
If the request has not been dropped during the above checks,
the server then relays the bootrequest to the BOOTP server(s) that
have been configured for the client. If the giaddr field of the bootrequest packet is 0, the server
puts its IP address in the field.
Steps 3 and 4 are repeated until either the bootrequest is
received by a BOOTP server that finds boot information about the
client in its database, or the request is dropped. When a server finds client information about a particular
client in its database, the server answers the bootrequest with
a bootreply packet. The client's IP address is placed into
a field in the bootreply. The bootreply may also contain a file
name of a boot file, which the client should load with TFTP. Other
information that can be included in the bootreply are the client's
subnet mask, the addresses of nameservers, and the addresses of
gateways. If the bootrequest has been relayed to one or more BOOTP servers,
the bootreply is sent to the IP address in the giaddr field. This should be the IP address of the BOOTP
server that initially relayed the bootrequest. That BOOTP server
then sends the bootreply to the client. Figure 5-1 “Bootrequest Relay
Example” shows an example of a bootrequest
that is relayed from server A to server B to server C. Server C
finds the client's boot information in its database, and
sends the bootreply back to server A. Server A then sends the bootreply
to the client. | | | | | NOTE: BOOTP clients can be booted over a gateway; however,
the BOOTP server with the relay information for the client must
be on the same side of the gateway as the client. | | | | |
File Transfer | |
The second phase, file transfer by the BOOTP client using
TFTP, is optional. Some BOOTP clients use BOOTP only for IP address
resolution and do not use TFTP. If the boot file is transferred,
it must be publicly available.
|