SlideShare a Scribd company logo
1 of 18
Download to read offline
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

Similar to Configuring a DHCP Server

6 understanding DHCP
6 understanding DHCP6 understanding DHCP
6 understanding DHCPHameda Hurmat
 
DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)Netwax Lab
 
dynamichost configuration protocol
dynamichost configuration protocoldynamichost configuration protocol
dynamichost configuration protocolrajisri2
 
13 - DHCP Service.ppt
13 - DHCP Service.ppt13 - DHCP Service.ppt
13 - DHCP Service.pptssuserf7cd2b
 
Group-7-DHCPv4.pptx
Group-7-DHCPv4.pptxGroup-7-DHCPv4.pptx
Group-7-DHCPv4.pptxIvanTabanag1
 
DHCP in windows server 2012
DHCP in windows server 2012DHCP in windows server 2012
DHCP in windows server 2012Abaady Sahal
 
DHCP Services (Ipv4 & 6).pptx
DHCP Services (Ipv4 & 6).pptxDHCP Services (Ipv4 & 6).pptx
DHCP Services (Ipv4 & 6).pptxMohammad Hassan
 
DYNAMIC HOST CONFIGURATION PROTOCOL
DYNAMIC HOST CONFIGURATION PROTOCOLDYNAMIC HOST CONFIGURATION PROTOCOL
DYNAMIC HOST CONFIGURATION PROTOCOLVENKATESHAN A S
 
Module (8) DHCP Server.pptx
Module (8) DHCP Server.pptxModule (8) DHCP Server.pptx
Module (8) DHCP Server.pptxGeorgeThoreJr
 
dhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptxdhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptxKushalAsodia
 
Implementing Dynamic Host
Implementing Dynamic HostImplementing Dynamic Host
Implementing Dynamic HostNapoleon NV
 
Dhcp by lalit bhati
Dhcp by lalit bhatiDhcp by lalit bhati
Dhcp by lalit bhatiLalit Bhati
 

Similar to Configuring a DHCP Server (20)

DHCP.pptx
DHCP.pptxDHCP.pptx
DHCP.pptx
 
6 understanding DHCP
6 understanding DHCP6 understanding DHCP
6 understanding DHCP
 
DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)
 
Dhcp with cisco
Dhcp with ciscoDhcp with cisco
Dhcp with cisco
 
Linux05 DHCP Server
Linux05 DHCP ServerLinux05 DHCP Server
Linux05 DHCP Server
 
dynamichost configuration protocol
dynamichost configuration protocoldynamichost configuration protocol
dynamichost configuration protocol
 
13 - DHCP Service.ppt
13 - DHCP Service.ppt13 - DHCP Service.ppt
13 - DHCP Service.ppt
 
Dhcp presentation
Dhcp presentationDhcp presentation
Dhcp presentation
 
Group-7-DHCPv4.pptx
Group-7-DHCPv4.pptxGroup-7-DHCPv4.pptx
Group-7-DHCPv4.pptx
 
DHCP in windows server 2012
DHCP in windows server 2012DHCP in windows server 2012
DHCP in windows server 2012
 
unit 2
unit 2unit 2
unit 2
 
Wintel ppt for dhcp
Wintel ppt for dhcpWintel ppt for dhcp
Wintel ppt for dhcp
 
DHCP Services (Ipv4 & 6).pptx
DHCP Services (Ipv4 & 6).pptxDHCP Services (Ipv4 & 6).pptx
DHCP Services (Ipv4 & 6).pptx
 
14047721
1404772114047721
14047721
 
DYNAMIC HOST CONFIGURATION PROTOCOL
DYNAMIC HOST CONFIGURATION PROTOCOLDYNAMIC HOST CONFIGURATION PROTOCOL
DYNAMIC HOST CONFIGURATION PROTOCOL
 
Module (8) DHCP Server.pptx
Module (8) DHCP Server.pptxModule (8) DHCP Server.pptx
Module (8) DHCP Server.pptx
 
dhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptxdhcpppt-130331044148-phpapp02.pptx
dhcpppt-130331044148-phpapp02.pptx
 
Implementing Dynamic Host
Implementing Dynamic HostImplementing Dynamic Host
Implementing Dynamic Host
 
dhcp.pdf
dhcp.pdfdhcp.pdf
dhcp.pdf
 
Dhcp by lalit bhati
Dhcp by lalit bhatiDhcp by lalit bhati
Dhcp by lalit bhati
 

Recently uploaded

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

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