Escolar Documentos
Profissional Documentos
Cultura Documentos
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).
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.
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...
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 local subnet, which also did get automatically a ip from the 169.254 Range.
Sumbernya:
http://www.sadikhov.com/forum/index.php?showtopic=141183