the offers. Web Links DHCP Overview
http://support.baynetworks.com/library/ tpubs/html/router/
soft1200/ 117362AA/A_29.HTM
Content 1.2
DHCP 1.2.4 DHCP operation The DHCP client
configuration process uses the following steps: - A
client must have DHCP configured when starting the network
membership process. The client sends a request to a server
requesting an IP configuration. Sometimes the client may
suggest the IP address it wants, such as when requesting an
extension to a DHCP lease. The client locates a DHCP server by
sending a broadcast called a DHCPDISCOVER.
- When the
server receives the broadcast, it determines whether it can
service the request from its own database. If it cannot, the
server may forward the request on to another DHCP server. If it
can, 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.
- If the client finds
the offer agreeable, it will send another broadcast, 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
first message, the DHCPDISCOVER, may have reached more than one
DHCP server. If more than one server makes an offer, the
broadcasted DHCPREQUEST allows the other servers to know which
offer was accepted. The offer accepted is usually the first
offer received.
- The server that receives the
DHCPREQUEST makes the configuration official by sending a
unicast acknowledgment, the DHCPACK. It is possible, but highly
unlikely, that the server will not send the DHCPACK. This may
happen because the server may have leased that information to
another client in the interim. Receipt of the DHCPACK message
enables the client to begin using the assigned address
immediately.
- If the client detects that the address
is already in use on the local segment it will send a
DHCPDECLINE message and the process starts again. If the client
received a DHCPNACK from the server after sending the
DHCPREQUEST, then it will restart the process again.
-
If the client no longer needs the IP address, the client sends
a DHCPRELEASE message to the server.
Depending on an
organization's policies, it may be possible for an end user or
an administrator to statically assign a host an IP address that
belongs in the DHCP servers address pool. Just in case, the
Cisco IOS DHCP server always checks to make sure that an
address is not in use before the server offers it to a client.
The server will issue an ICMP echo request, or will ping, to a
pool address before sending the DHCPOFFER to a client. Although
configurable, the default number of pings used to check for a
potential IP address conflict is two. Web Links DHCP
Operation http://www.cs.utexas.edu/users/ ypraveen/surveys/
DHCP/ node2.html
Content 1.2 DHCP
1.2.5 Configuring DHCP Like NAT, a DHCP server
requires that the administrator define a pool of addresses. The
ip dhcp pool command defines which addresses will be
assigned to hosts.The first command, ip dhcp pool,
creates a pool with the specified name and puts the router in a
specialized DHCP configuration mode. In this mode, use the
network statement to define the range of addresses to be
leased. If specific addresses on the network are to be
excluded, return to global configuration mode. The ip dhcp
excluded-address command configures the router to exclude
an individual address or range of addresses when assigning
addresses to clients. The ip dhcp excluded-address
command may be used to reserve addresses that are statically
assigned to key hosts, for instance, the interface address on
the router. Typically, a DHCP server will be configured to
assign much more than an IP address. Other IP configuration
values such as the default gateway can be set from the DHCP
configuration mode. Using the default-router command
sets the default gateway. The address of the DNS server,
dns-server, and WINS server, netbios-name-server,
can also be configured here. The IOS DHCP server can configure
clients with virtually any TCP/IP information. A list of the
key IOS DHCP server commands entered in the DHCP pool
configuration mode are shown in Figure . The DHCP service is
enabled by default on versions of Cisco IOS that support it. To
disable the service, use the no service dhcp command.
Use the service dhcp global configuration command to
re-enable the DHCP server process. Web Links Configuring
DHCP http://www.cisco.com/en/US/products/sw/ iosswrel/ps1835/
products_configuration_guide_ chapter09186a00800ca75c.html
Content 1.2 DHCP 1.2.6
Verifying DHCP operation To verify the operation of DHCP,
the command show ip dhcp binding can be used. This
displays a list of all bindings created by the DHCP service. To
verify that messages are being received or sent by the router,
use the command show ip dhcp server statistics. This
will display count information regarding the number of DHCP
messages that have been sent and received. Lab
Activity Lab Exercise: Configuring DHCP In this lab, the
student will configure a router for Dynamic Host Configuration
Protocol (DHCP). Lab Activity e-Lab Activity:
Configuring DHCP In this lab, the student will configure a
router for DHCP, add the ability for workstations to remotely
obtain DHCP addresses and dynamically assign addresses to the
attached hosts. Web Links Configuring DHCP
http://www.cisco.com/en/US/products/sw/
iosswrel/ps1835/products_configuration_
guide_chapter09186a00800ca75c.html
Content 1.2
DHCP 1.2.7 Troubleshooting DHCP To
troubleshoot the operation of the DHCP server, the command
debug ip dhcp server events can be used. This command will
show that the server periodically checks to see if any leases
have expired. Also, it can be seen when addresses are returned
and when they are allocated.
Content 1.2
DHCP 1.2.8 DHCP relay DHCP clients use IP
broadcasts to find the DHCP server on the segment. What happens
when the server and the client are not on the same segment and
are separated by a router? Routers do not forward these
broadcasts. DHCP is not the only critical service that uses
broadcasts. Cisco routers and other devices may use broadcasts
to locate TFTP servers. Some clients may need to broadcast to
locate a TACACS server. A TACACS server is a security server.
Typically, in a complex hierarchical network, clients reside on
the same subnet as key servers. Such remote clients will
broadcast to locate these servers. However, routers, by
default, will not forward client broadcasts beyond their
subnet. Because some clients are useless without services such
as DHCP, one of two choices must be implemented. The
administrator will need to place servers on all subnets or use
the Cisco IOS helper address feature. Running services such as
DHCP or DNS on several computers creates overhead and
administrative difficulties making the first option
inefficient. When possible, administrators should use the ip
helper-address command to relay broadcast requests for
these key UDP services. By using the helper address feature, a
router can be configured to accept a broadcast request for a
UDP service and then forward it as a unicast to a specific IP
address. By default, the ip helper-address command
forwards the following eight UDP services: - Time
- TACACS
- DNS
- BOOTP/DHCP Server
- BOOTP/DHCP Client
- TFTP
- NetBIOS Name
Service
- NetBIOS datagram Service
In the
particular case of DHCP, a client broadcasts a DHCPDISCOVER
packet on its local segment. This packet is picked up by the
gateway. If a helper-address is configured, the DHCP packet is
forwarded to the specified address. Before forwarding the