Paper/Tutorial name: Working of DHCP protocol Written by: mandi For: Iexploit and hackforums Difficulty: Easy to Intermediate ____________________________________________
DHCP stands for Dynamic Host configuration protocol
DHCP was first defined as a standards track protocol in the year 1993,it is as an extension to the BootStrap protocol(BOOTP).,
DHCP uses the same two ports assigned by IANA
1)67/udp for sending data to the server 2)68/udp for data to the client.
It is used for assigning ip-adress,sub-net mask,default gate-way,dns server address to the client’s automatically.
It is especially used in larger network’s,because manually assigning ip addresses and other details like Sub-net mask etc is not possible in such a large environment....
In a dhcp enaled network,The client at first sends a Broadcast request to the network know as DHCPDISCOVER,because using this request the client tries to find presence of any dhcp server in the network,For example see the below imageYou will have some better understanding
Based on the settings of the DHCP server, this request may be fulfilled or denied....
DHCP offer:
Once the server recieves the request from the client,it process the client’s request And sends a DHCP message referred to as DHCPOFFER,which contains information such as lease duration(specifies time length of how long these settings can be used) IP address, subnet mask, the client’s MAC address, and the IP address of the DHCP server that issued the message.
If the transformation of Information was successful,then the client must tell the DHCP server that the information was received and accepted,then the DHCP client will initiate a broadcast with the DHCP server’s IP address ,So this broadcast will tell the other DHCP server’s that “I already got the details,So please do not send IP details to meâ€,And this mechanism makes sure's in holding up of free IP addresses for other computers,And also remember a single NIC (Network interface card) can obtain only one lease.. Below diagram will help you in understanding the “DHCP request†step..
This is the last step in the transaction between the DHCP client and DHCP server,In this step the server obtains “DHCPREQUEST†from the DHCP client And sends back “DHCPACK†, This packet contains information includes the lease duration, as well as any configuration information the client may have requested. After this point the process is complete, and the DHCP client will configure its IP information according to the details that it obtains from DHCP server..
4.CHECKING DHCP ADDRESS:
After the DHCP client get’s the details from the DHCP server it looks like this