Home > Articles > Cisco > Cisco Networking Academy

This chapter is from the book

DHCP and Easy IP

This section discusses DHCP and its operation. It covers how to configure DHCP, and use Easy IP as well.

DHCP Overview

After designing a scalable IP addressing scheme for the enterprise, the next step is implementation. Routers, servers, and other key nodes usually require special attention from administrators. However, desktop clients are often automatically assigned IP configurations using Dynamic Host Configuration Protocol (DHCP). Because desktop clients typically make up the bulk of network nodes, DHCP is good news for systems administrators. Small offices and home offices can also take advantage of DHCP by using Easy IP, a Cisco IOS software feature set that combines DHCP with NAT functions.

DHCP works by configuring servers to give out IP configuration information to clients. Clients lease the information from the server for an administratively defined period. When the lease is up, the host must ask for another address, although it is typically reassigned the same one. Figures 2-17 and 2-18 illustrate this process. In Figure 2-17, Host A issues a DHCP request for an IP address. In Figure 2-18, the DHCP server replies to the DHCP request by leasing an IP address from the configured IP address pool.

Figure 17Figure 2-17 Simple DHCP Operation: Client/Server



 

Figure 18Figure 2-18 Simple DHCP Operation: Reply

 

Administrators typically prefer to use a Microsoft 2000 server or a UNIX computer to offer DHCP services because these solutions are highly scalable and relatively easy to manage. Even so, the Cisco IOS software offers an optional, fully featured DHCP server, which leases configurations for 24 hours by default.

Administrators set up DHCP servers to assign addresses from predefined pools. DHCP servers can also provide other information:

  • Default gateway address

  • DNS server addresses

  • WINS server addresses

  • Domain names

Most DHCP servers also let you specifically define what client MAC addresses can be serviced and automatically assign the same number to a particular host each time.

DHCP Operation

The DHCP client configuration process is shown in Figure 2-19.

Figure 19Figure 2-19 DHCP Operation

 

The DHCP client configuration process follows these steps:

  1. When a client is set up for DHCP and needs an IP configuration, typically at boot time, it tries to locate a DHCP server by sending a broadcast called a DHCPDISCOVER.

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

  3. The client sends a DHCPREQUEST broadcast to all nodes. If the client finds the offer agreeable, it sends another broadcast. This broadcast is a DHCPREQUEST, specifically requesting those particular IP parameters. Why does the client broadcast the request instead of unicasting it to the server? A broadcast is used because the very first message, the DHCPDISCOVER, might have reached more than one DHCP server. After all, it was a broadcast. If more than one server makes an offer, the broadcasted DHCPREQUEST lets the servers know which offer was accepted, which is usually the first offer received.

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

Depending on an organization's policies, it might be possible for an end user or administrator to statically assign a host an IP address that belongs in the DHCP server address pool. Just in case, the Cisco IOS software DHCP server always checks to make sure that an address is not in use before the server offers it to a client. The server issues ICMP echo requests (pings) to a pool address before sending the DHCPOFFER to a client. Although it can be configured, the default number of pings used to check for potential IP address conflict is two. The more pings, the longer the configuration process takes.

Configuring the IOS DHCP Server

The DHCP server process is enabled by default on versions of the Cisco IOS software that support it. If for some reason the DHCP server process becomes disabled, you can reenable it by using the service dhcp global configuration command. The no service dhcp command disables the server.

Like NAT, DHCP servers require that the administrator define a pool of addresses. In Example 2-3, the ip dhcp pool command defines which addresses are assigned to hosts.

Example 2-3 Configuring a DHCP Address Pool

RTA(config)#ip dhcp pool room12
RTA(dhcp-config)#network 172.16.1.0 255.255.255.0
RTA(dhcp-config)#exit
RTA(config-if)#ip dhcp excluded-address 172.16.1.1 172.16.1.10

The first command, ip dhcp pool room12, creates a pool named room12 and puts the router in a specialized DHCP configuration mode. In this mode, you use the network statement to define the range of addresses to be leased. If specific addresses are to be excluded on this network, return to global configuration mode and enter the ip dhcp excluded-address command.

The ip dhcp excluded-address command configures the router to exclude 172.16.1.1 through 172.16.1.10 when assigning addresses to clients. The ip dhcp excluded-address command may be used to reserve addresses that are statically assigned to key hosts.

A DHCP server can configure much more than an IP address. Other IP configuration values can be set from DHCP configuration mode, as shown in Example 2-4.

Example 2-4 Assigning Key DHCP Information

RTA(config)#ip dhcp pool room12
RTA(dhcp-config)#dns-server 172.16.1.2
RTA(dhcp-config)#netbios-name-server 172.16.1.2
RTA(config-if)#default-router 172.16.1.1

IP clients will not get very far without a default gateway, which can be set by using the default-router command. The address of the DNS server, dns-server, and WINS server, netbios-name-server, can be configured here as well. The IOS DHCP server can configure clients with virtually any TCP/IP information.

Table 2-8 lists the key IOS DHCP server commands. These commands are entered in DHCP pool configuration mode, identified by the router(dhcp-config)# prompt.

Table 2-8 Key DHCP Server Commands

Command

Description

network network-number [mask | /prefix-length]

Specifies the subnet network number and mask of the DHCP address pool. The prefix-length portion specifies the number of bits that comprise the address prefix. The prefix is the alternative way of specifying the client's network mask. The prefix-length must be preceded by a slash (/).

default-router address [address2...address8]

Specifies the IP address of the default router or default gateway for a DHCP client. One IP address is required, although up to eight addresses can be specified in one command line.

dns-server address [address2...address8]

Specifies the IP address of a DNS server that is available to a DHCP client. One IP address is required, although up to eight addresses can be specified in one command line.

netbios-name-server address [address2...address8]

Specifies the IP address of the NetBIOS WINS server that is available to a Microsoft DHCP client. One IP address is required, although up to eight addresses can be specified in one command line.

domain-name domain

Specifies the client's domain name.

lease {days [hours] [minutes] | infinite}

Specifies the duration of the DHCP lease. The default is a one-day lease.


Use the EXEC mode commands, shown in Table 2-9, to monitor DHCP server operation.

Table 2-9 Key Commands for Monitoring DHCP Operation

Command

Definition

show ip dhcp binding [address]

Displays a list of all bindings (MAC to IP address) created on a specific DHCP server.

show ip dhcp conflict [address]

Displays a list of all address conflicts recorded by a specific DHCP server.

show ip dhcp database [url]

Displays recent activity on the DHCP database. (Use this command in privileged EXEC mode.)

show ip dhcp server statistics

Displays count information about server statistics and messages sent and received.


Easy IP

Easy IP is a combination suite of Cisco IOS software features that allows a router to negotiate its own IP address, as a DHCP client, and to do NAT through that negotiated address. Easy IP is typically deployed on a small office, home office (SOHO) router. It is useful in cases where a small LAN connects to the Internet by way of a provider that dynamically assigns only one IP address for the entire remote site, as shown in Figure 2-20.

Figure 20Figure 2-20 Cisco IOS Easy IP


A SOHO router with the Easy IP feature set uses DHCP, as a server, to automatically address local LAN clients with RFC 1918 addresses. When the router dynamically receives its WAN interface address by way of PPP, it uses NAT overload to translate between local inside addresses and its single global address. Therefore, both the LAN side and the WAN side are dynamically configured with little or no administrative intervention. In effect, Easy IP offers plug-and-play routing.

Pearson IT Certification Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Pearson IT Certification and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Pearson IT Certification products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.pearsonitcertification.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020