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
 
DYNAMIC HOST CONFIGURATION PROTOCOL
DYNAMIC HOST CONFIGURATION PROTOCOLDYNAMIC HOST CONFIGURATION PROTOCOL
DYNAMIC HOST CONFIGURATION PROTOCOL
 
14047721
1404772114047721
14047721
 
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

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
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
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
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
 

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