Posts Tagged 'DHCP'

Revisiting an Old Friend: DHCP

In this post we will revisit an old friend that is used quite often in all of our modern networks, Dynamic Host Configuration Protocol (DHCP). The DHCP process allows a server to automatically provision IPv4 addresses, along with other important configurations, to clients as they boot up.

There are two principle advantages to using a DHCP server in your network.

  1. DHCP makes it easier to administer an IP network. Without the DHCP functionality, administrators would have to manually assign and track IP addresses, which is a process that is inherently labor intensive and, unfortunately, error-prone.
  2. DHCP allows clients to temporarily use IP addresses and thus make better use of IP address space. For example, DSL customers of an ISP only need an IP address when they are currently online.

DHCP uses a client-server architecture. The client sends a broadcast request for configuration information. The DHCP server receives the request and responds with configuration information from its configuration database. DHCP automates network-parameter assignment to network devices from one or more fault-tolerant DHCP servers. Even in small networks, DHCP is useful because it can make it easy to add new machines to the network.

When a DHCP-configured client, such as a computer or any other network-aware device, connects to a network, the DHCP client sends a broadcast query requesting necessary information from a DHCP server. The DHCP server manages a pool of IP addresses, along with other information about client configuration parameters. These additional parameters could include information such as the network default gateway, domain name, the DNS servers, and additional servers such as time servers. On receiving a valid request, the server assigns the computer an IP address with a lease, which is a length of time the allocation is valid. The query from the client is typically initiated immediately after booting and must be completed before the client can initiate IP-based communication with other hosts.

Continue reading ‘Revisiting an Old Friend: DHCP’

Dynamic Host Configuration Protocol (DHCP)

As presented in previous posts, there are four tools that are used 24/7 in almost every TCP/IP network in the world to help the network layer – Layer 3 – with its task of routing packets end-to-end through an internetwork. These automated tools are identified as:

  • Address Resolution Protocol (ARP)
  • Domain Name Service (DNS)
  • Dynamic Host Configuration Protocol (DHCP)
  • Ping

And, every device that uses TCP/IP, in fact every interface on every device, needs a valid IP address. For some of these devices, the IP address can, and should, be statically assigned through configuration of the individual device. Of course, the method used to assign IP addresses to interfaces is, many times, a matter of organizational policies and procedures.

As an example, all of the commonly-used computer operating systems that support TCP/IP enable the user to statically configure the IP address on each interface. For instance, routers and switches typically use statically configured IP addresses. Also, servers typically use statically configured IP addresses. Using a statically configured and seldom-changed IP address helps because all references to that server can stay the same over time.

It’s the same concept as knowing the address of your favorite electronics store. The location never changes and you always know how to get there from your home, on the way home from work, or from somewhere else. In a similar manner, if servers have a static, unchanging IP address, the users of that server know how to reach the server from anywhere, consistently.

However, the end-user device host computer does not, necessarily, need to use the same IP address every day. Thinking back to the example of your favorite electronics store, you could move to a new apartment every week, but you still know where the electronics store is. The workers at the store do not need to know where you live. Likewise, servers typically don’t care that your PC has a different IP address today than yesterday.

As computers become smaller and lighter, it is more common for them to move from one network to another, where they would require a different IP address and network and or subnetwork. Actually, we find that in the course of a normal business day, many laptops and palmtops could move from one network to another many times per day. In reality, we find that on a worldwide basis, DHCP is used for everything from assigning IP addresses for corporate networks with thousands of hosts, to enabling a home Internet access router to automatically provide the correct Internet configuration to a single user’s computer.

DHCP defines the protocols used to allow computers and other devices to request a permanent IP address or lease a temporary address. The DHCP process is modeled on the client-server configuration. The DHCP process uses a server that maintains a list of pools of IP addresses available in each subnet. The user devices, or DHCP clients, can send the DHCP server a message, asking to be permanently assigned, or to lease an IP address. The DHCP server then suggests an IP address and, if accepted by the DHCP client, the server notes that the IP address is no longer available for assignment to any other hosts and the client has an address to use.

When this dynamic DHCP IP address allocation is used, the network administrator must configure the parameters on the DHCP server to control how leases are assigned, managed and, most importantly, how long the administrator wants the client leases to last. The administrator can set the lease time to infinity or, in essence, a permanent lease. However, administrators can choose a number that best suits the network. Some of the most often-used lease periods are:

  • One Hour or Less
  • One Day
  • Three Days
  • One Week
  • One Month
  • Three Months
  • One Year

It’s interesting to note that with the DHCP process, clients no longer own their IP addresses. They lease them from the true owner, the DHCP server. As such, the primary job of both the DHCP server and the administrator of that server is to maintain and manage client addresses.

When properly configured, a DHCP server can also supply additional information to a client. For example, in addition to learning their IP address, a host needs to know the subnet mask to use, plus what default gateway to use, as well as the IP address(es) of any DNS servers. In most networks today, DHCP supplies all of these facts to a typical end-user host.

Author: David Stahl