Quick Understanding of DHCP in ONU and Routers

DHCP stands for Dynamic Host Configuration Protocol. It is a protocol layer 7 (application layer).

DHCP is widely used in the current network, no matter the enterprise network or the home network. So that terminals can communicate with the Internet, it allows them to get an IP address from the DHCP server.

The main task of this protocol is to give network configuration parameters to all users who request it. Network configuration parameters include.

IP address

Subnet mask 

Default gateway

Domain name

DNS server

Lease time

This protocol involves two main roles:

DHCP server – this device assigns network configuration parameters.

DHCP clients – devices that require network configuration parameters.

After DHCP clients receive network configuration parameters, they can communicate with hosts outside their LAN. Generally, there are three situations:

The first situation is that host has static network parameters and it can communicate only in its LAN.

Second, the host is configured to get dynamic network parameters. But for some reason, it doesn’t get network configuration parameters. Then the host configures itself.  It will get a private APIPA IP address. This allows the host to communicate within its LAN, but not outside this network.

And the last situation is that host is configured to get dynamic network parameters. And after the DHCP process, the host gets network configuration parameters and it can communicate with hosts in its LAN and with hosts outside their LAN network.

In the next figure, we can see the basic process of DHCP.

There are four main steps in DHCP process communication between DHCP client (host) and DHCP server.

Commonly, when the DHCP client accessing to the network, the following procedures will be processed to get the IP address.

When the PC enables the DHCP to access the network, it will broadcast DHCP DISCOVER packets to find the DHCP server. The DHCP server will answer the request with DHCP OFFER packet, it should be pointed out that the DHCP OFFER is not a broadcast packet, it is a unicast packet. Then, the PC will boradcast the DHCP REQUESTpacket to request IP address, and the DHCP server will answer this request with DHCP ACK packet to finish the IP address requesting.

There are 4 main steps in DHCP process communication between DHCP client (host) and DHCP server.

Step 1. DHCP client sends broadcast message DISCOVERY. The DHCP client doesn’t know where the DHCP server is, and it doesn’t know if there is one server or if there are multiple servers. Because of that, the DHCP client sends this message. And this way DHCP client tries to find a DHCP server.

Step 2. The DHCP server sends unicast message OFFER. The DHCP server received a DISCOVERY message and after that, it sends an OFFER message to the DHCP client and provides various configuration parameters.

Step 3. DHCP client sends unicast message REQUEST. The DHCP client sends this message to the DHCP server and in this way confirms the received network configuration parameters. If there is more than one DHCP server in the network, the DHCP client receives more than one DHCP OFFER message. The DHCP client takes the first message it receives.

Step 4. The DHCP server sends unicast message ACK (ACKNOWLEDGMENT). In this message, the DHCP server tells the DHCP client that it agrees that the DHCP client can use the assigned network parameters.

DHCP: Why Do We Need It?

Each device connected to the Internet must have a unique IP address. DHCP helps network administrators to monitor and assign IP addresses in a centralized manner. When a computer is moved to a new location, it can automatically be assigned a new IP address. DHCP automates the process of allocating IP addresses, which reduces the time required for device configuration and deployment, as well as the possibility of configuration errors. In addition, DHCP servers can manage multiple network segments. The configuration of a network segment only needs to be updated on the DHCP server when the configuration of the segment changes.

The advantages of DHCP are as follows:

Reliable IP address configuration: The IP address configuration parameters must be exact. It is easy to make a mistake when dealing with inputs such as 192.168.XXX.XXX. Typographical errors are typically very difficult to troubleshoot and the use of a DHCP server minimizes such errors.

Reduced IP address conflicts: Each connected device must have an IP address. Each IP address can only be used once. In the event of an IP address conflict between two devices, one or both of them cannot be connected. This can happen when IP addresses are allocated manually, particularly when there are a large number of endpoints that only connect periodically, such as mobile devices. DHCP ensures that each IP address is only used once.

Automatic IP address management: In any network without DHCP, network administrators need to manually assign and withdraw IP addresses. Keeping track of which device has what IP address can be an exercise in futility as it is nearly impossible to understand when devices require access to the network and when they leave. DHCP allows this to be automated and centralized so network professionals can manage all locations from a single location.

DHCP provides efficient change management: changing addresses, scopes, or endpoints is easy with DHCP. For example, an organization may want to change its IP addressing scheme from one range to another. The DHCP server is configured with the new information and the information will be propagated to the new endpoints. Similarly, if a network device is upgraded and replaced, no network configuration is required.

Difference between DHCP and Static IP

In the IP protocol, each device on a network has a unique identifier, called an IP address. The simplest way to achieve this is to configure a fixed or static IP address. However, due to the limitations of static IP, we seek to use dynamic IP, and DHCP is a protocol that assigns dynamic IP addresses to devices connected to the network.

A static IP address is a manually configured IP address for the device, not an IP address assigned by the DHCP server. It is called static because it does not change compared to dynamic IP addresses, which change. A static IP address is an address that is permanently assigned to your network device by your ISP and will not change even if your device restarts. Static IP addresses are generally available in two versions: IPv4 and IPv6.

If you are using Google Search, enter “What is my IP address” in the search box to obtain your static IP address.

A dynamic IP address is the opposite of a static IP address. A dynamic IP address is a constantly changing address. To create dynamic IP addresses, the network must be configured and run a DHCP server. The DHCP server assigns a blank IP address to all devices connected to the network. DHCP is a method of dynamically and automatically assigning IP addresses to network devices on a physical network.

Dynamic Host Configuration Protocol (DHCP) is a network protocol for LANs. The IP address range is controlled by the server. When a client logs in to the server, the client automatically obtains the IP address and subnet mask assigned by the server. By default, DHCP is not automatically installed by the system as a service component of the Windows Server. You need to manually install DHCP and perform the necessary configurations.

Leave a Reply

Address
Floor 3, Building B, Honghua Science And Technology Innovation Park, 
Longhua District, Shenzhen

Work Hours
Monday to Friday: 9AM - 9PM
Weekend: 10AM - 6PM