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 (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

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
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
Safe Software
 
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
panagenda
 

Recently uploaded (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

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