Search | Glossary
7 IP Addressing Services
CCNA Exploration - Accessing the WAN
7 IP Addressing Services
7.0 Chapter Introduction
The Internet and IP-related technologies have experienced rapid growth. One reason for the growth has been due in part to the flexibility of the original design. However, that design did not anticipate the Internet's popularity and the resulting demand for IP addresses. For example, every host and device on the Internet requires a unique IP version 4 (IPv4) address. Because
of the dramatic growth, the number of available IP addresses is quickly running out.
To cope with the depletion of IP addresses, several short-term solutions were developed. Two short-term solutions are private addresses and Network Address Translation (NAT).
An inside host typically receives its IP address, subnet mask, default gateway IP address, DNS server IP address, and other information from a Dynamic Host Configuration Protocol (DHCP) server. Instead of providing inside hosts with valid Internet IP addresses, the DHCP server usually provides IP addresses from a private pool of addresses. The problem is that these hosts may still require valid IP addresses to access Internet resources. This is where NAT comes in.
NAT enables inside network hosts to borrow a legitimate Internet IP address while accessing Internet resources. When the requested traffic returns, the legitimate IP address is repurposed and available for the next Internet request by an inside host. Using NAT, network administrators only need one or a few IP addresses for the router to provide to the hosts, instead of one unique IP address for every client joining the network. Although it sounds inefficient, the process is actually very efficient, because host traffic occurs very quickly.
Although private addresses with DHCP and NAT have helped reduce the need for IP addresses, it is estimated that we will run out of unique IPv4 addresses by 2010. For this reason, in the mid-1990s, the IETF requested proposals for a new IP addressing scheme. The IP Next Generation (IPng) working group responded. By 1996, the IETF started releasing a number of RFCs defining IPv6.
The main feature of IPv6 that is driving adoption today is the larger address space: addresses in IPv6 are 128 bits long versus 32 bits in IPv4.
This chapter describes how to implement DHCP, NAT, and IPv6 on enterprise networks.
7.1.1 Introducing DHCP
What is DHCP?
Every device that connects to a network needs an IP address. Network administrators assign static IP addresses to routers, servers, and other network devices whose locations (physical and logical) are not likely to change. Administrators enter static IP addresses manually when they configure devices to join the network. Static addresses also enable administrators to manage those devices remotely.
However, computers in an organization often change locations, physically and logically. Administrators are unable to keep up with having to assign new IP addresses every time an employee moves to a different office or cubicle. Desktop clients do not require a static address. Instead, a workstation can use any address within a range of addresses. This range is typically within an IP subnet. A workstation within a specific subnet can be assigned any address within a specified range. Other items such as the subnet mask, default gateway, and Domain Name System (DNS) server are assigned a value which is common either to that subnet or entire administrated network. For example, all hosts within the same subnet will receive different host IP addresses, but will receive the same subnet mask and default gateway IP address."
Recall from CCNA Exploration: Network Fundamentals that DHCP makes the process of assigning new IP addresses almost transparent. DHCP assigns IP addresses and other important network configuration information dynamically. Because desktop clients typically make up the bulk of network nodes, DHCP is an extremely useful and timesaving tool for network administrators. RFC 2131 describes DHCP.
Administrators typically prefer a network server to offer DHCP services, because these solutions are scalable and relatively easy to manage. However, in a small branch or SOHO location, a Cisco router can be configured to provide DHCP services without the need for an expensive dedicated server. A Cisco IOS feature set called Easy IP offers an optional, full-featured DHCP server.
7.1.2 DHCP Operation
Providing IP addresses to clients is the most fundamental task performed by a DHCP server. DHCP includes three different address allocation mechanisms to provide flexibility when assigning IP addresses:
; Manual Allocation: The administrator assigns a pre-allocated IP address to the client and
DHCP only communicates the IP address to the device.
; Automatic Allocation: DHCP automatically assigns a static IP address permanently to a
device, selecting it from a pool of available addresses. There is no lease and the address is
permanently assigned to a device.
; Dynamic Allocation: DHCP automatically dynamically assigns, or leases, an IP address from a
pool of addresses for a limited period of time chosen by the server, or until the client tells
the DHCP server that it no longer needs the address.
This section focuses on dynamic allocation.
DHCP works in a client/server mode and operates like any other client/server relationship. When a PC connects to a DHCP server, the server assigns or leases an IP address to that PC. The PC connects to the network with that leased IP address until the lease expires. The host must contact the DHCP server periodically to extend the lease. This lease mechanism ensures that hosts that move or power off do not hold onto addresses that they do not need. The DHCP server returns these addresses to the address pool and reallocates them as necessary.
Click the Discover button in the figure.
When the client boots or otherwise wants to join a network, it completes four steps in obtaining a lease. In the first step, the client broadcasts a DHCPDISCOVER message. The DHCPDISCOVER message finds DHCP servers on the network. Because the host has no valid IP information at bootup, it uses L2 and L3 broadcast addresses to communicate with the server.
Click the Offer button in the figure.
When the DHCP server receives a DHCDISCOVER message, it finds an available IP address to lease, creates an ARP entry consisting of the MAC address of the requesting host and the leased IP address, and transmits a binding offer with a DHCPOFFER message. The DHCPOFFER message is sent as a unicast, using the L2 MAC address of the server as the source address and the L2 address of the client as the destination.
Note: Under certain circumstances, the DHCP message exchange from the server may be broadcasted and not unicasted.
Click the Request button in the figure.
When the client receives the DHCPOFFER from the server, it sends back a DHCPREQUEST message. This message has two purposes: lease origination and lease renewal and verification. When used for lease origination, the DHCPREQUEST of the client is requesting that the IP information be verified just after it has been assigned. The message provides error checking to ensure that the assignment is still valid. The DHCPREQUEST also serves as a binding acceptance notice to the selected server and an implicit decline to any other servers that may have provided the host a binding offer.
Many enterprise networks use multiple DHCP servers. The DHCPREQUEST message is sent in the form of a broadcast to inform this DHCP server and any other DHCP servers about the accepted offer.
Click the Acknowledge button in the figure.
On receiving the DHCPREQUEST message, the server verifies the lease information, creates a new ARP entry for the client lease, and replies with a unicast DHCPACK message. The DHCPACK message is a duplicate of the DHCPOFFER, except for a change in the message type field. When the client receives the DHCPACK message, it logs the configuration information and performs an ARP lookup for the assigned address. If it does not receive a reply, it knows that the IP address is valid and starts using it as its own.
Clients lease the information from the server for an administratively defined period. Administrators configure DHCP servers to set the leases to time out at different intervals. Most ISPs and large networks use default lease durations of up to three days. When the lease expires, the client must ask for another address, although the client is typically reassigned the same address.
The DHCPREQUEST message also addresses the dynamic DHCP process. The IP
information sent in the DHCPOFFER might have been offered to another client during the dynamic allocation. Each DHCP server creates pools of IP addresses and associated parameters. Pools are dedicated to individual, logical IP subnets. The pools allow multiple DHCP servers to respond and IP clients to be mobile. If multiple servers respond, a client can choose only one of the offers.
7.1.3 BOOTP and DHCP
BOOTP and DHCP
The Bootstrap Protocol (BOOTP), defined in RFC 951, is the predecessor of DHCP and
shares some operational characteristics. BOOTP is a way to download address and boot configurations for diskless workstations. A diskless workstation does not have a hard drive or an operating system. For example, many automated cash register systems at your local super market are examples of diskless workstations. Both DHCP and BOOTP are client/server based and use UDP ports 67 and 68. Those ports are still known as BOOTP ports.
DHCP and BOOTP have two components, as shown in the figure. The server is a host with a static IP address that allocates, distributes, and manages IP and configuration data assignments. Each allocation (IP and configuration data) is stored on the server in a data set called a binding. The client is any device using DHCP as a method for obtaining IP addressing or supporting configuration information.
To understand the functional differences between BOOTP and DHCP, consider the four basic IP parameters needed to join a network:
; IP address
; Gateway address
; Subnet mask
; DNS server address
There are three primary differences between DHCP and BOOTP:
; The main difference is that BOOTP was designed for manual pre-configuration of the host
information in a server database, while DHCP allows for dynamic allocation of network
addresses and configurations to newly attached hosts. When a BOOTP 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, 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.
; DHCP allows for recovery and reallocation of network addresses through a leasing
mechanism. Specifically, 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. BOOTP does
not use leases. Its clients have reserved IP address which cannot be assigned to any other
; BOOTP provides a limited amount of information to a host. DHCP provides additional IP
configuration parameters, such as WINS and domain name.
DHCP Message Format
The developers of DHCP needed to maintain compatibility with BOOTP and consequently used the same BOOTP message format. However, because DHCP has more functionality than BOOTP, the DHCP options field was added. When communicating with older BOOTP clients, the DHCP options field is ignored.
The figure shows the format of a DHCP message. The fields are as follows:
; Operation Code (OP) - Specifies the general type of message. A value of 1 indicates a request
message; a value of 2 is a reply message.
; Hardware Type