Previous Topic

Next Topic

Book Contents

DHCP Server Commands

This section describes the commands you to configure the DHCP server settings for the switch. DHCP uses UDP as its transport protocol and supports a number of features that facilitate in administration address allocations.

ip dhcp pool

This command configures a DHCP address pool name on a DHCP server and enters DHCP pool configuration mode.

no ip dhcp pool

This command removes the DHCP address pool. The name should be previously configured pool name.

client-identifier

This command specifies the unique identifier for a DHCP client. Unique-identifier is a valid notation in hexadecimal format. In some systems, such as Microsoft DHCP clients, the client identifier is required instead of hardware addresses. The unique-identifier is a concatenation of the media type and the MAC address. For example, the Microsoft client identifier for Ethernet address c8:19:24:88:f1:77 is 01:c8:19:24:88:f1:77 where 01 represents the Ethernet media type.

no client-identifier

This command deletes the client identifier.

client-name

This command specifies the name for a DHCP client. Name is a string consisting of standard ASCII characters.

no client-name

This command removes the client name.

default-router

This command specifies the default router list for a DHCP client. {address1, address2…address8} are valid IP addresses, each made up of four decimal bytes ranging from 0 to 255. IP address 0.0.0.0 is invalid.

no default-router

This command removes the default router list.

dns-server

This command specifies the IP servers available to a DHCP client. Address parameters are valid IP addresses; each made up of four decimal bytes ranging from 0 to 255. IP address 0.0.0.0 is invalid.

no dns-server

This command removes the DNS Server list.

hardware-address

This command specifies the hardware address of a DHCP client. Hardware-address is the MAC address of the hardware platform of the client consisting of 6 bytes in dotted hexadecimal format. Type indicates the protocol of the hardware platform. It is 1 for 10 MB Ethernet and 6 for IEEE 802.

no hardware-address

This command removes the hardware address of the DHCP client.

host

This command specifies the IP address and network mask for a manual binding to a DHCP client. Address and Mask are valid IP addresses; each made up of four decimal bytes ranging from 0 to 255. IP address 0.0.0.0 is invalid. The prefix-length is an integer from 0 to 32

no host

This command removes the IP address of the DHCP client.

lease

This command configures the duration of the lease for an IP address that is assigned from a DHCP server to a DHCP client. The overall lease time should be between 1-86400 minutes. If you specify infinite, the lease is set for 60 days. You can also specify a lease duration. Days is an integer from 0 to 59. Hours is an integer from 0 to 1439. Minutes is an integer from 0 to 86399.

no lease

This command restores the default value of the lease time for DHCP Server.

network

Use this command to configure the subnet number and mask for a DHCP address pool on the server. Network-number is a valid IP address, made up of four decimal bytes ranging from 0 to 255. IP address 0.0.0.0 is invalid. Mask is the IP subnet mask for the specified address pool. The prefix-length is an integer from 0 to 32.

no network

This command removes the subnet number and mask.

bootfile

The command specifies the name of the default boot image for a DHCP client. The <filename> specifies the boot image file.

no bootfile

This command deletes the boot image name.

domain-name

This command specifies the domain name for a DHCP client. The <domain> specifies the domain name string of the client.

no domain-name

This command removes the domain name.

netbios-name-server

This command configures NetBIOS Windows Internet Naming Service (WINS) name servers that are available to DHCP clients. One IP address is required, although one can specify up to eight addresses in one command line. Servers are listed in order of preference (address1 is the most preferred server, address2 is the next most preferred server, and so on).

no netbios-name-server

This command removes the NetBIOS name server list.

netbios-node-type

The command configures the NetBIOS node type for Microsoft Dynamic Host Configuration Protocol (DHCP) clients.

Type Specifies the NetBIOS node type. Valid types are:

no netbios-node-type

This command removes the NetBIOS node Type.

next-server

This command configures the next server in the boot process of a DHCP client.The <address> parameter is the IP address of the next server in the boot process, which is typically a TFTP server.

no next-server

This command removes the boot server list.

option

The option command configures DHCP Server options. The <code> parameter specifies the DHCP option code and ranges from 1-254. The <ascii string> parameter specifies an NVT ASCII character string. ASCII character strings that contain white space must be delimited by quotation marks. The hex <string> parameter specifies hexadecimal data. In hexadecimal, character strings are two hexadecimal digits. You can separate each byte by a period (for example, a3.4f.22.0c), colon (for example, a3:4f:22:0c), or white space (for example, a3 4f 22 0c).

no option

This command removes the DHCP Server options. The <code> parameter specifies the DHCP option code.

ip dhcp excluded-address

This command specifies the IP addresses that a DHCP server should not assign to DHCP clients. Low-address and high-address are valid IP addresses; each made up of four decimal bytes ranging from 0 to 255. IP address 0.0.0.0 is invalid.

no ip dhcp excluded-address

This command removes the excluded IP addresses for a DHCP client. Low-address and highaddress are valid IP addresses; each made up of four decimal bytes ranging from 0 to 255. IP address 0.0.0.0 is invalid.

ip dhcp ping packets

Use this command to specify the number, in a range from 2-10, of packets a DHCP server sends to a pool address as part of a ping operation. By default the number of packets sent to a pool address is 2, which is the smallest allowed number when sending packets. Setting the number of packets to 0 disables this command.

no ip dhcp ping packets

This command prevents the server from pinging pool addresses and sets the number of packets to 0.

service dhcp

This command enables the DHCP server.

no service dhcp

This command disables the DHCP server.

ip dhcp bootp automatic

This command enables the allocation of the addresses to the bootp client. The addresses are from the automatic address pool.

no ip dhcp bootp automatic

This command disables the allocation of the addresses to the bootp client. The address are from the automatic address pool.

ip dhcp conflict logging

This command enables conflict logging on DHCP server.

no ip dhcp conflict logging

This command disables conflict logging on DHCP server.

clear ip dhcp binding

This command deletes an automatic address binding from the DHCP server database. If “*” is specified, the bindings corresponding to all the addresses are deleted. <address> is a valid IP address made up of four decimal bytes ranging from 0 to 255. IP address 0.0.0.0 is invalid.

clear ip dhcp server statistics

This command clears DHCP server statistics counters.

clear ip dhcp conflict

The command is used to clear an address conflict from the DHCP Server database. The server detects conflicts using a ping. DHCP server clears all conflicts If the asterisk (*) character is used as the address parameter.

show ip dhcp binding

This command displays address bindings for the specific IP address on the DHCP server. If no IP address is specified, the bindings corresponding to all the addresses are displayed.

The display parameters for above command are:

show ip dhcp global configuration

This command displays global configuration on the DHCP server. If no IP address is specified, the bindings corresponding to all the addresses are displayed.

The display parameters for above command are:

show ip dhcp pool configuration

This command displays pool configuration. If all is specified, configuration for all the pools is displayed.

The display parameters for above command are:

The following additional field is displayed for Dynamic pool type:

The following additional fields are displayed for Manual pool type:

show ip dhcp server statistics

This command displays DHCP server statistics.

The display parameters for above command are:

Message Received:

Message Sent:

show ip dhcp conflict

This command displays address conflicts logged by the DHCP Server. If no IP address is specified, all the conflicting addresses are displayed.

The display parameters for above command are:

See also

Utility Commands

System Information and Statistics Commands

Logging Commands

Email Alerting and Mail Server Commands

System Utility and Clear Commands

Simple Network Time Protocol (SNTP) Commands

DNS Client Commands

IP Address Conflict Commands

Serviceability Packet Tracing Commands

Cable Test Command

sFlow Commands

Switch Database Management Template Commands