Home arrow Articles arrow Getting to Know arrow Getting to Know Dynamic Host Configuration Protocol (DHCP) I
 
     
Getting to Know Dynamic Host Configuration Protocol (DHCP) I PDF Print E-mail
User Rating: / 14
PoorBest 
Getting to Know - Networks
Written by Mohammed Alani   
Tuesday, 26 December 2006

Part 1 ? Theory

Lives of network administrators became much easier when the DHCP was founded. DHCP?s simple idea was to create a protocol that enables hosts (Computers, printers, and any device that can have an IP address) to obtain its configuration automatically from a DHCP server. As we have mentioned the word Server, DHCP operates in client/server mode.

Before explaining how DHCP works, we need to stop by the earlier seed of it; Bootstrap Protocol (BootP). The Internet community first developed the BOOTP protocol to enable configuration of diskless workstations. BOOTP does not dynamically allocate IP addresses to a host. When a client requests an IP address, the BOOTP server searches a predefined table for an entry that matches the MAC address for the client. If an entry exists, then the corresponding IP address for that entry is returned to the client. This means that the binding between the MAC address and the IP address must have already been configured in the BOOTP server. The ports that were used by the BootP protocol are 67 and 68 which DHCP currently uses them. Despite that, these two ports are still called BootP ports.

DHCP came as a more complete solution for small and large networks. It had better characteristics as compared to BootP:

  1. DHCP defines mechanisms through which clients can be assigned an IP address for a finite lease period. This lease period allows for reassignment of the IP address to another client later, or for the client to get another assignment, if the client moves to another subnet. Clients may also renew leases and keep the same IP address.

  2. DHCP provides the mechanism for a client to gather other IP configuration parameters, such as WINS and domain name and a huge number of other parameters.

  3. DHCP is of a dynamic nature, i.e., the server does not need to be pre-programmed manually with all the MAC addresses of the hosts to take the service.

The dynamic assignment of configuration made life much easier especially when dealing with large networks. This is due to the fact that whenever you increase the administrative load (human load) you will gain more errors.

DHCP relies on UDP in the Transport layer. I believe this is because UDP is adequate for operations that take place in a local network. And DHCP is one of these local operations. As mentioned before, the two ports 67 and 68 are used by DHCP. And the process of DHCP goes as follows:

  1. The host that is programmed to be a DHCP client will perform a broadcast of a DHCPDISCOVER message. This assures that ALL hosts in the network segment will receive this broadcast including the DHCP server. Sometimes the request includes a suggested IP address for the host when the host is not requesting a new IP address but extending the lease.

  2. When the server receives the broadcast, it determines whether it can service the request from its own database. If it cannot, the server may forward the request on to another DHCP server. If it can, the DHCP server offers the client IP configuration information in the form of a unicast DHCPOFFER message. The DHCPOFFER is a proposed configuration that may include IP address, DNS server address, and lease time.

  3. If the host agrees to the offer, it will send another broadcast, a DHCPREQUEST, specifically requesting those particular IP parameters. You might ask: Why does the client broadcast the request instead of unicasting it to the server? A broadcast is used because the first message, the DHCPDISCOVER, may have reached more than one DHCP server. If more than one server makes an offer, the broadcasted DHCPREQUEST allows the other servers to know which offer was accepted. The offer accepted is usually the first offer received.

  4. The server that receives the DHCPREQUEST makes the configuration official by sending a unicast acknowledgment to the client, the DHCPACK message. It is possible, but highly unlikely, that the server will not send the DHCPACK. This may happen because the server may have leased that information to another client in the interim. Receipt of the DHCPACK message enables the client to begin using the assigned address immediately.

  5. If the client detects a conflict, and that is the address is already in use on the local segment it will send a DHCPDECLINE message and the process starts again. If the client received a DHCPNACK message from the server after sending the DHCPREQUEST, then it will restart the process again.

  6. If the client no longer needs the IP address, the client sends a DHCPRELEASE message to the server.

DHCP Operation

And here are some of the most important parameters that DHCP can carry from the server to the clients are:

  1. IP Address.

  2. Subnet mask.

  3. Default Gateway.

  4. Primary and Secondary DNS Server Address.

  5. Printer server address.
  6. Domain name if working in a domain environment.
  7. NETBOIS name server.
  8. SMTP server.
  9. POP3 server.
  10. WINS server.

 

Design concepts:

We have to keep in mind the three mechanisms that are used to assign IP addresses to hosts using DHCP:

  • Automatic allocation ? DHCP assigns a permanent IP address to a client.
  • Manual allocation ? The IP address for the client is assigned by the administrator. DHCP conveys the address to the client.
  • Dynamic allocation ? DHCP assigns, or leases, an IP address to the client for a limited period of time.

The DHCP server creates pools of IP addresses and associated parameters. Pools are dedicated to an individual logical IP subnet. This allows multiple DHCP servers to respond and IP clients to be mobile. If multiple servers respond, a client can choose only one of the offers.

Last but not least, I will give you some tips to keep in mind when implementing DHCP:

  1. Keep ALL the servers and printers with STATIC IP addresses and outside the DHCP pool.
  2. For security purposes, do not keep the DHCP pool very large.
  3. Let the lease time be one week (and it?s the default for many DHCP servers).
  4. If you are using a large network with so many DHCP clients, use a rigid DHCP server. Do NOT use SOHO routers for large networks.

The second part of this article will be on implementation of DHCP servers in Cisco Routers and Windows 2003 servers and DHCP clients.

Comments

Write Comment
Name:
Title:
Comment:

Thank you for writing a comment

< Previous
 
Polls
Do you think that the CCNA exam needs to be upgraded ?
  
Bookmark Us
 
 

Newsletter Subscription

Get weekly updates of articles in CERTIFICATIONist.com




RSS Feeds
Stay in touch with whats new on CERTIFICATIONist.com

 Subscribe with FeedBurner


Add to Technorati Favorites
View blog reactions