Latest tutorial: Making a Movieclip face another Movieclip or point on the stage | Ask Tutorial5!
 

Get tutorials on EMail




Dynamic Host Configuration Protocol

(11 votes)
Written by Michael D.   
DHCP is a network protocol that enables an interface (computer, router, other equipment) to obtain its network setting from a centralized source.

It was developed in 1993, as a successor for BOOTP, which was a simple version of dynamic addressing (released IP addresses with no expiration date and didn't support any options). Dynamic Host Configuration Protocol can tell a computer what IP address, subnet mask, default gateway and DNS servers to use in order to function properly. To set up your connection to use this service, simply state that in the TCP/IP settings box like shown bellow.

 

dhcp_setup.jpg

After booting the system the DHCP service starts and, if enabled, will ask for its settings from a DHCP server. The server relies on some implemented rules to know what IP to give and to whom. We have some standards in doing this. The most flexible is completely automatic (also named dynamic) addressing: the server assigns a re-usable IP from a given range; when the station goes down, that IP address is free to use for another one that logs in. In other words, each station gets the first free IP that is available. Note that this is the fastest method too, but it's less secure then others.

Another method is to assign an IP address to a computer permanently. If it goes down, the IP address will not be re-assigned to other box. These IP's are automatically assigned by the DHCP from a range given by the administrator.

The third and most secure method is manually configuring DHCP access for all hosts. The server has a table relating every IP to a MAC address (physical address of the network interface card). This means that every network card will be given it's own IP and needs to be manually inserted by the administrator in that table in order to get access to network resources.

He is how it works:

dhcp_req.jpg

Another security measure when implementing DHCP is the lease. The server can be configured to add an expiration date to the settings. So you can force e network interface card that got it's setting from a DHCP server to update them after 24 hours, or 10 days or whatever your needs are.

A good way to see your DHCP details is to run Ipconfig.exe /all from command prompt (Start Menu > Run > command.com). This will tell you what is your IP, subnet mask, default gateway, DNS server(s), when you got the IP and when it expires. You can also use some parameters with the Ipconfig.exe command like /release to free the current settings that you have or /renew, to free up the setting and ask for other ones.

Another thing that is important to know about DHCP is how does it send and receive packets on a network. Many problems were encountered on this, because many users started using firewalls that block out many ports. Well DHCP communicates like any other service using a protocol and some ports. Since 90% of the cable modem connection across US and Europe use DHCP to assign settings, you should get familiar with this to prevent from filtering this kind of packets with your firewall.

Firstly, all DHCP packets use the UDP protocol. It is less reliable, but it doesn't increase network bandwidth usage. The client's packets are sent from IP address 0.0.0.0 on port 68 (since it asks for it's IP it doesn't have one yet) to broadcast address 255.255.255.255 on port 67; the client's packet contains it's MAC address (physical or hardware NIC address) and NetBios name (usually computer name).

Note that these ports are reserved for this service and shouldn't be used for something else.

The DHCP protocol is defined in the RFC2132 document. http://tools.ietf.org/html/rfc2132



Subscribe now via RSS feed and get all the new tutorials

written by anish , September 18, 2007

very superficial information,, needs more technical details like packet
details and communication details between primary and secondary servers with options available with dhcp till date would be useful

Do you need more help? Ask now!
 

busy
Last Updated ( Saturday, 23 June 2007 )