3600 Cisco IOS DHCP Server
3600 Cisco IOS DHCP Server
Feature Summary
With the introduction of Cisco IOS Easy IP Phase 2, Cisco IOS software supports Cisco IOS
Dynamic Host Control Protocol (DHCP) Server functionality. DHCP is a protocol that enables you
to automatically assign reusable IP addresses to clients. Cisco IOS DHCP server is a full DHCP
server implementation that assigns and manages IP addresses from specified address pools within
the router to DHCP hosts. For a complete list of supported DHCP options, see Table 1 in the
“Functional Description” section. For more specific information about DHCP concepts, see RFC
2131. For information about DHCP options, see RFC 2132.
Also, Cisco IOS Easy IP Phase 2 supports DHCP Relay Agent functionality. A DHCP relay agent is
any host that forwards DHCP packets between clients and servers with the goal of automatically
assigning an IP address and address parameters to a client requesting an address. A DHCP relay
agent enables the client and server to reside on separate subnets. If the Cisco IOS DHCP server
cannot satisfy a DHCP request from its own database, it can forward the DHCP request to one or
more secondary DHCP servers defined by the network administrator.
Figure 1 shows the initial steps that occur in the process of a client being assigned an IP address. The
client, Host A, sends a DHCP request to the Cisco IOS DHCP server, using dhcpdiscover, which is
a broadcast message requesting an IP address. Cisco IOS DHCP server then sends the request along
to a remote central DHCP server.
Host A
SOHO Central site
DHCP request
Easy IP
WAN link
Cisco IOS
DHCP server
15430
Host B
Figure 2 shows the response of the Cisco IOS DHCP server. Using the dhcpoffer message, the Cisco
IOS DHCP Server sends a unicast message to the client, offering address parameters, typically an IP
address, a MAC address, a domain name, and a lease on the address. The client can accept or reject
the address parameters. The client responds by sending a dhcprequest message. The server sends a
dhcpack to confirm acceptance.
Host A
SOHO Central site
"Your IP address
is 10.0.0.1"
Easy IP
WAN link
Cisco IOS
DHCP server
15431
Host B
Benefits
Cisco IOS DHCP server offers the following benefits:
• Reduced Internet access costs
Using automatic IP address assignment at each remote site substantially reduces Internet access
costs. Static IP addresses are considerably more expensive to purchase than are automatically
allocated IP addresses.
• Simplified IP address management
DHCP enables Internet service providers (ISPs) to allocate a single registered IP address to each
remote LAN. Because only a single registered IP address is required to provide global Internet
access to all users on an entire remote LAN, customers and ISPs can use their registered IP
addresses more efficiently.
• Reduced client configuration tasks and costs
Because DHCP is easy to configure, it minimizes operational overhead and costs associated with
device configuration tasks and eases deployment by non-technical users.
• Reduced management tasks
Hosts in remote offices can obtain dynamic IP addresses directly from the remote office router
via the Cisco IOS DHCP server, eliminating the need to configure and maintain a separate and
standalone DHCP server in the remote office.
List of Terms
address binding—A mapping between the client’s IP and hardware (MAC) addresses. The client’s
IP address may be configured by the administrator (manual address allocation) or assigned from a
pool by the DHCP server (automatic address allocation). The binding also contains a lease expiration
date. The default for the lease expiration date is one day.
2 Release 12.0(1)T
List of Terms
address conflict—A duplication of use of the same IP address by two hosts. During address
assignment, DHCP checks for conflicts using ping and gratuitous ARP. If a conflict is detected, the
address is removed from the pool. The address will not be assigned until the administrator resolves
the conflict.
address pool—The range of IP addresses assigned by the DHCP server. Address pools are indexed
by subnet number.
automatic address allocation—An address assignment method that assigns a permanent IP address
to a host, using an infinite IP address lease period.
client—Any host requesting configuration parameters.
database—A collection of address pools.
database agent—Any host storing the DHCP bindings database, for example a server.
DNS—Domain Name System. A system used in the Internet for translating names of network nodes
into addresses.
dynamic address allocation—An address assignment method where a network administrator
obtains an IP address for a client for a finite period of time or until the client explicitly relinquishes
the address. Dynamic allocation is particularly useful for assigning an address to a client that will be
connected to the network only temporarily or for sharing a limited pool of IP addresses among a
group of clients that do not need permanent IP addresses. Dynamic allocation may also be a good
choice for assigning an IP address to a new client being permanently connected to a network where
IP addresses are sufficiently scarce that it is important to reclaim them when old clients are retired.
Dynamic Host Configuration Protocol (DHCP)—A protocol that provides a mechanism for
allocating IP addresses dynamically so that addresses can be reused when hosts no longer need them.
manual address allocation—An address assignment method that allocates an administratively
assigned IP address to a host. Manual allocation allows DHCP to be used to eliminate the error-prone
process of manually configuring hosts with IP addresses.
server—Any host providing configuration parameters.
Platforms
This feature is supported on the following routers and access servers:
This feature is supported on the following routers and access servers:
• Cisco 7000 series
• Cisco 7200 series
• Cisco 4000 series
• Cisco 3800 series
• Cisco 3600 series
• Cisco 2500 series
• Cisco 1600 series
• Cisco 1000 series
• Cisco 700 series
• Cisco 2500 series access servers
• Cisco AS5100 access server
• Cisco AS5200 universal access server
Prerequisites
Before configuring the Cisco IOS DHCP server, perform the following tasks:
• Define the DHCP database agent.
• Define an external FTP, TFTP, or RCP host storing the DHCP bindings database.
• Define and assign names to the DHCP address pool(s) from which IP addresses are allocated to
clients.
• Specify DHCP options for devices where necessary, including:
— default boot image name
— default router(s)
— default DNS server(s)
— NetBIOS name server
• Specify the NetBIOS node type (b, p, m, or h)
• Decide on a DNS domain name
4 Release 12.0(1)T
Understanding Message Types
Functional Description
The DHCP database is organized as a tree. The root of the tree is the address pool for the natural
network. Subnet address pools comprise the middle nodes. Manual bindings represent leaves.
Subnets inherit network parameters and hosts inherit subnet parameters. Try to configure common
attributes like the domain name and the DNS server at the highest (network or subnetwork) leve. A
sample configuration, using Cisco IOS DHCP is shown below, configuring the domain name, as
planet.org, the DNS server as 144.1.1.2 144.1.2.2 and the netbios name server as 144.1.1.3 144.1.2.3
on the network 144.1.0.0 with a subnet mask of 255.255.0.0.
router(config-dhcp)# ip dhcp database ftp://user:[email protected]/dhcp.bindings
To create a DHCP address pool, note the following sample command line:
router(config-dhcp)# ip dhcp pool 144.1.0.0/16
network 144.1.0.0 255.255.0.0
domain-name planet.org
dns-server 144.1.1.2.144.1.2.2
netbios-name-server 144.1.1.3 144.1.2.3
2 The server unicasts an offer that includes an dhcpoffer offers an address to the client.
IP address, a lease date and other
parameters (for example, a domain name)
to the client.
3 The client can either issue an acceptance or dhcprequest accepts one address offer and rejects
rejection of the address offer. all others.
dhcpdecline indicates the client detected another
node is using the offered address.
4 If the client accepts the address offer, a The server sends dhcpack, binding the client MAC
binding is created. address with the assigned IP address and the Lease
Expiration date. The default lease is one day,
although the lease date can be any amount of time.
5 The client is operating with a valid IP
address. The DHCP messaging is complete
until half the lease expires. At that point,
the client attempts to renew the lease.
When working with an RFC, you can call out functionality from the commands by referring to the
option number that links up with the command feature. For example, instead of asking for the host
command that retrieves a subnet mask, you can simply specify the number 1, indicating the value
for the subnet mask. Option numbers are shown in Table 3.
DHCP
Option
DHCP Option Name Code Description
Subnet Mask Option 1 Specifies the client’s subnet mask as designated in RFC 950.
Subnet masks are 32-bit combination used to indicate the
portion of an IP address that are being used for the subnet
address.
6 Release 12.0(1)T
Understanding Message Types
DHCP
Option
DHCP Option Name Code Description
Host Name Option 12 Specifies the name of the client. The name may contain any
standard ASCII character and be up to 32 characters long. The
name may or may not be qualified with the local domain name.
Domain Name Option 15 Specifies the domain name that the client should use when
resolving hostnames via the Domain Name System.
NetBIOS over TCP/IP 44 Specifies a list of RFC 1001/1002 NetBIOS name servers.
Name Server Option
NetBIOS over TCP/IP 46 Enables NetBIOS over TCP/IP clients to be configured as
Node Type Option described in RFC 1001/1002. Valid node types are
B—Broadcast node
P—Peer-to-peer node
M—Mixed node
H—Hybrid
IP Address Lease Time 51 Allows the client to request a lease time for the IP address.
Option Used as part of a client request (dhcpdiscover or dhcprequest).
In a server reply (dhcpoffer), a DHCP server uses this option to
specify the lease time it is willing to offer.
DCHP Message Type 53 Conveys the DHCP message type. Values for this option are:
Option dhcpdiscover
dhcpoffer
dhcprequest
dhcpdecline
dhcpack
dhcpnak
dhcprelease
dhcpinform
For definitions of these, see the DHCP message table.
Server Identifier Option 54 Identifies the IP address of the selected DHCP server. This
address is used in dhcpoffer and dhcprequest messages, and
may optionally be included in the dhcpack and dhcpnak
messages.
DHCP servers nclude this option in the dhcpoffer message in
order to allow the client to distinguish between lease offers.
DHCP clients use the contents of the Server Identifier field as
the destination address for any DHCP messages unicast to the
DHCP server. DHCP clients also indicate which of several
lease offers are being accepted by including this option in a
dhcprequest message.
Renewal (T1) Time 58 Specifies the time interval from address assignment until the
Option client transitions to the renewing state. At the time the T1 client
sends (via unicast) a dhcprequest message to the server to
extends its lease.
DHCP
Option
DHCP Option Name Code Description
Rebinding (T2) Time 59 Specifies the time interval from address assignment until the
Option client transitions to the rebinding state and sends (via
broadcast) a dhcprequest message any DHCP server to extends
its lease.
Configuration Tasks
This section describes Cisco IOS DHCP server configuration tasks:
• Specify a DHCP Server Boot File
• Specify the Client’s Identifier
• Specify the Client’s Name
• Specify the Default Router
• Specify Domain Name IP Servers Available to the Client
• Enable DHCP Server Debugging
• Specify a Domain Name for the Client
• Specify the Client’s Hardware Address
• Specify the Client’s IP Address
• Specify the Database Agent Parameters
• Specify IP Addresses not Assigned by the DHCP Server
• Specify How Long to Wait for a Ping Reply
• Specify the Duration of a Ping Timeout
8 Release 12.0(1)T
Specify a DHCP Server Boot File
Command Purpose
bootfile filename Specify the name of the boot file that contains the image of
the operating system the client loads.
Command Purpose
client-identifier unique-identifier Create a string used to identify the client during binding look-
ups instead of using a MAC address.
Command Purpose
client-name name Create a string that identifies the client by name instead of IP
address.
Command Purpose
default-router address [address2 ... Identify the address of the router that the DHCP client will
address8] send packets to once it has been booted.
Command Purpose
dns-server address [address2 ... Specify the IP addresses of DHCP servers available to the cli-
address8] ent.
Command Purpose
debug ip dhcp server {events | packets | Enable debugging on the DHCP server.
linkage}
Command Purpose
domain-name domain Specify the client’s domain name.
Command Purpose
hardware-address hardware-address Create a hardware address for the client.
type
Command Purpose
host address [mask network-mask | Set the client’s IP address, subnet mask, and prefix length.
prefix-length bits]
10 Release 12.0(1)T
Specify the Database Agent Parameters
Command Purpose
ip dhcp database url{write-delay Set the interval between database updates and database trans-
seconds | timeout seconds} fers.
Command Purpose
ip dhcp ping packets count Specify IP addresses to the client which have not been
assigned by the DHCP server by tracking which
addresses do not reply to the ping.
Command Purpose
ip dhcp ping packets count Specify how many packets the DHCP server sends to the client
when a ping is executed.
Command Purpose
ip dhcp ping timeout milliseconds Specify the amount of time that elapses after the DHCP server
issues a ping to the client before the server stops attempting to
make contact with the client.
Command Purpose
ip dhcp pool name Create a name for the a DHCP server address pool.
Command Purpose
ip dhcp relay information check Determine whether the relay agent information option is cor-
rect.
Command Purpose
ip dhcp relay information policy {drop Determine the relay information reforwarding policy in a cable
| keep | replace} modem termination system.
Command Purpose
lease {days [hours][minutes]| infinite} Define the duration of the lease time.
Command Purpose
netbios-name-server address [address2 Create a name for the NetBIOS server(s) available to the client.
... address8]
Command Purpose
netbios-node-type type Select the NetBIOS node type for the client.
12 Release 12.0(1)T
Specify the DHCP Address Pool Subnet Number and Mask
Command Purpose
network [network number] [mask] Specifies the DHCP pool subnet number and mask.
Command Purpose
service dhcp Enable DHCP services on the DHCP server.
Command Purpose
show ip dhcp binding address Display a list of all bindings created on a specific DHCP
server.
Command Purpose
show ip dhcp conflict address Display a list of all address conflicts recorded by a specific
DHCP server.
Command Purpose
show ip dhcp database url Display recent activity on the DHCP database.
14 Release 12.0(1)T
Display DHCP Server Statistics
Command Purpose
show ip dhcp server statistics Display count informaton about server statistics and messges
sent and received.
Clear Information
You can clear several variables being set by using various clear commands. To clear variables, use
the following commands in EXEC configuration mode:
Command Purpose
clear ip dhcp binding address Delete an automatic address binding from the DHCP data-
base.
clear ip dhcp conflict address Clear an address conflict.
clear ip dhcp server statistics Reset all DHCP server counters to 0.
Configuration Examples
This section provides the following Cisco IOS DHCP server examples:
• Client Bootfile Name Example
• Client MAC Address Example
• Deleting an Address Conflict from the DHCP Server Database Example
• Client MAC Address Example
• Client Name Example
• Default Router Example
• Client Domain Name Server IP Address Example
• Client Domain Name Server Name Example
• Client Hardware Address Example
• Client IP Address and Subnet Mask Example
• DHCP Database Values Example
• Ping Packet Number Example
• DHCP Server Ping Timeout Example
• Address Pool Name Example
• Address Lease Time Limit Example
• NetBIOS Name Servers Example
• Specify Address and Mask of DHCP Address Pool Example
• Client NetBIOS Node Type Example
16 Release 12.0(1)T
Client Bootfile Name Example
The following example specifies the DHCP database router1 transfer timeout value as 100 seconds:
router(config-dhcp)#ip dhcp database http://router1 timeout 100
18 Release 12.0(1)T
Specify Address and Mask of DHCP Address Pool Example
Message Received
BOOTREQUEST 12
DHCPDISCOVER 200
DHCPREQUEST 178
DHCPDECLINE 0
DHCPRELEASE 0
DHCPINFORM 0
Message Sent
BOOTREPLY 12
DHCPOFFER 190
DHCPACK 172
DHCPNAK 6
20 Release 12.0(1)T
Deleting an Address Conflict from the DHCP Server Database Example
Command Reference
This section documents the following new or modified commands. All other commands used with
this feature are documented in the Cisco IOS Release 12.0 command references.
• bootfile
• clear ip dhcp binding
• clear ip dhcp conflict
• clear ip dhcp server statistics
• client-identifier
• client-name
• debug ip dhcp server
• domain-name
• dns-server
• domain-name
• hardware-address
• host
• ip dhcp database
• ip dhcp ping packets
• ip dhcp ping timeout
• ip dhcp pool
• ip dhcp relay information check
• ip dhcp relay information option
• ip dhcp relay information policy
• lease
• netbios-name-server
• netbios-node-type
• network
• service dhcp
• show ip dhcp binding
• show ip dhcp conflict
• show ip dhcp database
• show ip dhcp server statistics
bootfile
To specify the name of the default boot imageon the server, use the bootfile DHCP pool command.
Use the no form of this command to delete the boot image name.
bootfile filename
no bootfile filename
Syntax Description
filename Specifies the name of the default firmware file used as a boot image.
Default
The default filename is 12.0(1)T
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies routfile as the name of the client bootfile.
router(config-dhcp)# bootfile routfile
22 Release 12.0(1)T
clear ip dhcp binding
Syntax Description
address The address of the binding you want to clear.
Command Mode
Privileged EXEC
Usage Guidelines
The client’s IP address may be configured by the administrator (manual address allocation) or
assigned from a pool by the DHCP server (automatic address allocation). The binding also contains
a lease expiration date. The default for the lease expiration date is one day.
Example
The following example shows the address binding with an IP address of 10.12.1.99 being deleted
from a client:
router# clear ip dhcp binding 10.12.1.99
Related Commands
show ip dhcp binding
ip dhcp pool
lease
Syntax Description
address The address of the host that contains the conflicting address you want
to clear.
Command Mode
Privileged EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example shows an address conflict of 10.12.1.99 being deleted from the DHCP server
database:
router# clear ip dhcp conflict 10.12.1.99
Related Commands
show ip dhcp conflict
24 Release 12.0(1)T
clear ip dhcp server statistics
Syntax Description
This command has no arguments or keywords.
Default
All counters are cumulative. In other words, they increment from the value recorded in the most
recent session initiated by the show ip dhcp server statistics command. The counters will be
initialized, or set to zero, with this command.
Command Mode
Privileged EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Related Commands
show ip dhcp server statistics
client-identifier
To specify the client’s MAC address or unique identifier (in dotted-hexadecimal notation), use the
client-identifier DHCP pool command. It is valid for host pools only. Use the no form of this
command to delete the client identifier.
client-identifier unique-identifier
no client-identifier unique-identifier
Syntax Description
unique-identifier The distinct identification of the client in dotted-hexadecimal notation,
for example, 01b7.0813.8811.66.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Note that Microsoft clients require client identifiers instead of hardware addresses. The client
identifier is formed by concatenating the media type and the MAC address. For example, the
Microsoft client identifier of the client’s Ethernet address of b708.1388.f166 is 01b7.0813.88f1.66
where 01 represents Microsoft’s code for the Ethernet media type. For a list media type codes, see
your manufacturer’s documentation.
Example
The following example specifies 01b7.0813.8811.66 as the client’s MAC address
(01b7.0813.8811.66) in dotted-hexadecimal notation:
router(config-dhcp)# client-identifier 01b7.0813.8811.66
Related Commands
network
26 Release 12.0(1)T
client-name
client-name
To specify the client’s name, use the client-name DHCP pool command. The client name should not
include the domain name. Use the no form of this command to remove the client name.
client-name name
no client-name name
Syntax Description
name Specifies the client’s name, using any standard ASCII character. The
string can be up to 32 characters long. The client name should not
include the domain name. For example, the name mars should not be
specified as mars.planet.org.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies a string client1 that will be the name of the client:
router(config-dhcp)# client-name client1
Syntax Description
events Reports server events, like address assignments and database updates.
Default
Disabled by default.
Command Mode
Privileged EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Related Commands
clear ip dhcp server statistics
show ip dhcp server statistics
28 Release 12.0(1)T
default-router
default-router
To specify the default router list for the client, use the default-router DHCP pool command. You
can specify up to seven routers in the list. Routers are listed in order of preference (address1 is the
most preferred router, address2 is the next most preferred router, and so on.) Use the no form of this
command to remove the default router list. The IP address should be on the same subnet as the client
subnet.
default-router address [address2 ... address8]
no default-router address [address2 ... address8]
Syntax Description
address Specifies the IP address of a router. One IP address is required,
although you can specify up to eight addresses in one command line.
Default
The default router has no default address.
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies 10.12.1.99 as the IP address of the default router:
router(config-dhcp)# default-router 10.12.1.99
dns-server
To specify the domain name IP servers available to the client, use the dns-server DHCP pool
command. Servers are listed in order of preference (address1 is the most preferred router, address2
is the next most preferred router, and so on.) Use the no form of this command to remove the DNS
server list.
dns-server address [address2 ... address8]
no dns-server address [address2 ... address8]
Syntax Description
address Specifies the IP address of a domain name server. One IP address is
required, although you can specify up to eight addresses in one
command line.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies 10.12.1.99 as the IP address of the Domain Name Server of the
client:
router(config-dhcp)# dns-server 10.12.1.99
Related Commands
domain-name
network
30 Release 12.0(1)T
domain-name
domain-name
To specify the client’s domain name or name of a network node, use the domain-name DHCP pool
command. Use the no form of this command to remove the domain name.
domain-name domain
no domain-name domain
Syntax Description
domain Specifies the client’s domain name string. The string can be composed
of any standard ASCII character and can be up to 32 characters long.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies cisco.com as the domain name of the client:
router(config-dhcp)# domain-name cisco.com
Related Commands
dns-server
network
hardware-address
To specify the client’s hardware address, use the hardware-address DHCP pool command. It is
valid for host pools only. Use the no form of this command to remove the hardware address.
hardware-address hardware-address type
no hardware-address hardware-address type
Syntax Description
• hardware-address • Specifies the IP address of the client’s hardware platform.
• type Indicates the protocol of the hardware platform. Strings and values are
acceptable. The string options are:
• ethernet
• ieee802
The value options are:
• 1 10Mb Ethernet
• 6 IEEE 802
If no type is specified, the default protocol is Ethernet.
Default
Ethernet is the default type if none is specified.
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies b708.1388.f166 as the MAC address of the client:
router(config-dhcp)# hardware-address b708.1388.f166
32 Release 12.0(1)T
host
host
To specify the client’s IP address and network mask, use the host DHCP pool command. If the mask
and prefix length are unspecified, DHCP examines its address pools. If no mask is found in the pool
database, the class A, B, or C natural mask is used. This command is valid for host pools only. Use
the no form of this command to remove the client’s IP address.
host address network-mask | prefix-length bits
no host address network-mask | prefix-length bits
Syntax Description
address Specifies the IP address of the client.
bits (Optional) Specifies the number of bits that comprise the address
prefix.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies 10.12.1.99 as the client’s IP address and 255.255.248.0 as the
subnet mask:
router(config-dhcp)# host 10.12.1.99 255.255.248.0
ip dhcp database
To specify database agent parameters, use the ip dhcp database global configuration command. The
administrator may configure multiple database agents. The URL is an FTP, TFTP, or RCP uniform
resource locator. Use the no form of this command to remove the database agent.
ip dhcp database url{write-delay seconds | timeout seconds}
no ip dhcp database url {write-delay seconds | timeout seconds}
Syntax Description
url The name or the web address of the DHCP server.
write-delay Specifies how soon DHCP sends database updates. By default, DHCP
waits 300 seconds (five minutes) before transmitting database changes.
The minimum delay is 60 seconds.
timeout Specifies how long to wait for a database transfer. Transfers that
exceed the timeout period are aborted. By default, DHCP waits 300
seconds before aborting a database transfer. Infinity is defined as zero
seconds.
Default
DHCP waits 300 seconds for both a write-delay and a timeout.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies the DHCP database update delay value and the DHCP database
transfer timeout value at 80 seconds:
router# ip dhcp database http://router1 timeout 80
The following example specifies the DHCP database transfer timeout value at 100 seconds:
router# IP dhcp database http://router1 write-delay100
Related Commands
ip dhcp ping packets
ip dhcp ping timeout
ip dhcp pool
34 Release 12.0(1)T
ip dhcp ping packets
Syntax Description
count Indicates how many pings are sent before giving up. The default value
is two transmissions.
Default
Two transmissions
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies 20 ping attempts by the DHCP server before ceasing any further
ping attempts:
router# ip dhcp ping packets 20
Related Commands
ip dhcp database
ip dhcp ping timeout
ip dhcp pool
Syntax Description
milliseconds The amount of time in milliseconds it takes for a ping reply to stop
attempting to reach a pool address for client assignment. The
maximum timeout is 10000 milliseconds (10 seconds). The default
timeout is 500 milliseconds.
Default
The default timeout is 500 milliseconds.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies the number of milliseconds 800, that the DHCP server will wait for
a ping reply before considering the ping a failure:
router# ip dhcp ping timeout 800
Related Commands
ip dhcp database
ip dhcp ping packets
ip dhcp pool
36 Release 12.0(1)T
ip dhcp pool
ip dhcp pool
To create an address pool from which the dhcp ping packets command can ping a pool address
before assigning it to a client, use the ip dhcp pool global configuration command. During
execution, the configuration mode changes to DHCP pool configuration mode, identified by
(config-dhcp)#. In this mode, the administrator can configure pool parameters, like the IP subnet
number and default router list. Use the no form of this command to remove the address pool.
ip dhcp pool name
no ip dhcp pool name
Syntax Description
name Can either be a symbolic string (such as “engineering”) or an integer
(such as 0).
Default
None
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies pool1 as the string used for the address pool created:
router(config-dhcp)# ip dhcp pool pool1
Related Commands
dns-server
domain-name
ip dhcp database
ip dhcp ping packets
ip dhcp ping timeout
network
Syntax Description
This command has no arguments or keywords.
Default
DHCP checks relay information. Invalid messages are dropped.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Related Commands
ip dhcp relay information option
ip dhcp relay information policy
38 Release 12.0(1)T
ip dhcp relay information option
Syntax Description
This command has no arguments or keywords.
Default
DHCP does not insert relay information.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Related Commands
ip dhcp relay information check
ip dhcp relay information policy
Syntax Description
drop Directs DHCP relay agent to discard messages with existing relay
informationif the relay information option is already present.
Default
Existing relay information is replaced.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Related Commands
ip dhcp relay information check
ip dhcp relay information option
40 Release 12.0(1)T
lease
lease
To specify the address lease time or the time allowed for the address to exist on the client, use the
lease DHCP pool command. Use the no form of this command to reset the lease time to its default
value.
lease {days [hours][minutes]| infinite}
no lease {days [hours][minutes]| infinite}
Syntax Description
infinite Specifies the duration of the lease is unlimited.
hours Specifies the number of hours in the lease if a day value is supplied.
minutes Specifies the number of minutes in the lease if a day value is supplied.
Default
Two days
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example shows a one-day lease:
router(config-dhcp)# lease 1 days
Related Commands
ip dhcp database
ip dhcp pool
netbios-name-server
To specify the NetBIOS name servers available to the client, use the netbios-name-server DHCP
pool command. Use the no form of this command to remove the NetBIOS name server list.
netbios-name-server address [address2 ... address8]
no netbios-name-server address [address2 ... address8]
Syntax Description
address Specifies the IP address of the NetBIOS name server.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies the IP address of a NetBIOS name server available to the client:
router(config-dhcp)# netbios-name-server 10.12.1.90
Related Commands
dns-name server
dns-server
domain-name
netbios-node-type
network
42 Release 12.0(1)T
netbios-node-type
netbios-node-type
To specify the client’s NetBIOS node type, use the netbios-node-type DHCP pool command. The
recommended type is h-node (Hybrid). Use the no form of this command to remove the NetBIOS
node type.
netbios-node-type type
no netbios-node-type type
Syntax Description
type Specifies the NetBIOS node type. Valid types are:
1 b-node. Broadcast
2 p-node. Peer-to-peer
4 m-node. Mixed
8 h-node. Hybrid
The recommended type is h-node.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example specifies the client’s netbios type as hybrid:
router(config-dhcp)# netbios node-type h-node
Related Commands
netbios-name-server
network
To set and clear a DHCP address pool’s subnet number and mask, use the DHCP pool network
command.
network <network number> [mask]
no network
Syntax Description
network number The IP address of the DHCP address pool.
mask The bit combination that renders which portion of the address of the
DHCP address pool refers to the network or subnet and which part
refers to the host.
Default
None
Command Mode
DHCP pool configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
router(config-dhcp)# ip dhcp pool 144.1.0.0/16
network 144.1.0.0 255.255.0.0
domain-name planet.org
dns-server 144.1.1.2.144.1.2.2
netbios-name-server 144.1.1.3 144.1.2.3
Related Commands
dns-server
domain-name
ip dhcp pool
netbios-name server
44 Release 12.0(1)T
service dhcp
service dhcp
To enable DHCP services on the client when they have been disabled, use the service dhcp global
configuration command. Use the no form of this command to disable DHCP services.
service dhcp
no service dhcp
Syntax Description
This command has no keywords or arguments.
Default
DHCP service are enabled.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Syntax Description
This command has no keywords or arguments.
Default
None
Command Mode
EXEC configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example displays the dhcp binding address parameters, including an IP address, an
associated MAC address, a lease expiration date, and the type of address assignment that has
occurred. Table 4 describes the fields in the example.
router> show ip dhcp binding 144.1.1.11
IP addressHardware address Lease expiration Type
144.1.1.1100a0.9802.32de Feb 01 1998 12:00 AM Automatic
Related Commands
clear ip dhcp binding
lease
46 Release 12.0(1)T
show ip dhcp conflict
Syntax Description
Default
None
Command Mode
EXEC configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example displays the Detection Method and Detection Time for all IP addresses the
DHCP server has offered that have conflicts with other devices. Table 5 describes the fields in the
example.
router> show ip dhcp binding conflict 10.12.1.99
IP address Detection Method Detection time
144.1.1.32Ping Feb 16 199812:28 PM
144.1.1.64Gratuitous ARP Feb 23 199808:12 AM
Related Commands
clear ip dhcp conflict
ip dhcp ping packets
ip dhcp ping timeout
Syntax Description
URL Specifies the address or name in URL form of the DHCP server that
contains the database you want to display.
Default
None
Command Mode
EXEC configuration
Usage Guidelines
Address pools are stored in non-volatile RAM (NVRAM). DHCP limits the number of automatic
pools as follows:
NVRAM Pools
32K 16
64K 32
128K 64
256K 128
Manual bindings are stored in NVRAM. Manual bindings are just special address pools. There is no
limit on the number of manual bindings.
Automatic bindings are stored on a remote host called the database agent. The bindings are saved as
text records for easy maintenance. The file format is:
IP Address Type Hardware Address Lease Expiration
48 Release 12.0(1)T
show ip dhcp database
Example
The following example shows values of variables in the ip dhcp database. Table 6 shows descriptions
of fields in the example.
router> show ip dhcp database
URL : ftp://user:[email protected]/router-dhcp
Read : Dec 01 1997 12:01 AM
Written : Never
Status : Last read succeeded. Bindings have been loaded in RAM.
Delay : 300 seconds
Timeout : 300 seconds
Failures : 0
Successes : 1
Related Commands
ip dhcp database
Syntax Description
This command has no arguments or keywords.
Default
None
Command Mode
EXEC configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1)T.
Example
The following example displays statistics for dhcp server variables. Table 7 shows descriptions of
the fields in the example.
router> show ip dhcp server statistics
Memory usage 40392
Address pools 3
Database agents 1
Automatic bindings 190
Manual bindings 1
Expired bindings 3
Malformed messages 0
Message Received
BOOTREQUEST 12
DHCPDISCOVER 200
DHCPREQUEST 178
DHCPDECLINE 0
DHCPRELEASE 0
DHCPINFORM 0
Message Sent
BOOTREPLY 12
DHCPOFFER 190
DHCPACK 172
DHCPNAK 6
50 Release 12.0(1)T
show ip dhcp server statistics
Related Commands
clear ip dhcp server statistics
What to Do Next
For more information, see sections on IP Configuration in the Network Protocols Configuration
Guide, Part I and Router Configuration Fundamentals Guide.
52 Release 12.0(1)T