1. DHCP request process and messages
Hosts in the local area network often move, increase or decrease, and it is necessary to allocate and manage IP addresses for the hosts in the local area network.
Advantages: Dynamically obtain addresses, the network environment is complex and the scale is relatively large
Message type |
The main function |
DHCP-DISCOVER |
Broadcasted by the DHCP client to find available DHCP servers on the network. |
DHCP-OFFER |
The DHCP server is used to respond to the client's DHCP-DISCOVER request and specify corresponding configuration parameters for the client. |
DHCP-REQUEST |
The DHCP client broadcasts to the DHCP server to request configuration parameters or lease renewal. |
DHCP-ACK |
The DHCP server notifies the client that the assigned IP address and configuration parameters are available |
DHCP-NAK |
The DHCP server notifies the client that the address request is incorrect or the lease has expired and the lease renewal failed. |
DHCP-RELEASE |
The DHCP client proactively sends a message to the DHCP server to inform the server that the client no longer needs the assigned IP address. |
DHCP-DECLINE |
If the DHCP client finds an address conflict or the address cannot be used due to other reasons, it sends a DHCP-DECLINE message to notify the server that the assigned IP address is unavailable. |
DHCP-INFORM |
The DHCP client already has an IP address and uses it to request additional configuration parameters from the server. |
Detailed explanation of message
DHCP discover message
DHCP offer message
DHCP request message
DHCP ack message
Dhcp release message
Dhcp contract renewal
2.Dhcp relay
Clients in the LAN can communicate with DHCP servers in other subnets through DHCP Relay and finally obtain legal IP addresses.
3. Questions
3.1 The dhcp offer message has been filled with the IP address assigned by the server to the client. Why does the client send another request message?
Because discover broadcasts and multiple servers may reply to offer messages, the client needs to confirm which IP address provided by the server to use.