SlideShare a Scribd company logo
1 of 3
Download to read offline
CCNA4.com

Learn DHCP in 5 Minutes
How can the Client find a DHCP Server?
When a pc boots up, and it has no static IP address set, it will "look up" for an IP-Address.
The pc will try to discover a DHCP Server on the local subnet (DHCPDISCOVER) via
broadcast message.

Which Broadcast-IP Address will the PC use for that? 192.168.255.255? NOT AT ALL!
The pc in that moment DOES NOT KNOW which network or subnetwork is in use in the
local network, so the pc also can not know what is the Broadcast-IP of that network!

So the PC will send out DHCP Discover packets via broadcast to the address 255.255.255.255
(or in hex FF-FF-FF-FF-FF-FF).
So that Broadcast will reach ALL devices in the local network.

If there is a DHCP on the local network, the DHCP may answer with a DHCP Reply and offer
an free and valid IP-Address to the client.
But the DHCP Server can do much more - it will offer the whole network configuration to the
client if configured - incl. DNS-Server IPs, WINS-Server IPs, DHCP Lease Time, Default
Gateway - and (if configured and needed) also several other options, depending on the GOAL
and NEED.
DHCP is very powerfull, you can also use vendor classes and / or user classes to configure
some special attributes needed for any purpose.
With user classes you can give a command on a client pc, and according to that command the
dhcp server will provide "special configuration" to all clients which have this command set as
they will send special request attributes to the DHCP Server in the DHCP discover packets.

Which Ports does DHCP use?

DHCP Server "listens" on Port UDP 67.
DHCP Client receives dhcp offers on Port UDP 68.

So - source port of the dhcp discover is UDP68 (Client), and destination Port is UDP 67
(DHCP Server Listener Port).
The DHCP answers to the discover with source port UDP 67 (DHCP Server) and destination
Port UDP 68 (Client).

Which DHCP Messages exist?

DHCPDISCOVER
Client sends dhcp discover packets into the local subnet to ask ANYONE on the local subnet
for an ip address.

DHCPOFFER
The DHCP Server "offers" an ip and some other options to requesting clients.

DHCPREQUEST
The client - after it has received a valid ip address from a dhcp server - sends dhcprequest as
broadcast to the local subnet to "inform" eventually other existing dhcp servers that it has an
ip and it does not need another ip. That dhcprequest contains the ip of the dhcp server which
provided a ip to the client.
These other dhcps will withdraw any offers that they might have made to the client.

CCNA4.com
CCNA4.com

DHCPACKNOWLEDGEMENT
Finally, the dhcp server which provided an ip to the client will provide some additional
information to the client, if configured, for example lease time etc.


What if there are more then one DHCP Servers in the local network??

But what if there is ANOTHER DHCP Server in the local net?
How does our Client know the RIGHT and legitimate DHCP Server?

Well - the Client will take ANY DHCP Offer it gets! So if you have 3 DHCP Servers in your
local lan, the FIRST DHCP (or the fastest..) will be the one which will give an IP Address to
the client.
So it could disturb a network if there are "illegal" DHCP Servers seriously!

To prevent "illegal" dhcp servers from disturbing the network, there are several technics...

1. configure DHCP Snooping on the switches to allow DHCP offers ONLY on configured
and allowed uplink ports
or
2. use dhcp classes (user class or vendor class) so that only DHCP offers which fit to the class
and configuration will be accepted by the client
or
3. if you find a user which provides illegal dhcp services, nail him on a cross so that the other
users are warned...

What if the DHCP Server is located on another subnetwork?
Oups! As Clients use broadcasts to get a IP from DHCP Server - and broadcasts are NOT
forwarded by routers normally, how can the client get an ip from dhcp server?
Well, thats what "DHCP Relay Agents" are designed for. A DHCP Relay Agent is a device on
the local subnet, which "collects" dhcp discover broadcasts, and encapsulates them in a
unicast message which can be forwarded to the DHCP Server in another subnet.
We can also use so called "ip helpers" on cisco devices, thats the same function like a dhcp
relay agent.

What if the DHCP Server is unreachable?

Well, all the clients which still did get a IP-Address from the DHCP Server as it still WAS
reachable, will still be able to communicate with other devices.
When the HALF DHCP Lease Time is over, a client contacts again DHCP Server to renew
the lease. If the DHCP Server is not reachable, the client will hold the given IP till the lease
time is over.

When the DHCP Lease Time on the Client expires - then its FINITO! The client loses its ip
configuration.
Windows PCs have a feature called APIPA (Automatic private IP Address).
When a Windows Client can not get an ip from a DHCP Server, the OS provides the client
with an IP from the Microsoft-IP Range 169.254.X.X.
The windoes clients on the network "negotiate" with each others so that no other pc on the
local subnet gets the same ip of this 169.254. Range.
So the windows clients will still be able to communicate - but only with other clients in the

CCNA4.com
CCNA4.com
local subnet, which also did get automatically a ip from the 169.254 Range.

How to configure redundant DHCP Service on the LAN?

Nothing easier then this!
Install and configure your DHCP Server. When its ready - just duplicate the DHCP Server.
You only have to "split" the DHCP Scope Ranges so that both DHCP Servers can not offer
the SAME IP-Address to different clients, otherwise you will get IP conflicts!

So, first DHCP could provide IP Range 192.168.1.1 - 192.168.127.254
and the second DHCP could provide IP Range 192.168.128.1 - 192.168.255.254 to the clients
(for example..).

                                                                              By spacyfreak




CCNA4.com

More Related Content

More from CCNAResources

1000 Ccna Questions And Answers
1000 Ccna Questions And Answers1000 Ccna Questions And Answers
1000 Ccna Questions And AnswersCCNAResources
 
Quick Guide Layer 2 Switching
Quick Guide   Layer 2 SwitchingQuick Guide   Layer 2 Switching
Quick Guide Layer 2 SwitchingCCNAResources
 
Quick Guide Ip Routing
Quick Guide   Ip RoutingQuick Guide   Ip Routing
Quick Guide Ip RoutingCCNAResources
 
Ccna Wireless Resources
Ccna Wireless ResourcesCcna Wireless Resources
Ccna Wireless ResourcesCCNAResources
 
Ccna Quick Notes –VLANs
Ccna Quick Notes –VLANsCcna Quick Notes –VLANs
Ccna Quick Notes –VLANsCCNAResources
 
Ccna Commands In 10 Minutes
Ccna Commands In 10 MinutesCcna Commands In 10 Minutes
Ccna Commands In 10 MinutesCCNAResources
 
Lab08 Rip Routing (Ccna4.Com)
Lab08 Rip Routing (Ccna4.Com)Lab08 Rip Routing (Ccna4.Com)
Lab08 Rip Routing (Ccna4.Com)CCNAResources
 
Lab09 Rip Routing (Ccna4.Com)
Lab09 Rip Routing (Ccna4.Com)Lab09 Rip Routing (Ccna4.Com)
Lab09 Rip Routing (Ccna4.Com)CCNAResources
 
Eigrp Summary (Ccna4.Com)
Eigrp Summary  (Ccna4.Com)Eigrp Summary  (Ccna4.Com)
Eigrp Summary (Ccna4.Com)CCNAResources
 

More from CCNAResources (11)

1000 Ccna Questions And Answers
1000 Ccna Questions And Answers1000 Ccna Questions And Answers
1000 Ccna Questions And Answers
 
Quick Guide VLANs
Quick Guide   VLANsQuick Guide   VLANs
Quick Guide VLANs
 
Quick Guide Layer 2 Switching
Quick Guide   Layer 2 SwitchingQuick Guide   Layer 2 Switching
Quick Guide Layer 2 Switching
 
Quick Guide Ip Routing
Quick Guide   Ip RoutingQuick Guide   Ip Routing
Quick Guide Ip Routing
 
Ccna Wireless Resources
Ccna Wireless ResourcesCcna Wireless Resources
Ccna Wireless Resources
 
Ccna Quick Notes –VLANs
Ccna Quick Notes –VLANsCcna Quick Notes –VLANs
Ccna Quick Notes –VLANs
 
Ccna Commands In 10 Minutes
Ccna Commands In 10 MinutesCcna Commands In 10 Minutes
Ccna Commands In 10 Minutes
 
Lab08 Rip Routing (Ccna4.Com)
Lab08 Rip Routing (Ccna4.Com)Lab08 Rip Routing (Ccna4.Com)
Lab08 Rip Routing (Ccna4.Com)
 
Lab09 Rip Routing (Ccna4.Com)
Lab09 Rip Routing (Ccna4.Com)Lab09 Rip Routing (Ccna4.Com)
Lab09 Rip Routing (Ccna4.Com)
 
Ip Access Lists
Ip Access ListsIp Access Lists
Ip Access Lists
 
Eigrp Summary (Ccna4.Com)
Eigrp Summary  (Ccna4.Com)Eigrp Summary  (Ccna4.Com)
Eigrp Summary (Ccna4.Com)
 

Recently uploaded

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Learn Dhcp In 5 Minutes

  • 1. CCNA4.com Learn DHCP in 5 Minutes How can the Client find a DHCP Server? When a pc boots up, and it has no static IP address set, it will "look up" for an IP-Address. The pc will try to discover a DHCP Server on the local subnet (DHCPDISCOVER) via broadcast message. Which Broadcast-IP Address will the PC use for that? 192.168.255.255? NOT AT ALL! The pc in that moment DOES NOT KNOW which network or subnetwork is in use in the local network, so the pc also can not know what is the Broadcast-IP of that network! So the PC will send out DHCP Discover packets via broadcast to the address 255.255.255.255 (or in hex FF-FF-FF-FF-FF-FF). So that Broadcast will reach ALL devices in the local network. If there is a DHCP on the local network, the DHCP may answer with a DHCP Reply and offer an free and valid IP-Address to the client. But the DHCP Server can do much more - it will offer the whole network configuration to the client if configured - incl. DNS-Server IPs, WINS-Server IPs, DHCP Lease Time, Default Gateway - and (if configured and needed) also several other options, depending on the GOAL and NEED. DHCP is very powerfull, you can also use vendor classes and / or user classes to configure some special attributes needed for any purpose. With user classes you can give a command on a client pc, and according to that command the dhcp server will provide "special configuration" to all clients which have this command set as they will send special request attributes to the DHCP Server in the DHCP discover packets. Which Ports does DHCP use? DHCP Server "listens" on Port UDP 67. DHCP Client receives dhcp offers on Port UDP 68. So - source port of the dhcp discover is UDP68 (Client), and destination Port is UDP 67 (DHCP Server Listener Port). The DHCP answers to the discover with source port UDP 67 (DHCP Server) and destination Port UDP 68 (Client). Which DHCP Messages exist? DHCPDISCOVER Client sends dhcp discover packets into the local subnet to ask ANYONE on the local subnet for an ip address. DHCPOFFER The DHCP Server "offers" an ip and some other options to requesting clients. DHCPREQUEST The client - after it has received a valid ip address from a dhcp server - sends dhcprequest as broadcast to the local subnet to "inform" eventually other existing dhcp servers that it has an ip and it does not need another ip. That dhcprequest contains the ip of the dhcp server which provided a ip to the client. These other dhcps will withdraw any offers that they might have made to the client. CCNA4.com
  • 2. CCNA4.com DHCPACKNOWLEDGEMENT Finally, the dhcp server which provided an ip to the client will provide some additional information to the client, if configured, for example lease time etc. What if there are more then one DHCP Servers in the local network?? But what if there is ANOTHER DHCP Server in the local net? How does our Client know the RIGHT and legitimate DHCP Server? Well - the Client will take ANY DHCP Offer it gets! So if you have 3 DHCP Servers in your local lan, the FIRST DHCP (or the fastest..) will be the one which will give an IP Address to the client. So it could disturb a network if there are "illegal" DHCP Servers seriously! To prevent "illegal" dhcp servers from disturbing the network, there are several technics... 1. configure DHCP Snooping on the switches to allow DHCP offers ONLY on configured and allowed uplink ports or 2. use dhcp classes (user class or vendor class) so that only DHCP offers which fit to the class and configuration will be accepted by the client or 3. if you find a user which provides illegal dhcp services, nail him on a cross so that the other users are warned... What if the DHCP Server is located on another subnetwork? Oups! As Clients use broadcasts to get a IP from DHCP Server - and broadcasts are NOT forwarded by routers normally, how can the client get an ip from dhcp server? Well, thats what "DHCP Relay Agents" are designed for. A DHCP Relay Agent is a device on the local subnet, which "collects" dhcp discover broadcasts, and encapsulates them in a unicast message which can be forwarded to the DHCP Server in another subnet. We can also use so called "ip helpers" on cisco devices, thats the same function like a dhcp relay agent. What if the DHCP Server is unreachable? Well, all the clients which still did get a IP-Address from the DHCP Server as it still WAS reachable, will still be able to communicate with other devices. When the HALF DHCP Lease Time is over, a client contacts again DHCP Server to renew the lease. If the DHCP Server is not reachable, the client will hold the given IP till the lease time is over. When the DHCP Lease Time on the Client expires - then its FINITO! The client loses its ip configuration. Windows PCs have a feature called APIPA (Automatic private IP Address). When a Windows Client can not get an ip from a DHCP Server, the OS provides the client with an IP from the Microsoft-IP Range 169.254.X.X. The windoes clients on the network "negotiate" with each others so that no other pc on the local subnet gets the same ip of this 169.254. Range. So the windows clients will still be able to communicate - but only with other clients in the CCNA4.com
  • 3. CCNA4.com local subnet, which also did get automatically a ip from the 169.254 Range. How to configure redundant DHCP Service on the LAN? Nothing easier then this! Install and configure your DHCP Server. When its ready - just duplicate the DHCP Server. You only have to "split" the DHCP Scope Ranges so that both DHCP Servers can not offer the SAME IP-Address to different clients, otherwise you will get IP conflicts! So, first DHCP could provide IP Range 192.168.1.1 - 192.168.127.254 and the second DHCP could provide IP Range 192.168.128.1 - 192.168.255.254 to the clients (for example..). By spacyfreak CCNA4.com