DHCP
DHCP represents the abutting footfall in the change of activating IP abode assignment. Building on the
format of BOOTP protocols, DHCP focuses on dynamically allotment a array of information
and provides adjustable messaging to acquiesce for approaching changes, after acute predefinition of
MAC addresses for anniversary client. DHCP additionally includes acting leasing of IP addresses, enabling
address reclamation, pooling of IP addresses, and, recently, activating allotment of applicant DNS
134 Chapter 5: IP Services
fully able area names (FQDNs). (See http://www.ietf.org for added advice on FQDN
registration.)
DHCP servers about abide in a centralized location, with alien routers forwarding the LANbroadcast
DHCP requests to the DHCP server by alteration the request’s destination abode to
match the DHCP server. This affection is alleged DHCP advertisement agent. For instance, in Figure 5-1, if
Fred and Barney were to use DHCP, with the DHCP server at 10.1.2.202, R1 would change Fred’s
DHCP appeal from a antecedent and destination of 255.255.255.255 to a antecedent of 10.1.1.255
(directed advertisement of Fred’s subnet) and destination of 10.1.2.202. The DHCP appeal would then
be baffled to the DHCP server, and the DHCP acknowledgment would be forwarded to destination
10.1.1.255. The router would again advertisement the DHCP acknowledgment aback assimilate that subnet, as the
destination abode is Fred’s subnet’s advertisement address. The alone agreement claim on
the router is an ip helper-address 10.1.2.202 interface subcommand on its E1 interface.
Alternatively, R1 could be configured as a DHCP server—a affection that is not generally configured on
routers in assembly networks but is absolutely fair bold for the CCIE accounting and lab exams.
Configuring DHCP on a router consists of several appropriate steps:
Step 1 Configure a DHCP pool.
Step 2 Configure the router to exclude its own IP abode from the DHCP pool.
Step 3 Attenuate DHCP battle logging or configure a DHCP database agent.
The DHCP basin includes key items such as the subnet (using the arrangement command aural DHCP
pool configuration), absence aperture (default-router), and the breadth of time for which the DHCP
lease is accurate (lease). Added items, including the DNS area name and any DHCP options, are
also authentic aural the DHCP pool.
Although not carefully all-important in DHCP configuration, it is absolutely a best convenance to configure
the router to accomplish its own IP abode in the DHCP basin subnet bare for allocation via
DHCP. The aforementioned is accurate for any added changeless IP addresses aural the DHCP basin range, such as
those of servers and added routers. Exclude host IP addresses from the DHCP action application the ip
dhcp excluded-address command.
The Cisco IOS DHCP server additionally provides a apparatus for logging DHCP abode conflicts to a
central server alleged a DHCP database agent. IOS requires that you either attenuate battle logging
by application the no ip dhcp conflict-logging command or configure a DHCP database abettor on a
NOTE The ip dhcp excluded-address command is one of the almost few Cisco IOS ip
commands that is a all-around agreement command rather than an interface command.
HSRP, VRRP, and GLBP 135
server by application the ip dhcp database command. Example 5-1 shows R1’s agreement for a
DHCP advertisement agent, as able-bodied as an another for R1 to accommodate DNS casework for subnet 10.1.1.0/24.
Table 5-2 summarizes some of the key allegory credibility with RARP, BOOTP, and DHCP.
HSRP, VRRP, and GLBP
IP hosts can use several methods of chief which absence router or absence aperture to use—
DHCP, BOOTP, ICMP Router Discovery Agreement (IRDP), chiral configuration, or alike by
running a acquisition agreement (although accepting hosts run a acquisition agreement is not accepted today).
The best archetypal methods—using DHCP or chiral configuration—result in the host alive a
Example 5-1 DHCP Agreement Options—R1, Figure 5-1
! UDP broadcasts advancing in E0 will be forwarded as unicasts to 10.1.2.202.
! The antecedent IP will be afflicted to 10.1.1.255, so that the acknowledgment packets will be
! advertisement aback out E0.
interface Ethernet1
ip abode 10.1.1.1 255.255.255.0
ip helper-address 10.1.2.202
! Below, an another configuration, with R1 as the DHCP server. R1 assigns IP
! addresses added than the afar aboriginal 20 IP addresses in the subnet, and informs the
! audience of their IP addresses, mask, DNS, and absence router. Leases are for 0 days,
! 0 hours, and 20 minutes.
ip dhcp excluded-address 10.1.1.0 10.1.1.20
!
ip dhcp basin subnet1
network 10.1.1.0 255.255.255.0
dns-server 10.1.2.203
default-router 10.1.1.1
lease 0 0 20
Table 5-2 Comparing RARP, BOOTP, and DHCP
Feature RARP BOOTP DHCP
Relies on server to admeasure IP addresses Yes Yes Yes
Encapsulates letters central IP and UDP, so they can be
forwarded to a alien server
No Yes Yes
Client can ascertain its own mask, gateway, DNS, and download
server
No Yes Yes
Dynamic abode appointment from a basin of IP addresses,
without acute ability of applicant MACs
No No Yes
Allows acting charter of IP abode No No Yes
Includes extensions for registering client’s FQDN with a DNS No No Yes