본문 바로가기
NETWORK

Understand DHCP concepts and operating principles

by networker 2024. 3. 25.
728x90
반응형

 

In this session, we will learn about the concept and operating principles of DHCP.

 

1. What is DHCP(Dynamic Host Configuration Protocol)?

 

 

In wired and wireless IP environments, a DHCP server automatically allocates various network information such as a terminal's IP address, subnet mask, default gateway, IP address, DNS server IP address, and lease time to user terminals such as PCs.

 

 

※ Strengths

 

It provides ease of network management because users can set up network information automatically without having to set it up themselves.1. IP Address Allocation Procedure

 

: In order for a terminal such as a PC to be assigned network information such as an IP address from a DHCP server, there are four steps.

 

1) 1) DHCP Discover 2) DHCP Offer 3) DHCP Request 4) DHCP Ack

 

 

 

 

1-1) DHCP Discover

: "Hello? If there is a DHCP server there, please answer me."The stage where you ask ~"

 

Broadcast the Discover message to Ethernet to find the DHCP server. All terminals in the same subnet receive this message.

 

 

 

1-2) DHCP Offer

: " Yes, I'm here. My IP address is 1.1.1.254. I can assign you an IP address of 1.1.1.10." Upon receiving the Discover message, the DHCP server broadcasts the Offer message to inform you.

 

As above, terminals in the same subnet receive Offer messages.

 

 

 

1-3) DHCP Request

: " Thank you for your reply. Then can the DHCP server with the address 1.1.1.254 assign me an IP address?" The PC that confirms the presence of the DHCP server broadcasts the Request message.

 

 

 

1-4) DHCP Ack

: "Yes, I'll assign you the network information you need, including IP address 1.1.1.10. "The lease is for an hour."

 

The DHCP server verifies that the IP address recorded in the Server Identifier is its address in the Request message and delivers various network information along with the Offer message (IP, Subnet, Gateway, DNS, Lease Time).

 

 

 

 

2. IP Address renewal procedure

 

 

The DHCP Ack message contains the IP Lease Time parameter, and the PC must request the DHCP server to extend the IP address lease in order to use the IP address beyond the specified lease period.

 

 

 

 

2-1) DHCP Request

: "Dear DHCP server with 1.1.1.254 address, I would like to extend the lease period for IP address 1.1.1.10. Please allow me." Send a request message to Unicasting.

 

Since the terminal and the server know each other's IP addresses, we send them together with the terminal IP address requesting an extension of the lease period.

 

 

 

2-2) DHCP Ack

: "I accept your request. Use IP address 1.1.1.10 for two more hours." This is also sent to Unicasting with all the information.

 

 

 

 

 

3. IP Address Release procedure

 

 

When you log off or ipconfig /release the PC, the terminal returns the assigned IP address to the DHCP server.

 

 

 

3-1) DHCP Release

: " 1.1.1.254 Dear DHCP server. I will return the IP address 1.1.1.10 that I have used."The DHCP Release message will be forwarded to the server via Unicasting and the IP address will be returned.

 

Through the technical documentation, we looked at IP address allocation (lease), IP address lease extension, and IP address return procedures using the DHCP protocol.

 

The procedure can be illustrated in one illustration, as shown below.

Look at the picture above and draw a schematic in your head.

 

 

 

 

 

저의 글을 읽어 주셔서 감사합니다. 오늘도 즐거운 하루 보내세요.

반응형