SlideShare a Scribd company logo
Configuring
a DHCP
Server on
Linux
Med Taher Ben Abdallah
What is DHCP
01
Introduction, components,
how it works
Installing
02
Updating system & installing
server
Configuration
03
Commands and screenshots
Testing
04
Screenshots of usage
Table of contents
What is DHCP
01
Linux
The Dynamic Host Configuration Protocol is a network management protocol
that assigns an IP address and other information to each host on the network
dynamically so that they can interact effectively. DHCP simplifies the job of
network administrators by automating and centrally managing IP address
assignment, in addition to:
■ Subnet masks
■ Default gateway
■ DNS address
■ Other parameters
What is DHCP
4
Components of DHCP
■ DHCP server
Answers IP address requests, provides
an available IP address, stores it for
the time of the lease and renew it
later. It will handle the communication
with all the client devices. The server
could be a computer or a part of the
router.
■ DHCP Client
Requests an IP address and communicates
with the DHCP server to get it with the rest
of the data and confirm the process.
■ DHCP relay agent
In charge of communication between the
DHCP server and the client. It will listen for
messages and pass them to the right place.
5
How it works
2. DHCP Offer:
When the DHCP server receives the DHCP
Discovery message it sends a DHCP Offer
message to the client containing the
proposed IP address, server IP address, client
MAC address, subnet mask, default gateway,
DNS address, and lease information.
DHCP works at the application layer to dynamically assign the IP address to the
client through exchanging a series of messages called DHCP transactions or
DHCP conversation as follows:
1. DHCP Discovery:
The DHCP client broadcast messages to
discover the DHCP servers. The client
computer sends a packet with the default
broadcast destination or the specific
subnet broadcast address if any
configured.
6
4. DHCP ACK:
The server then sends Acknowledgment to
the client confirming the DHCP lease to the
client. The server might send any other
configuration that the client may have asked.
At this step, the IP configuration is
completed and the client can use the new IP
settings.
How it works
3. DHCP Request:
In response to the offer, the client sends a
DHCP Request requesting the offered
address from one of the DHCP servers. All
the other offered IP addresses from
remaining DHCP servers are withdrawn and
returned to the pool of IP available
addresses.
7
Installing
02
Linux
Installing
The first step would be to make sure the the device has the last updates necessary
through the following command
➔ Then, we go on to install
the ISC DHCP server
package
Now that all is set, let’s move to configuring a
DHCP server on the device.
9
Configuration
03
Linux
Picking Interface
The first step of configuration will be to identify the interface that we will work
with, with the command ‘ip a’ or ‘ifconfig’ that lists our available interfaces.
11
Heading now to the configuration file and introduce the options we want in our server
➔ Our server is the official server for the
local network.
➔ The default time for a lease is 600 ms,
maximum is 86400 ms.
➔ The Address pool is defined between
192.168.1.150 and 192.168.1.200.
➔ The server will advise to use the
address 192.168.1.254 as default
gateway.
Config file
12
We need to define the interface that the server should listen to, as it can have many,
and we have already picked it.
Binding an interface
And just before starting up our DHCP server, we might want to check if the firewall
is activated or not, in case it is, we should allow the server activities.
13
Binding an interface
Now we’re left with just turning the Server on and checking if it’s functioning by typing
the following commands, it should show the message below
➔ The server is up and running !
14
Testing
04
Server testing
To test our configured DHCP server, we will need another device to be the client
in our case. The client, while on DHCP, has taken an IP address from the address
pool: 192.168.1.150, which is the first address in the pool.
16
Server testing
Now moving to the server-side, we can
check what devices have obtained
their IP address from our server
through the ‘dhcp-lease-list’ command
as follows.
And our system is working well!
17
Thank You !
mohamed.taherbenabdallah@etudiant-isi.utm.tn
Linux

More Related Content

PPT
Addressing the Network – IPv4
PDF
Web and internet technology notes for BCA students
PPTX
Protection mode
PPTX
Grep - A powerful search utility
DOCX
Cisco packet tracer dhcp
PPTX
Dhcp server configuration
PPT
Configuration DHCP
Addressing the Network – IPv4
Web and internet technology notes for BCA students
Protection mode
Grep - A powerful search utility
Cisco packet tracer dhcp
Dhcp server configuration
Configuration DHCP

What's hot (20)

PDF
Configuration of mesh topology in cisco packet tracer by Tanjilur RAhman
DOC
Lab practice 1 configuring basic routing and switching (with answer)
PPT
Cisco Packet Tracer Overview
PPTX
Know the UNIX Commands
PPTX
PPT
Kernel I/O Subsystem
PPT
Dns ppt
PDF
Introduction to OpenFlow
PDF
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
PPTX
PowerShell-1
PPTX
Infrastructure Planning and Design
PPTX
DDL And DML
PDF
DHCP (dynamic host configuration protocol)
PDF
Pf: the OpenBSD packet filter
PPT
Network protocol
PPT
Ch17 introduction to transaction processing concepts and theory
PPT
Cisco ACL
PDF
Web Development with Python and Django
PPTX
Functional dependency
Configuration of mesh topology in cisco packet tracer by Tanjilur RAhman
Lab practice 1 configuring basic routing and switching (with answer)
Cisco Packet Tracer Overview
Know the UNIX Commands
Kernel I/O Subsystem
Dns ppt
Introduction to OpenFlow
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
PowerShell-1
Infrastructure Planning and Design
DDL And DML
DHCP (dynamic host configuration protocol)
Pf: the OpenBSD packet filter
Network protocol
Ch17 introduction to transaction processing concepts and theory
Cisco ACL
Web Development with Python and Django
Functional dependency
Ad

Similar to Configuring a DHCP Server (20)

DOCX
DHCP Server Guaidlines using CISCO PACKET TRACER
PPT
Durai presentation of dhcp
DOCX
Networking DHCP server Setup Reports
PPSX
Lesson 6: Dynamic Host Configuration Protocol A
PPTX
DHCg.pptfycujnhbcg hnf hnh g h hnhbynynubztcybu
PPT
PPT
zuiqui_DHC.ppt
PPTX
DHCP.pptx
PPTX
6 understanding DHCP
PDF
Dhcp with cisco
PPS
Linux05 DHCP Server
PPTX
dynamichost configuration protocol
PPT
13 - DHCP Service.ppt
PPTX
Group-7-DHCPv4.pptx
PDF
DHCP in windows server 2012
PPT
Wintel ppt for dhcp
PPTX
DHCP Services (Ipv4 & 6).pptx
PPTX
Dynamic Host Configuration Protocol (DHCP) is a network protocol that automat...
DHCP Server Guaidlines using CISCO PACKET TRACER
Durai presentation of dhcp
Networking DHCP server Setup Reports
Lesson 6: Dynamic Host Configuration Protocol A
DHCg.pptfycujnhbcg hnf hnh g h hnhbynynubztcybu
zuiqui_DHC.ppt
DHCP.pptx
6 understanding DHCP
Dhcp with cisco
Linux05 DHCP Server
dynamichost configuration protocol
13 - DHCP Service.ppt
Group-7-DHCPv4.pptx
DHCP in windows server 2012
Wintel ppt for dhcp
DHCP Services (Ipv4 & 6).pptx
Dynamic Host Configuration Protocol (DHCP) is a network protocol that automat...
Ad

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Spectroscopy.pptx food analysis technology
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Machine learning based COVID-19 study performance prediction
PDF
Electronic commerce courselecture one. Pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Empathic Computing: Creating Shared Understanding
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Assigned Numbers - 2025 - Bluetooth® Document
Network Security Unit 5.pdf for BCA BBA.
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Spectroscopy.pptx food analysis technology
A comparative analysis of optical character recognition models for extracting...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine learning based COVID-19 study performance prediction
Electronic commerce courselecture one. Pdf
20250228 LYD VKU AI Blended-Learning.pptx
Review of recent advances in non-invasive hemoglobin estimation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Empathic Computing: Creating Shared Understanding
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Assigned Numbers - 2025 - Bluetooth® Document

Configuring a DHCP Server

  • 2. What is DHCP 01 Introduction, components, how it works Installing 02 Updating system & installing server Configuration 03 Commands and screenshots Testing 04 Screenshots of usage Table of contents
  • 4. The Dynamic Host Configuration Protocol is a network management protocol that assigns an IP address and other information to each host on the network dynamically so that they can interact effectively. DHCP simplifies the job of network administrators by automating and centrally managing IP address assignment, in addition to: ■ Subnet masks ■ Default gateway ■ DNS address ■ Other parameters What is DHCP 4
  • 5. Components of DHCP ■ DHCP server Answers IP address requests, provides an available IP address, stores it for the time of the lease and renew it later. It will handle the communication with all the client devices. The server could be a computer or a part of the router. ■ DHCP Client Requests an IP address and communicates with the DHCP server to get it with the rest of the data and confirm the process. ■ DHCP relay agent In charge of communication between the DHCP server and the client. It will listen for messages and pass them to the right place. 5
  • 6. How it works 2. DHCP Offer: When the DHCP server receives the DHCP Discovery message it sends a DHCP Offer message to the client containing the proposed IP address, server IP address, client MAC address, subnet mask, default gateway, DNS address, and lease information. DHCP works at the application layer to dynamically assign the IP address to the client through exchanging a series of messages called DHCP transactions or DHCP conversation as follows: 1. DHCP Discovery: The DHCP client broadcast messages to discover the DHCP servers. The client computer sends a packet with the default broadcast destination or the specific subnet broadcast address if any configured. 6
  • 7. 4. DHCP ACK: The server then sends Acknowledgment to the client confirming the DHCP lease to the client. The server might send any other configuration that the client may have asked. At this step, the IP configuration is completed and the client can use the new IP settings. How it works 3. DHCP Request: In response to the offer, the client sends a DHCP Request requesting the offered address from one of the DHCP servers. All the other offered IP addresses from remaining DHCP servers are withdrawn and returned to the pool of IP available addresses. 7
  • 9. Installing The first step would be to make sure the the device has the last updates necessary through the following command ➔ Then, we go on to install the ISC DHCP server package Now that all is set, let’s move to configuring a DHCP server on the device. 9
  • 11. Picking Interface The first step of configuration will be to identify the interface that we will work with, with the command ‘ip a’ or ‘ifconfig’ that lists our available interfaces. 11
  • 12. Heading now to the configuration file and introduce the options we want in our server ➔ Our server is the official server for the local network. ➔ The default time for a lease is 600 ms, maximum is 86400 ms. ➔ The Address pool is defined between 192.168.1.150 and 192.168.1.200. ➔ The server will advise to use the address 192.168.1.254 as default gateway. Config file 12
  • 13. We need to define the interface that the server should listen to, as it can have many, and we have already picked it. Binding an interface And just before starting up our DHCP server, we might want to check if the firewall is activated or not, in case it is, we should allow the server activities. 13
  • 14. Binding an interface Now we’re left with just turning the Server on and checking if it’s functioning by typing the following commands, it should show the message below ➔ The server is up and running ! 14
  • 16. Server testing To test our configured DHCP server, we will need another device to be the client in our case. The client, while on DHCP, has taken an IP address from the address pool: 192.168.1.150, which is the first address in the pool. 16
  • 17. Server testing Now moving to the server-side, we can check what devices have obtained their IP address from our server through the ‘dhcp-lease-list’ command as follows. And our system is working well! 17