Contents of DHCP message

Contents of DHCP message

Here, we will explain the contents of each frame of DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, and DHCPACK.

 If the DHCP client and server are on the same network, the interaction between the DHCP client and DHCP server is as shown in the diagram below.

The content of each message is shown below.

DHCP DISCOVER frame

DHCP OFFER frame

DHCP REQUEST frame

DHCP ACK frame

Packet flow in DHCP relay

This section describes the flow of packets between DHCP client and DHCP server when DHCP relay is performed.

The communication between DHCP client and server in DHCP relay is performed as shown in the figure below.

●Major items of DHCP message

packetClient
IP address
(yiaddr)
Server
IP address
(siaddr)
GW
IP address
(giaddr)
source
MAC address
source
IP address
Destination
MAC address
Destination
IP address
(1) The client sends DHCPDISCOVER.0.0.0.00.0.0.00.0.0.0AAAA.AAAA.AAAA0.0.0.0FFFF.FFFF.FFFF
(Broadcast)
255.255.255.255
(broadcast)
(2) The DHCP relay agent forwards DHCPDISCOVER to the DHCP server. At this time, the gateway IP address is converted to the IP address of the incoming interface (e0), and the source IP address is converted to the IP address of the incoming interface (e0).0.0.0.00.0.0.0192.168.1.1DDDD.DDDD.DDDD192.168.1.1CCCC.CCCC.CCCC192.168.2.2
(3) The DHCP server sends DHCPOFFER.192.168.1.2192.168.2.2192.168.1.1CCCC.CCCC.CCCC192.168.2.2DDDD.DDDD.DDDD192.168.1.1
④DHCP relay agent receives DHCPOFFER, converts it to broadcast and forwards it to local LAN.192.168.1.2192.168.2.2192.168.1.1BBBB.BBBB.BBBB192.168.1.1FFFF.FFFF.FFFF
(Broadcast)
255.255.255.255
(broadcast)
⑤DHCPREQUEST is sent from the client.0.0.0.00.0.0.00.0.0.0AAAA.AAAA.AAAA0.0.0.0FFFF.FFFF.FFFF
(Broadcast)
255.255.255.255
(broadcast)
⑥ DHCP relay agent forwards DHCPREQUEST. At this time, the gateway IP address is converted to the IP address of the incoming interface (e0), and the source IP address is converted to the IP address of the incoming interface (e0).0.0.0.00.0.0.0192.168.1.1DDDD.DDDD.DDDD192.168.1.1CCCC.CCCC.CCCC192.168.2.2
⑦ DHCP server sends DHCPACK.192.168.1.2192.168.2.2192.168.1.1CCCC.CCCC.CCCC192.168.2.2DDDD.DDDD.DDDD192.168.1.1
⑧DHCP relay agent receives DHCPACK, converts it to broadcast and forwards it to local LAN. DHCP client accepts the ACK and uses the IP address.192.168.1.2192.168.2.2192.168.1.1BBBB.BBBB.BBBB192.168.1.1FFFF.FFFF.FFFF
(Broadcast)
255.255.255.255
(broadcast)