paint-brush
Network ++ Part 3 (DHCP): A Guideby@elliot31878
227 reads

Network ++ Part 3 (DHCP): A Guide

by elliotAugust 6th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A computer on the Internet can have a static IP address, which means it stays the same over time. A dynamic IP address is an IP address that an ISP lets you use temporarily. Dynamic IP addresses are assigned using either DHCP or PPPoE. If a dynamic address is not in use, it can be automatically assigned to a different device.
featured image - Network ++ Part 3 (DHCP): A Guide
elliot HackerNoon profile picture

How does a computer know what its IP configuration is? DHCP

DHCP in the Network

  • Static IP addressing
    • Static IP addresses: If your computer is hosting a web server, its IP address is what identifies it to the rest of the Internet. A computer on the Internet can have a static IP address, which means it stays the same over time.


  • Dynamic IP addressing
    • A dynamic IP address is an IP address that an ISP lets you use temporarily. If a dynamic address is not in use, it can be automatically assigned to a different device. Dynamic IP addresses are assigned using either DHCP or PPPoE.

How Does DHCP Work?

base64 images have been removed. Instead, use a URL or a file from your device

Component & Processes of DHCP

  • Port Used
    • DHCP Server Port: The DHCP server listens on UDP port 67. This port is used to receive DHCP messages from clients, including requests for IP addresses and other network configuration parameters.


    • DHCP Client Port: DHCP clients communicate using UDP port 68. They send requests to the DHCP server through this port and wait for responses on the same port.


  • Address Scope
    • Scope is a critical component in managing IP address allocations within a network. It represents an administrative grouping of IP addresses that a DHCP server can lease to clients on a specific subnet. Here's a comprehensive overview of DHCP scopes, including their definition, properties, and management:


  • Address reservation
    • Address reservation in DHCP (Dynamic Host Configuration Protocol) refers to the practice of assigning a specific, fixed IP address to a particular device on a network. This is achieved by associating the device's MAC (Media Access Control) address with a reserved IP address. When the device connects to the network, the DHCP server recognizes its MAC address and assigns the corresponding reserved IP address, ensuring that the device consistently receives the same IP address each time it connects.


      This mechanism provides several benefits, including improved network stability, simplified management, enhanced security, and efficient resource management.


  • Leases
    • DHCP (Dynamic Host Configuration Protocol) leases are a fundamental aspect of how IP addresses are managed within a network. When a DHCP server assigns an IP address to a client, it does so with a lease time, specifying how long the client can use that IP address before needing to renew it. This lease mechanism ensures that IP addresses are dynamically allocated and can be reclaimed by the DHCP server after a certain period, allowing for efficient IP address management and reuse.


  • Options
    • DHCP (Dynamic Host Configuration Protocol) options are additional pieces of information that a DHCP server can provide to a client upon granting an IP address. These options enable the server to configure various aspects of the client's network settings beyond just the IP address, subnet mask, and default gateway. DHCP options play a crucial role in automating the network configuration process, making it easier for devices to connect to and function within a network without manual setup.


  • Preferred IP Configuration
    • Preferred IP Configuration in the context of DHCP (Dynamic Host Configuration Protocol) refers to a feature that allows a DHCP client to specify a preferred IP address and subnet mask that it would like to use. This feature is particularly useful in scenarios where a device knows its preferred network configuration but still wants to obtain an IP address dynamically from a DHCP server.


      The DHCP server can then either grant the requested IP address if it's available or suggest an alternative if the preferred address is already in use by another device.


Thanks for reading.


Regards, Elliot :)