cc/td/doc/product/software/ios121/121sup/121csum1
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

DHCP Commands

DHCP Commands

This chapter explains the function and syntax of the Dynamic Host Configuration Protocol (DHCP) commands. For more information about defaults and usage guidelines, see the corresponding chapter of the Cisco IOS IP and IP Routing Command Reference, Release 12.1.

bootfile

To specify the name of the default boot image for a Dynamic Host Configuration Protocol (DHCP) client, use the bootfile DHCP pool configuration command. To delete the boot image name, use the no form of this command.

bootfile filename

no bootfile

Syntax Description

filename

Specifies the name of the file that is used as a boot image.

clear ip dhcp binding

To delete an automatic address binding from the Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server database, use the clear ip dhcp binding privileged EXEC command.

clear ip dhcp binding {address | * }

Syntax Description

address

The address of the binding you want to clear.

*

Clears all automatic bindings.

clear ip dhcp conflict

To clear an address conflict from the Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server database, use the clear ip dhcp conflict privileged EXEC command.

clear ip dhcp conflict { address | * }

Syntax Description

address

The IP address of the host that contains the conflicting address you want to clear.

*

Clears all address conflicts.

clear ip dhcp server statistics

To reset all Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server counters, use the clear ip dhcp server statistics privileged EXEC command.

clear ip dhcp server statistics

Syntax Description

This command has no arguments or keywords.

client-identifier

To specify the unique identifier (in dotted-hexadecimal notation) for a Microsoft Dynamic Host Configuration Protocol (DHCP) client, use the client-identifier DHCP pool configuration command. It is valid for manual bindings only. To delete the client identifier, use the no form of this command.

client-identifier unique-identifier

no client-identifier

Syntax Description

unique-identifier

The distinct identification of the client, in dotted-hexadecimal notation; for example, 01b7.0813.8811.66.

client-name

To specify the name of a Dynamic Host Configuration Protocol (DHCP) client, use the client-name DHCP pool configuration command. The client name should not include the domain name. To remove the client name, use the no form of this command.

client-name name

no client-name

Syntax Description

name

Specifies the name of the client, using any standard ASCII character. The client name should not include the domain name. For example, the name mars should not be specified as mars.cisco.com.

default-router

To specify the default router list for a Dynamic Host Configuration Protocol (DHCP) client, use the default-router DHCP pool configuration command. To remove the default router list, use the no form of this command.

default-router address [address2...address8]

no default-router

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.

address2...address8

(Optional) Specifies up to eight addresses in the command line.

dns-server

To specify the Domain Name System (DNS) IP servers available to a Dynamic Host Configuration Protocol (DHCP) client, use the dns-server DHCP pool configuration command. To remove the DNS server list, use the no form of this command.

dns-server address [address2...address8]

no dns-server

Syntax Description

address

Specifies the IP address of a DNS server. One IP address is required, although you can specify up to eight addresses in one command line.

address2...address8

(Optional) Specifies up to eight addresses in the command line.

domain-name

To specify the domain name for a Dynamic Host Configuration Protocol (DHCP) client, use the domain-name DHCP pool configuration command. To remove the domain name, use the no form of this command.

domain-name domain

no domain-name

Syntax Description

domain

Specifies the domain name string of the client.

hardware-address

To specify the hardware address of a Dynamic Host Configuration Protocol (DHCP) client, use the hardware-address DHCP pool configuration command. It is valid for manual bindings only. To remove the hardware address, use the no form of this command.

hardware-address hardware-address type

no hardware-address

Syntax Description

hardware-address

Specifies the MAC 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.

host

To specify the IP address and network mask for a manual binding to a Dynamic Host Configuration Protocol (DHCP) client, use the host DHCP pool configuration command. To remove the IP address of the client, use the no form of this command.

host address [mask | prefix-length]

no host

Syntax Description

address

Specifies the IP address of the client.

mask

(Optional) Specifies the network mask of the client.

prefix-length

(Optional) Specifies the number of bits that make up the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded by a forward slash (/).

ip dhcp conflict logging

To enable conflict logging on a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server, use the ip dhcp conflict logging global configuration command. To disable conflict logging, use the no form of this command.

ip dhcp conflict logging

no ip dhcp conflict logging

Syntax Description

This command has no arguments or keywords.

ip dhcp database

You can configure a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server to save automatic bindings on a remote host called a database agent. To configure a DHCP server database agent and database agent parameters, use the ip dhcp database global configuration command. To remove the database agent, use the no form of this command.

ip dhcp database url [timeout seconds | write-delay seconds]

no ip dhcp database url

Syntax Description

url

Specifies the remote file used to store the automatic bindings. Following are the acceptable URL file formats:

  • tftp://host/filename

  • ftp://user:password@host/filename

  • rcp://user@host/filename

timeout seconds

(Optional) Specifies how long, in seconds, the DHCP server should wait before aborting 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 0 seconds.

write-delay seconds

(Optional) Specifies how soon the DHCP server should send database updates. By default, DHCP waits 300 seconds (5 minutes) before sending database changes. The minimum delay is 60 seconds.

ip dhcp excluded-address

To specify IP addresses that a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server should not assign to DHCP clients, use the ip dhcp excluded-address global configuration command. To remove the excluded IP addresses, use the no form of this command.

ip dhcp excluded-address low-address [high-address]

no ip dhcp excluded-address low-address [high-address]

Syntax Description

low-address

The excluded IP address, or first IP address in an excluded address range.

high-address

(Optional) The last IP address in the excluded address range.

ip dhcp ping packets

To specify the number of packets a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server sends to a pool address as part of a ping operation, use the ip dhcp ping packets global configuration command. To prevent the server from pinging pool addresses, use the no form of this command.

ip dhcp ping packets count

no ip dhcp ping packets

Syntax Description

count

Indicates the number of ping packets that are sent before assigning the address to a requesting client. The default value is two packets.

ip dhcp ping timeout

To specify how long a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server waits for a ping reply from an address pool, use the ip dhcp ping timeout global configuration command. To restore the default number of milliseconds (500) of the timeout, use the no form of this command.

ip dhcp ping timeout milliseconds

no ip dhcp ping timeout

Syntax Description

milliseconds

The amount of time in milliseconds that the DHCP server waits for a ping reply before it stops attempting to reach a pool address for client assignment. The maximum timeout is 10000 milliseconds (10 seconds). The default timeout is 500 milliseconds.

ip dhcp pool

To configure a Dynamic Host Configuration Protocol (DHCP) address pool on a Cisco IOS DHCP Server and enter DHCP pool configuration mode, use the ip dhcp pool global configuration command. To remove the address pool, use the no form of this command.

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).

ip dhcp relay information check

To configure a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server to validate the relay agent information option in forwarded BOOTREPLY messages, use the ip dhcp relay information check global configuration command. To disable an information check, use the no form of this command.

ip dhcp relay information check

no ip dhcp relay information check

Syntax Description

This command has no arguments or keywords.

ip dhcp relay information option

To configure a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server to insert the DHCP relay agent information option in forwarded BOOTREQUEST messages, use the ip dhcp relay information option global configuration command. To disable inserting relay information into forwarded BOOTREQUEST messages, use the no form of this command.

ip dhcp relay information option

no ip dhcp relay information option

Syntax Description

This command has no arguments or keywords.

ip dhcp relay information policy

To configure the information reforwarding policy for a Dynamic Host Configuration Protocol (DHCP) relay agent (what a relay agent should do if a message already contains relay information), use the ip dhcp relay information policy global configuration command. To restore the default relay information policy, use the no form of this command.

ip dhcp relay information policy {drop | keep | replace}

no ip dhcp relay information policy

Syntax Description

drop

Directs the DHCP relay agent to discard messages with existing relay information if the relay information option is already present.

keep

Indicates that existing information is left unchanged on the DHCP relay agent.

replace

Indicates that existing information is overwritten on the DHCP relay agent.

lease

To configure the duration of the lease for an IP address that is assigned from a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server to a DHCP client, use the lease DHCP pool configuration command. To restore the default value, use the no form of this command.

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

no lease

Syntax Description

days

Specifies the duration of the lease in numbers of days.

hours

(Optional) Specifies the number of hours in the lease. A days value must be supplied before you can configure an hours value.

minutes

(Optional) Specifies the number of minutes in the lease. A days value and an hours value must be supplied before you can configure a minutes value.

infinite

Specifies the duration of the lease is unlimited.

netbios-name-server

To configure NetBIOS Windows Internet Naming Service (WINS) name servers that are available to Microsoft Dynamic Host Configuration Protocol (DHCP) clients, use the netbios-name-server DHCP pool configuration command. To remove the NetBIOS name server list, use the no form of this command.

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

no netbios-name-server

Syntax Description

address

Specifies the IP address of the NetBIOS WINS name server. One IP address is required, although you can specify up to eight addresses in one command line.

address2...address8

(Optional) Specifies up to eight addresses in the command line.

netbios-node-type

To configure the NetBIOS node type for Microsoft Dynamic Host Configuration Protocol (DHCP) clients, use the netbios-node-type DHCP pool configuration command. To remove the NetBIOS node type, use the no form of this command.

netbios-node-type type

no netbios-node-type

Syntax Description

type

Specifies the NetBIOS node type. Valid types are:

  • b-node---broadcast

  • p-node---peer-to-peer

  • m-node---mixed

  • h-node---hybrid (recommended)

network (DHCP)

To configure the subnet number and mask for a Dynamic Host Configuration Protocol (DHCP) address pool on a Cisco IOS DHCP Server, use the network DHCP pool configuration command. To remove the subnet number and mask, use the no form of this command.

network network-number [mask | prefix-length]

no network

Syntax Description

network-number

The IP address of the DHCP address pool.

mask

(Optional) 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.

prefix-length

(Optional) Specifies the number of bits that make up the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be proceeded by a forward slash (/).

next-server

To configure the next server in the boot process of a Dynamic Host Configuration Protocol (DHCP) client, use the next-server DHCP pool configuration command. To remove the boot server list, use the no form of this command.

next-server address [address2...address8]

no next-server address

Syntax Description

address

Specifies the IP address of the next server in the boot process, which is typically a Trivial File Transfer Protocol (TFTP) server. One IP address is required, although you can specify up to eight addresses in one command line.

address2...address8

(Optional) Specifies up to eight addresses in the command line.

option

To configure Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server options, use the option DHCP pool configuration command. To remove the options, use the no form of this command.

option code [instance number] {ascii string | hex string | ip address}

no option code [instance number]

Syntax Description

code

Specifies the DHCP option code.

instance number

(Optional) Specifies a number from 0 to 255.

ascii string

Specifies an NVT ASCII character string. ASCII character strings that contain white space must be deliminated by quotation marks.

hex string

Specifies dotted-hexadecimal data. Each byte in hexidecimal character strings is two hexidecimal digits---each byte can be separated by a period, colon, or white space.

ip address

Specifies an IP address.

service dhcp

To enable the Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server feature on your router, use the service dhcp global configuration command. To disable the Cisco IOS DHCP Server feature, use the no form of this command.

service dhcp

no service dhcp

Syntax Description

This command has no arguments or keywords.

show ip dhcp binding

To display address bindings on the Cisco IOS Dynamic Host Configuration Protocol (DHCP) server, use the show ip dhcp binding EXEC command.

show ip dhcp binding [address]

Syntax Description

address

(Optional) Specifies the IP address of the DHCP client for which bindings will be displayed.

show ip dhcp conflict

To display address conflicts found by a Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server when addresses are offered to the client, use the show ip dhcp conflict EXEC command.

show ip dhcp conflict [address]

Syntax Description

address

(Optional) Specifies the IP address of the conflict found.

show ip dhcp database

To display Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server database agent information, use the show ip dhcp database Privileged EXEC command.

show ip dhcp database [url]

Syntax Description

url

(Optional) Specifies the remote file used to store automatic DHCP bindings. Following are the acceptable URL file formats:

  • tftp://host/filename

  • ftp://user:password@host/filename

  • rcp://user@host/filename

show ip dhcp server statistics

To display Cisco IOS Dynamic Host Configuration Protocol (DHCP) Server statistics, use the show ip dhcp server statistics EXEC command.

show ip dhcp server statistics

Syntax Description

This command has no arguments or keywords.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Wed Jul 26 13:57:26 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.