DHCP configuration in Linux system (with experiment inside)

1. DHCP

DHCP (Dynamic Host Configuration Protocol)
Dynamic Host Configuration Protocol

(1) Benefits of DHCP
  • Reduce the workload of administrators
  • Avoid the possibility of input errors
  • Avoid IP address conflicts
  • Improved utilization of IP addresses
  • Convenient client configuration
  • When changing the IP address segment, there is no need to reconfigure each user's IP address
(2) DHCP allocation method
  • Automatic allocation: permanent use after being allocated an IP address
  • Manual allocation: IP address specified by the DHCP server administrator
  • Dynamic allocation: release the IP after use, for other clients to use
(3) DHCP lease process

1. The client requests an IP address.
When a DHCP client is started, the client does not yet have an IP address, so the client must obtain a legal address through DHCP

At this time, the DHCP client broadcasts the DHCP Discover information to find the DHCP server

2. When the server responds to the
DHCP server receiving the information requesting the IP address from the client, it searches its own IP address pool to find out whether there is a legal IP address provided to the client.
If so, the DHCP server marks the IP address and adds it To the DHCP Offer message, and then broadcast a DHCP Offer message

3. The client selects the IP address. The
DHCP client extracts the IP address from the first DHCP Offer message it receives, and the DHCP server that issued the IP address reserves the address so that the address cannot be assigned to another DHCP client.

4. The server confirms the lease. After the
DHCP server receives the DHCP Request message, it broadcasts a successful confirmation to the client in the form of a DHCP ACK message. The message contains the valid lease of the IP address and other configurable information.
When the client receives the DHCP ACK message When, configure the IP address to complete the initialization of TCP/IP

Second, the experiment topic

Insert picture description here
Configure DHCP configuration on ensp The
configuration is as follows:

Insert picture description here
Insert picture description here
Insert picture description here
The Linux configuration is as follows:

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_51468875/article/details/110823027