DHCP Server Commands

Use these commands 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

M4250

M4350

This command configures a DHCP address pool name on a DHCP server and lets the CLI enter the DHCP pool configuration mode.

Default none
Format ip dhcp pool name
Mode Global Config

no ip dhcp pool

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

Format no ip dhcp pool name
Mode Global Config

client-identifier (DHCP Pool Config)

M4250

M4350

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 c819.2488.f177 is 01c8.1924.88f1.77 where 01 represents the Ethernet media type. For more information, refer to the “Address Resolution Protocol Parameters” section of RFC 1700, Assigned Numbers for a list of media type codes.

Default none
Format client-identifier uniqueidentifier
Mode DHCP Pool Config

no client-identifier

This command deletes the client identifier.

Format no client-identifier
Mode DHCP Pool Config

client-name (DHCP Pool Config)

M4250

M4350

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

Default none
Format client-name name
Mode DHCP Pool Config

no client-name

This command removes the client name.

Format no client-name
Mode DHCP Pool Config

default-router (DHCP Pool Config)

M4250

M4350

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.

Default none
Format default-router address1 [address2....address8]
Mode DHCP Pool Config

no default-router

This command removes the default router list.

Format no default-router
Mode DHCP Pool Config

dns-server (DHCP Pool Config)

M4250

M4350

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.

Default none
Format dns-server address1 [address2....address8]
Mode DHCP Pool Config

no dns-server

This command removes the DNS Server list.

Format no dns-server
Mode DHCP Pool Config

hardware-address (DHCP Pool Config)

M4250

M4350

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.

Default ethernet
Format hardware-address hardwareaddress type
Mode DHCP Pool Config

no hardware-address

This command removes the hardware address of the DHCP client.

Format no hardware-address
Mode DHCP Pool Config

host (DHCP Pool Config)

M4250

M4350

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.

Default none
Format host address [mask | prefix-length]
Mode DHCP Pool Config

no host

This command removes the IP address of the DHCP client.

Format no host
Mode DHCP Pool Config

lease (DHCP Pool Config)

M4250

M4350

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 must 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 23; minutes is an integer from 0 to 59.

Default 1 (day)
Format lease [{days [hours] [minutes] | infinite}]
Mode DHCP Pool Config

no lease

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

Format no lease
Mode DHCP Pool Config

network (DHCP Pool Config)

M4250

M4350

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.

Default none
Format network networknumber [mask | prefixlength]
Mode DHCP Pool Config

no network (DHCP Pool Config)

This command removes the subnet number and mask.

Format no network
Mode DHCP Pool Config

bootfile (DHCP Pool Config)

M4250

M4350

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

Format bootfile filename
Mode DHCP Pool Config

no bootfile (DHCP Pool Config)

This command deletes the boot image name.

Format no bootfile
Mode DHCP Pool Config

domain-name (DHCP Pool Config)

M4250

M4350

This command specifies the domain name of a Domain Name System (DNS) server for a DHCP client when the DHCP server allocates an IP address to the client. That is, the domain name is issued to the DHCP client, not to the switch.

The domain specifies the domain name for the DHCP client.

Default none
Format domain-name domain
Mode DHCP Pool Config

no domain-name

This command removes the domain name of a DNS server for a DHCP client.

Format no domain-name
Mode DHCP Pool Config

netbios-name-server (DHCP Pool Config)

M4250

M4350

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

Default none
Format netbios-name-server address [address2...address8]
Mode DHCP Pool Config

no netbios-name-server

This command removes the NetBIOS name server list.

Format no netbios-name-server
Mode DHCP Pool Config

netbios-node-type (DHCP Pool Config)

M4250

M4350

The command configures the NetBIOS node type for Microsoft Dynamic Host Configuration Protocol (DHCP) clients. The type argument specifies the NetBIOS node type. Valid types are:

  • b-node. Broadcast
  • p-node. Peer-to-peer
  • m-node. Mixed
  • h-node. Hybrid (recommended)
Default none
Format netbios-node-type type
Mode DHCP Pool Config

no netbios-node-type

This command removes the NetBIOS node Type.

Format no netbios-node-type
Mode DHCP Pool Config

next-server (DHCP Pool Config)

M4250

M4350

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.

Default inbound interface helper addresses
Format next-server address
Mode DHCP Pool Config

no next-server

This command removes the boot server list.

Format no next-server
Mode DHCP Pool Config

option (DHCP Pool Config)

M4250

M4350

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

Default none
Format option code {ascii string | hex string1 [string2...string8] | ip address1 [address2...address8]}
Mode DHCP Pool Config

no option

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

Format no option code
Mode DHCP Pool Config

auto-default-router (DHCP Pool Config)

M4250

M4350

This command enables automatic transmission of the interface IP address as the default-gateway.

Default none
Format auto-default-router
Mode DHCP Pool Config

no auto-default-router

This command disables automatic transmission of the interface IP address as the default-gateway.

Format no auto-default-router
Mode DHCP Pool Config

ntp (DHCP Pool Config)

M4250

M4350

This command configures the IP address of an NTP server in the boot process of a DHCP client. As an option, you can configure the IP address of a secondary NTP server.

Default none
Format ntp ip-address1 [ip-address2]
Mode DHCP Pool Config

no ntp

This command removes all IP addresses of NTP servers in the boot process of a DHCP client.

Format no ntp
Mode DHCP Pool Config

domain-name

M4250

M4350

This command specifies the domain name of a DNS server that the switch sends to the RADIUS server for authentication. Use this command in combination with the domain-name enable command.

The name argument specifies the domain name.

Default none
Format domain-name name
Mode Global Config

no domain-name

This command removes the domain name of a DNS server that the switch sends to the RADIUS server.

Format no domain-name name name
Mode Global Config

domain-name enable

M4250

M4350

This command enables the switch to send the domain name of a DNS server that you specify with the domain-name command to a RADIUS server. By default, the switch sends only the domain name of the DNS server.

Default Disabled
Format domain-name enable
Mode Global Config

Command example:

CODE
(NETGEAR Switch) (Config)#domain-name enable
(NETGEAR Switch) (Config)#exit

no domain-name enable

This command disables sending of the domain name of a DNS server to a RADIUS server.

Format no domain-name enable
Mode Global Config

ip dhcp excluded-address

M4250

M4350

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.

Default none
Format ip dhcp excluded-address low-address [high-address]
Mode Global Config

no ip dhcp excluded-address

This command removes the excluded IP addresses for a DHCP client. 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.

Format no ip dhcp excluded-address low-address [high-address]
Mode Global Config

ip dhcp ignore-client-identifier

M4250

M4350

This command specifies that DHCP Option 61 (the client identifier) must be ignored.

Default none
Format ip dhcp ignore-client-identifier
Mode Global Config

no ip dhcp ignore-client-identifier

This command specifies that DHCP Option 61 (the client identifier) cannot be ignored.

Format no ip dhcp ignore-client-identifier
Mode Global Config

ip dhcp ping packets

M4250

M4350

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.

Default 2
Format ip dhcp ping packets number
Mode Global Config

no ip dhcp ping packets

This command restores the number of ping packets to the default value.

Format no ip dhcp ping packets
Mode Global Config

service dhcp

M4250

M4350

This command enables the DHCP server.

Default disabled
Format service dhcp
Mode Global Config

no service dhcp

This command disables the DHCP server.

Format no service dhcp
Mode Global Config

ip dhcp bootp automatic

M4250

M4350

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

Default disabled
Format ip dhcp bootp automatic
Mode Global Config

no ip dhcp bootp automatic

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

Format no ip dhcp bootp automatic
Mode Global Config

ip dhcp conflict logging

M4250

M4350

This command enables conflict logging on DHCP server.

Default enabled
Format ip dhcp conflict logging
Mode Global Config

no ip dhcp conflict logging

This command disables conflict logging on DHCP server.

Format no ip dhcp conflict logging
Mode Global Config

ip dhcp class

M4250

M4350

This command defines a DHCP class with Option-82 through circuit ID and remote ID suboptions. If you configure a DHCP class in the Global Config mode, you can bind the DHCP class under multiple DHCP pools.

When you define a DHCP class in the Global Config mode, the CLI enters the DHCP Class Config mode.

Default none
Format ip dhcp class name
Mode Global Config

Command example:

CODE
(NETGEAR Switch)(Config)#ip dhcp class Class1
(NETGEAR Switch)(Config-dhcp-class)#

no ip dhcp class

This command removes a DHCP class.

Format no ip dhcp class name
Mode Global Config

relay agent information remote-id circuit-id (DHCP Class Config)

M4250

M4350

This command defines DHCP classes with Option-82 through circuit ID and remote ID suboptions. Each DHCP server class is configured with Option-82 (both remote ID and circuit ID). The circuit ID configuration is optional.

Default None
Format relay agent information remote-id remote-string [circuit-id circuit-string]
Mode DHCP Class Config
Parameter Definition
remote-string The remote ID configured on the DHCP L2 relay to which the DHCP client is connected.
circuit-string The interface number in the unit/slot/port format to which the DHCP client is connected.

Command example:

CODE
(NETGEAR Switch)(Config)#ip dhcp class Class1
(NETGEAR Switch)(Config-dhcp-class)#relay agent information remote-id COACH1 circuit-id
1/0/13

no relay agent information remote-id circuit-id

This command removes the relay agent information from the DHCP class.

Format no relay agent information remote-id remote-string [circuit-id circuit-string]
Mode DHCP Class Config

class (DHCP Pool Config)

M4250

M4350

This command binds an existing DHCP class to a DHCP pool. You can define an IP address range as part of the class.

When you define a class in DHCP Pool Config mode, the CLI enters the DHCP Pool Class Config mode. (To let the CLI enter the DHCP Pool Config mode, from Global Config mode, enter the ip dhcp pool name command.)

Default None
Format class name
Mode DHCP Pool Config

Command example:

CODE
(NETGEAR Switch)(Config)#ip dhcp pool POOLNAME1
(NETGEAR Switch)(Config-dhcp-pool)#class CLASS1
(NETGEAR Switch)(Config-dhcp-pool-class)#

no class (DHCP Pool Config)

This command removes a class from a DHCP pool.

Format no class name
Mode DHCP Pool Config

address range (DHCP Pool Class Config)

M4250

M4350

This command configures the address range for a class in a DHCP pool. The address range of individual classes must be from the same subnet as the DHCP pool part from which the classes are defined.

All DHCP classes under a pool must have a unique IP address range. This ensures that each DHCP client receives a unique IP address from a pool.

You can also configure only the start address, which implies a single IP address, that is, the start and the end addresses are the same.

Default None
Format address range ip-address-start [ip-address-end]
Mode DHCP Pool Class Config

Command example:

CODE
(NETGEAR Switch)(Config)#ip dhcp pool POOLNAME1
(NETGEAR Switch)(Config-dhcp-pool)#network 1.2.3.0 24
(NETGEAR Switch)(Config-dhcp-pool)#class CLASS1
(NETGEAR Switch)(Config-dhcp-pool-class)#address range 1.2.3.4 1.2.3.10

no address range (DHCP Pool Class Config)

This command removes the address range for a class in a DHCP pool.

Format no address range
Mode DHCP Pool Class Config

bootfile (DHCP Pool Class Config)

M4250

M4350

The command specifies the name of the default boot image for a class in DHCP pool. The filename specifies the boot image file.

Format bootfile filename
Mode DHCP Pool Class Config

no bootfile (DHCP Pool Class Config)

This command deletes the boot image name for a class in DHCP pool.

Format no bootfile
Mode DHCP Pool Class Config

deny lease (DHCP Pool Class Config)

M4250

M4350

This command denies the lease to a client based on a DHCP class and its configuration within a pool. You first must specify the client (or clients) using the network command in Config DHCP Pool mode.

Format deny lease
Mode DHCP Pool Class Config

Command example:

CODE
(localhost)(Config)#ip dhcp pool POOLNAME1
(localhost)(Config-dhcp-pool)#network 192.168.10.0 24
(localhost)(Config-dhcp-pool)#class CLASS1
(localhost)(Config-dhcp-pool-class)#deny lease

no deny lease (DHCP Pool Class Config)

This command removes the lease denial to a client based on a DHCP class and its configuration within a pool. You first must specify the client (or clients) using the network command in Config DHCP Pool mode.

Format no deny lease
Mode DHCP Pool Class Config

clear ip dhcp binding

M4250

M4350

This command deletes an automatic address binding from the DHCP server database. If * (the asterisk character) is specified, the bindings corresponding to all the addresses are deleted.

If you use the ip-address argument to specify an IP address made up of four decimal bytes ranging from 0 to 255, the bindings corresponding to the IP address are deleted. (IP address 0.0.0.0 is invalid.)

If you use the pool keyword and the associated name argument, the bindings for the specified pool are deleted.

Format clear ip dhcp binding {* | ip-address | pool}
Mode Privileged EXEC

clear ip dhcp server statistics

M4250

M4350

This command clears DHCP server statistics counters.

Format clear ip dhcp server statistics
Mode Privileged EXEC

clear ip dhcp conflict

M4250

M4350

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

Default none
Format clear ip dhcp conflict {ip-address | *}
Mode Privileged EXEC

show ip dhcp binding

M4250

M4350

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.

Format show ip dhcp binding [ip-address]
Modes

Privileged EXEC

User EXEC

Term Definition
IP address The IP address of the client.
Hardware Address The MAC Address or the client identifier.
Lease expiration The lease expiration time of the IP address assigned to the client.
Type The manner in which IP address was assigned to the client.

show ip dhcp global configuration

M4250

M4350

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.

Format show ip dhcp global configuration
Modes

Privileged EXEC

User EXEC

Term Definition
Service DHCP The field to display the status of dhcp protocol.
Number of Ping Packets The maximum number of Ping Packets that will be sent to verify that an ip address is not already assigned.
Conflict Logging Shows whether conflict logging is enabled or disabled.
BootP Automatic Shows whether BootP for dynamic pools is enabled or disabled.

show ip dhcp pool configuration

M4250

M4350

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

Format show ip dhcp pool configuration {name | all}
Modes

Privileged EXEC

User EXEC

Field Definition
Pool Name The name of the configured pool.
Pool Type The pool type.
Lease Time The lease expiration time of the IP address assigned to the client.
DNS Servers The list of DNS servers available to the DHCP client.
Default Routers The list of the default routers available to the DHCP client.

The following additional field is displayed for Dynamic pool type.

Field Definition
Network The network number and the mask for the DHCP address pool.

The following additional fields are displayed for Manual pool type.

Field Definition
Client Name The name of a DHCP client.
Client Identifier The unique identifier of a DHCP client.
Hardware Address The hardware address of a DHCP client.
Hardware Address Type The protocol of the hardware platform.
Host The IP address and the mask for a manual binding to a DHCP client.

show ip dhcp server statistics

M4250

M4350

This command displays DHCP server statistics.

Format show ip dhcp server statistics
Modes

Privileged EXEC

User EXEC

Field Definition
Total Active Bindings The number of IP addresses that are mapped to the MAC addresses of hosts that are found in the DHCP database.
Expired Bindings The number of expired leases.
Malformed Bindings The number of truncated or corrupted messages that were received by the DHCP server.
DHCP DISCOVER packets discarded The number of DHCPDISCOVER messages that were discarded.
DHCP DISCOVER packets denied lease The number of DHCPDISCOVER messages that were denied a lease.

Message Received.

Message Definition
DHCP DISCOVER The number of DHCPDISCOVER messages the server has received.
DHCP REQUEST The number of DHCPREQUEST messages the server has received.
DHCP DECLINE The number of DHCPDECLINE messages the server has received.
DHCP RELEASE The number of DHCPRELEASE messages the server has received.
DHCP INFORM The number of DHCPINFORM messages the server has received.

Message Sent.

Message Definition
DHCP OFFER The number of DHCPOFFER messages the server sent.
DHCP ACK The number of DHCPACK messages the server sent.
DHCP NACK The number of DHCPNACK messages the server sent.

show ip dhcp class configuration

This command displays the DHCP class configuration for all classes or for a specific class.

Format show ip dhcp class configuration {all | name}
Modes Privileged EXEC
Field Definition
Name The DHCP class name.
Remote ID The remote ID configured in the DHCP class.
Circuit ID The circuit ID configured in the DHCP class.

Command example:

CODE
(NETGEAR Switch)#show ip dhcp class configuration Class1

Class: Class1
Remote ID                         Circuit ID
--------------------------------- ---------------------------------
COACH1                            1/0/13

show ip dhcp conflict

M4250

M4350

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

Format show ip dhcp conflict [ip-address]
Modes

Privileged EXEC

User EXEC

Term Definition
IP address The IP address of the host as recorded on the DHCP server.
Detection Method The manner in which the IP address of the hosts were found on the DHCP Server.
Detection time The time when the conflict was found.