Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
[Paper] Working of DHCP protocol
  • mandi
    Posts: 207
    Like others i am also interested in sharing my papers ,I written this paper based on the Informations collected from various sites

    ___________________________________________________


    Paper/Tutorial name: Working of DHCP protocol
    Written by: mandi
    For: Iexploit and hackforums
    Difficulty: Easy to Intermediate
    ____________________________________________


    1.DHCP INTRO
    2.CONFIGURING DHCP ON CLIENT
    3.DHCP TRANSACTIONS
    4.CHECKING DHCP ADDRESS


    ______________________________________

    1.DHCP INTRO

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


    ____________________________________________________________

    2.CONFIGURING DHCP ON CLIENT:


    To get ip-adress ,dns server and other details from the dhcp server the client must be configured like this

    http://www.home-network-help.com/images/dhcp-ip.jpg

    You can do the above by going in to start-->run-->ncpa.cpl

    A window with your network name Appears,right click the network icon and go to properties and you can configure it as specified in the above image…


    __________________________________________________________________


    3.DHCP TRANSACTIONS


    Now we can focus in detail about how dhcp protocol works between the server and client..

    There are 4 important steps occurs between the dhcp server and dhcp client

    1)DHCP discovery
    2)DHCP offer
    3)DHCP request
    4)DHCP acknowledgement


    DHCP discovery:

    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

    http://learn-networking.com/wp-content/uploads/2008/02/dhcpdiscover.jpg

    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.


    http://learn-networking.com/wp-content/uploads/2008/02/dhcpoffer.jpg


    DHCP request:

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

    http://learn-networking.com/wp-content/uploads/2008/02/dhcprequest.jpg


    DHCP acknowledgement:

    http://learn-networking.com/wp-content/uploads/2008/02/dhcpack.jpg


    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

    http://www.home-network-help.com/images/dhcp-ipconfig.jpg


    You can check it by start-->run-->cmd---->ipconfig /all



    __________________________________________________________

    NOTE: my english is not very good,but i have been trying to improve it,So please bear with it and also please don't forget to post your feed-back :)
  • Sh3llc0d3
    Posts: 1,910
    Nice job mandi, you've got some skills when it comes to networking I see :)
  • mandi
    Posts: 207

    Nice job mandi, you've got some skills when it comes to networking I see :)


    may be bro,i have some other tutorials too :),i will post them soon :)

    any way thanks for commenting :)
  • great paper mandi my bro :D
  • Xin
    Posts: 3,251
    Good job mate keep up the good work :)
    Xin