DHCP became a standard protocol in June 1993, and its predecessor was BOOTP protocol. The definition can be found in RFC 2 13 1, and the suggested standard based on IPv6 can be found in RFC 33 15. DHCP packets use UDP protocol at the transport layer, while clients use UDP 67 port when sending packets to servers, and servers use UDP 68 port when sending packets to clients.
Extended data:
The related working principle of dhcp:
1. Client requests ip.
The client broadcasts a dhcp discover packet with port 67 of UDP, source ip0.0.0.0, and destination ip255.255.255.255 (limited broadcast). It also includes the client's MAC and hostname.
2. Server response
Request the server to check the ip address pool. If there is an ip, broadcast a dhcp offer packet, port 68 of UDP, the source ip of the server, and the destination ip of 255.255.255.255, and also include the following information: MAC of the client, IP provided by the server, subnet mask, lease and IP of the server.
3. Customer selection
Use the first dhcp offer packet received, and use UDP port 67, source ip0.0.0.0 and destination ip 255.255.255.255 to send the dhcp request packet broadcast.
4. Server confirmation
After receiving the dhcp request packet, the dhcp server will broadcast it to the client with dhcp ACK packet to confirm success. Use UDP port 68, the source ip is the ip of the server, and the destination ip is 255.255.255.255. After the client receives the dhcp ACK packet, it can use the ip address.
Baidu encyclopedia -DHCP
Baidu encyclopedia -DHCP server