Differences Between DHCP and BOOTP in Router IP Assignment

Currently, routers primarily use DHCP and BOOTP for IP assignment. DHCP, which stands for Dynamic Host Configuration Protocol, evolved from BOOTP. BOOTP was originally designed for networks with diskless hosts. The following analyzes the differences between these two methods.

1. DHCP can be considered an enhanced version of BOOTP. It consists of two components: a server side and a client side. All IP network configuration data is centrally managed by the DHCP server, which handles DHCP requests from clients;

clients use the IP environment data assigned by the server. Compared to BOOTP, DHCP uses the concept of a "lease" to effectively and dynamically allocate TCP/IP settings to clients, and for compatibility considerations, DHCP fully accommodates the needs of BOOTP clients.

2. At least one DHCP server must be operating on the network. It listens for DHCP requests and negotiates the TCP/IP configuration environment with clients. It provides two IP allocation methods:

a. Automatic Allocation: Once a DHCP client successfully leases an IP address from the DHCP server for the first time, it uses that address permanently.

b. Dynamic Allocation: After leasing an IP address from the DHCP server for the first time, the client does not use the address permanently. When the lease expires, the client must release the IP address so it can be used by other workstations. Of course, the client can renew the lease with higher priority than other hosts or lease a different IP address.

3. In addition to dynamically setting IP addresses, DHCP can reserve specific IPs for machines with special purposes. It can assign fixed IP addresses based on hardware addresses, giving you greater design flexibility.

Furthermore, DHCP can help specify the router, netmask, DNS Server, WINS Server, and other settings for the client. On the client side, besides checking the DHCP option, virtually no manual IP environment configuration is needed.

4. Locating the Server. When a DHCP client first logs onto the network鈥攎eaning the client detects no IP data configuration locally鈥攊t sends a DHCP DISCOVER packet onto the network.

Since the client does not yet know which network it belongs to, the source address of the packet is 0.0.0.0, and the destination address is 255.255.255.255. The packet also carries the DHCP discover information, broadcasting it to the network.

5. Offering an IP Lease. When the DHCP server detects the DHCP discover broadcast sent by the client, it selects the first available IP address from the pool of unleased addresses, packages it with other TCP/IP settings, and responds to the client with a DHCP OFFER packet. Since the client does not have an IP address at the start, its DHCP discover packet includes its MAC address information.

6. Accepting the IP Lease. If the client receives responses from multiple DHCP servers on the network, it selects only one DHCP offer and sends a DHCP request broadcast packet to the network, informing all DHCP servers which server's offered IP address it will accept. The client also sends an ARP packet to the router to query whether any other machine on the network is using that IP address;

if it finds the IP is already occupied, the client sends a DHCPDECLINE packet to the DHCP server, rejecting its DHCP offer, and resends the DHCP discover message.

7. Upon receiving the client's DHCP request, the DHCP server sends a DHCPACK response to the client, confirming that the IP lease is officially in effect, thus completing a full DHCP working process. Once the DHCP client successfully obtains a DHCP lease from the server, unless the lease expires and the IP address is reset to 0.0.0.0, it no longer needs to send DHCP discover messages. Instead, it will directly use the already leased IP address to send DHCP request messages to the previous DHCP server. The DHCP server will try its best to let the client use the original IP address, and if there are no issues, it will directly respond with a DHCPACK to confirm.

From the process described above, it is easy to see: DHCPDISCOVER is performed via broadcast, which can only occur within the same

Leave a Comment

Your email address will not be published.