Professional Documents
Culture Documents
com
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.
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).
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??
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...
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.
By spacyfreak
CCNA4.com