Monday, 20 August 2012

Internet Technology: DHCP (Dynamic Host Configuration Protocol)

What is DHCP?

DHCP (Dynamic Host Configuration Protocol) is used in Internet communication. IP networks (Internet Protocol) form the basis for Internet services, including the Web and email. In order to use these services, a client's computer must make a connection to an IP network. To make this connection, a number of configuration processes must occur, and this is where protocols such as DHCP come in.

Internet Connections

To access Internet services, a client computer needs an IP address, and the DHCP protocol is one of the ways in which such addresses are assigned. Different ISPs (Internet Service Providers) have varying approaches to handling IP addressing. Dynamic addressing is where addresses are only assigned as and when the client computers need them, i.e. when they attempt to make connections to the network. This is the type of addressing in which DHCP is used.

The DHCP Process

The process by which client computers are assigned IP addresses, in order to connect to Internet services, requires a series of stages, during which messages are sent and received between the client and the network. The client initially sends out messages to discover DHCP servers, and these servers then automatically carry out the addressing process through a number of discrete steps, each in turn associated with particular types of message packet.

The general principle of IP addressing through DHCP is that addresses are leased, or hired, to clients only when required. This means that one of the primary tasks of the DHCP servers is to assign these IP addresses when clients need them, and the process is carried out automatically, without DHCP administrators having to get involved.

DCHP Messages

DHCP communication is achieved through messages being sent and received by the client computer trying to make a connection. A DHCPDISCOVER message packet is initially sent to discover DHCP servers. At this stage a client computer is able to request the same IP address as the last one assigned to it, although this may no longer be available.

After identifying an IP address that is currently available, a DHCP server will send an offer to the client, using the DHCPOFFER message packet. More than one of the DHCP servers may have offered the client an IP address, so the client must accept just one of these offers, and it does this by sending a request message, or DHCPREQUEST packet. The request packet will refer to the IP address offered as well as the location of the server that offered it. This allows the other servers to reallocate their offered IP addresses to any other potential clients.

The final stage, which ultimately lets the client connect to the Internet, involves the DHCP server confirming the assignment of the requested IP address using a DHCPPACK message. All information necessary for the client configuration allowing a connection to be made will be contained within this last packet, which may also indicate how long the IP address lease is for.

DHCP Advantages

There are a number of advantages to using DHCP for Internet connectivity. One benefit is the fact that the IP addressing process is automated, and does not require the manual input of network administrators. Another primary advantage is the fact that IP addresses are only assigned when they are being used, which allows networks to maximise on the pool of addresses that exist within their resources at any one time.

Alternatives To DHCP

The main alternatives to DHCP, which uses dynamic IP addressing, are static methods. Static IP addresses are assigned on a fixed basis, with clients using the same IP address each time a connection is made. There are certain Web and Internet services which require clients to use static IP addresses, but for most people dynamic addressing does not affect Internet use negatively at all. ISP policies are typically what dictate whether static or dynamic addressing is used.

Links

DHCP (Dynamic Host Configuration Protocol) Basics
Dynamic Host Configuration Protocol - Microsoft TechNet
What is DHCP? - Indiana University Knowledge Base
Understanding the DHCP Protocol (Part 1)
DHCP Messages - Microsoft TechNet
RFC 2131 - Dynamic Host Configuration Protocol
DHCP - The Computer Technology Documentation Project

No comments:

Post a Comment