DHCP and DNS – DHCP Server

address (DHCP Host)

To manually bind an IP address to a DHCP client, use the address command in DHCP Pool Host Configuration mode. To remove the IP address binding to the client, use the no form of this command.

Syntax

address ip-address {mask | prefix-length} {client-identifier unique-identifier | hardware-address mac-address} no address

Parameters

  • address—Specifies the client IP address.
  • mask—Specifies the client network mask.
  • prefix-length—Specifies the number of bits that comprise the address prefix. The prefix is an alternative way of specifying the client network mask. The prefix length must be preceded by a forward slash (/).
  • unique-identifier—Specifies the distinct client identification in dotted hexadecimal notation. Each byte in a hexadecimal character string is two hexadecimal digits. Bytes are separated by a period or colon. For example, 01b7.0813.8811.66.
  • mac-address—Specifies the client MAC address.

Default Configuration No address are bound.

Command Mode

DHCP Pool Host Configuration mode

User Guidelines

To classify the DHCP client, DHCP server uses either the client identifier passed in Option 61, if the client-identifier keyword is configured or the client MAC address, if the hardware-address keyword is configured.

Example

The following example manually binds an IP address to a DHCP client.

switchxxxxxx(config)# ip dhcp pool host aaaa
switchxxxxxx(config-dhcp)# address 10.12.1.99 255.255.255.0 client-identifier 01b7.0813.8811.66
switchxxxxxx(config-dhcp)# exit
switchxxxxxx(config)# ip dhcp pool host bbbb
switchxxxxxx(config-dhcp)# address 10.12.1.88 255.255.255.0 hardware-address 00:01:b7:08:13:88
switchxxxxxx(config-dhcp)# exit
switchxxxxxx(config)#

address (DHCP Network)

To configure the subnet number and mask for a DHCP address pool on a DHCP server, use the address command in DHCP Pool Network Configuration mode. To remove the subnet number and mask, use the no form of this command.

Syntax

address {network-number | low low-address high high-address} {mask |

prefix-length}

no address

Parameters

  • network-number—Specifies the IP address of the DHCP address pool.
  • mask—Specifies the pool network mask.
  • prefix-length—Specifies the number of bits that comprise the address prefix. The prefix is an alternative way of specifying the client network mask. The prefix length must be preceded by a forward slash (/).
  • low low-address—Specifies the first IP address to use in the address range.
  • high high-address—Specifies the last IP address to use in the address range.

Default Configuration

DHCP address pools are not configured.

If the low address is not specified, it defaults to the first IP address in the network.

If the high address is not specified, it defaults to the last IP address in the network.

Command Mode

DHCP Pool Network Configuration mode

Example

The following example configures the subnet number and mask for a DHCP address pool on a DHCP server.

switchxxxxxx(config-dhcp)# address 10.12.1.0 255.255.255.0

bootfile

To specify the default boot image file name for a DHCP client, use the bootfile command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To delete the boot image file name, use the no form of this command.

Syntax

bootfile filename no bootfile Parameters

  • filename—Specifies the file name used as a boot image. (Length: 1–128 characters).

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Example

The following example specifies boot_image_file as the default boot image file name for a DHCP client.

switchxxxxxx(config-dhcp)# bootfile boot_image_file

clear ip dhcp binding

To delete the dynamic address binding from the DHCP server database, use the clear ip dhcp binding command in Privileged EXEC mode.

Syntax

clear ip dhcp binding {address | *}

Parameters

  • address —Specifies the binding address to delete from the DHCP database.
  • * —Clears all dynamic bindings.

Command Mode

Privileged EXEC mode

User Guidelines

Typically, the address supplied denotes the client IP address. If the asterisk (*) character is specified as the address parameter, DHCP clears all dynamic bindings.

Use the no ip dhcp pool Global Configuration mode command to delete a manual binding.

Example

The following example deletes the address binding 10.12.1.99 from a DHCP server database:

switchxxxxxx# clear ip dhcp binding 10.12.1.99

client-name

To define the name of a DHCP client, use the client-name command in DHCP Pool Host Configuration mode. To remove the client name, use the no form of this command.

Syntax client-name name no client-name

Parameters

  • name—Specifies the client name, using standard ASCII characters. The client name should not include the domain name. For example, the .name

Mars should not be specified as mars.yahoo.com. (Length: 1–32 characters).

Command Mode

DHCP Pool Host Configuration mode

Default Configuration

No client name is defined.

Example

The following example defines the string client1 as the client name.

switchxxxxxx(config-dhcp)# client-name client111.6    default-router

To configure the default router list for a DHCP client, use the default-router command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the default router list, use the no form of this command.

Syntax

default-router ip-address [ip-address2 … ip-address8] no default-router

Parameters

  • ip-address [ip-address2 … ip-address8]—Specifies the IP addresses of default routers. Up to eight addresses can be specified in one command line.

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Default Configuration

No default router is defined.

User Guidelines

The router IP address should be on the same subnet as the client subnet.

The DHCP server returns an IP address defined on the input interface as a default router if an default router is not configured in the following case:

  • Default router is not configurable.
  • DHCP client is directly connected.
  • IP Routing is enabled.
  • Default router was required by the client.

Example

The following example specifies 10.12.1.99 as the default router IP address.

switchxxxxxx(config-dhcp)# default-router 10.12.1.99

dns-server

To configure the Domain Name System (DNS) IP server list available to a DHCP client, use the dns-server command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the DNS server list, use the no form of this command.

Syntax

dns-server ip-address [ip-address2 … ip-address8] no dns-server

Parameters

  • ip-address [ip-address2 … ip-address8]—Specifies the IP addresses of DNS servers. Up to eight addresses can be specified in one command line.

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Default Configuration

No DNS server is defined.

User Guidelines

If DNS IP servers are not configured for a DHCP client, the client cannot correlate host names to IP addresses.

Example

The following example specifies 10.12.1.99 as the client domain name server IP address.

switchxxxxxx(config-dhcp)# dns-server 10.12.1.99

domain-name

To specify the domain name for a DHCP client, use the domain-name command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the domain name, use the no form of this command.

Syntax domain-name domain no domain-name

Parameters

  • domain—Specifies the DHCP client domain name string. (Length: 1–32 characters).

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Default Configuration

No domain name is defined.

Example

The following example specifies yahoo.com as the DHCP client domain name string.

switchxxxxxx(config-dhcp)# domain-name yahoo.com

ip dhcp pool host

To configure a DHCP static address on a DHCP server and enter the DHCP Pool

Host Configuration mode, use the ip dhcp pool host command in Global Configuration mode. To remove the address pool, use the no form of this command.

Syntax ip dhcp pool host name no ip dhcp pool host name

Parameters

  • name—Specifies the DHCP address pool name. It can be either a symbolic string (such as Engineering) or an integer (such as 8). (Length: 1–32 characters).

Default Configuration

DHCP hosts are not configured.

Command Mode

Global Configuration mode

User Guidelines

During execution of this command, the configuration mode changes to the DHCP Pool Configuration mode. In this mode, the administrator can configure host parameters, such as the IP subnet number and default router list.

Example

The following example configures station as the DHCP address pool:

switchxxxxxx(config)# ip dhcp pool host station
switchxxxxxx(config-dhcp)#

ip dhcp pool network

To configure a DHCP address pool on a DHCP Server and enter DHCP Pool

Network Configuration mode, use the ip dhcp pool network command in Global Configuration mode. To remove the address pool, use the no form of this command.

Syntax ip dhcp pool network name no ip dhcp pool network name

Parameters

  • name—Specifies the DHCP address pool name. It can be either a symbolic string (such as ‘engineering’) or an integer (such as 8). (Length: 1–32 characters).

Default Configuration

DHCP address pools are not configured.

Command Mode

Global Configuration mode

User Guidelines

During execution of this command, the configuration mode changes to DHCP Pool Network Configuration mode. In this mode, the administrator can configure pool parameters, such as the IP subnet number and default router list.

Example

The following example configures Pool1 as the DHCP address pool.

switchxxxxxx(config)# ip dhcp pool network Pool1
switchxxxxxx(config-dhcp)#

ip dhcp server

To enable the DHCP server features on the device, use the ip dhcp server command in Global Configuration mode. To disable the DHCP server, use the no form of this command.

Syntax

ip dhcp server no ip dhcp server

Default Configuration

The DHCP server is disabled.

Command Mode

Global Configuration mode

Example

The following example enables the DHCP server on the device:

switchxxxxxx(config)# ip dhcp server

lease

To configure the time duration of the lease for an IP address that is assigned from a DHCP server to a DHCP client, use the lease command in DHCP Pool Network Configuration mode. To restore the default value, use the no form of this command.

Syntax

lease days [hours [minutes]] | infinite

no lease

Parameters

  • days—Specifies the number of days in the lease.
  • hours—(Optional) Specifies the number of hours in the lease. A days value must be supplied before configuring an hours
  • minutes—(Optional) Specifies the number of minutes in the lease. A days value and an hours value must be supplied before configuring a minutes
  • infinite—Specifies that the duration of the lease is unlimited.

Default Configuration

The default lease duration is 1 day.

Command Mode

DHCP Pool Network Configuration mode

Examples

The following example shows a 1-day lease.

switchxxxxxx(config-dhcp)# lease 1

The following example shows a one-hour lease.

switchxxxxxx(config-dhcp)# lease 0 1

The following example shows a one-minute lease.

switchxxxxxx(config-dhcp)# lease 0 0 1

The following example shows an infinite (unlimited) lease.

switchxxxxxx(config-dhcp)# lease infinite

netbios-name-server

To configure the NetBIOS Windows Internet Naming Service (WINS) server list that is available to Microsoft DHCP clients, use the netbios-name-server in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the NetBIOS name server list, use the no form of this command.

Syntax

netbios-name-server ip-address [ip-address2 … ip-address8] no netbios-name-server

Parameters

  • ip-address [ip-address2 … ip-address8]—Specifies the IP addresses of NetBIOS WINS name servers. Up to eight addresses can be specified in one command line.

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Default Configuration

No bios server is defined.

Example

The following example specifies the IP address of a NetBIOS name server available to the DHCP client.

switchxxxxxx(config-dhcp)# netbios-name-server 10.12.1.90

netbios-node-type

To configure the NetBIOS node type for Microsoft DHCP clients, use the netbios-node-type command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To return to default, use the no form of this command.

Syntax

netbios-node-type {b-node | p-node | m-node | h-node} no netbios-node-type

Parameters

  • b-node—Specifies the Broadcast NetBIOS node type.
  • p-node—Specifies the Peer-to-peer NetBIOS node type.
  • m-node—Specifies the Mixed NetBIOS node type. h-node—Specifies the Hybrid NetBIOS node type.

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Default Configuration h-node (Hybrid NetBIOS node type).

Example

The following example specifies the client’s NetBIOS type as mixed.

switchxxxxxx(config-dhcp)# netbios node-type m-node

next-server

To configure the next server (siaddr) in the boot process of a DHCP client, use the next-server command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the next server, use the no form of this command.

Syntax

next-server ip-address no next-server

Parameters

  • ip-address—Specifies the IP address of the next server in the boot process.

Default Configuration

If the next-server command is not used to configure a boot server list, the DHCP server uses inbound interface helper addresses as boot servers.

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

User Guidelines

The client will connect, using the SCP/TFTP protocol, to this server in order to download the configuration file.

Example

The following example specifies 10.12.1.99 as the IP address of the next server:

switchxxxxxx(config-dhcp)# next-server 10.12.1.99

next-server-name

To configure the next server name (sname) in the boot process of a DHCP client, use the next-server-name command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the boot server name, use the no form of this command.

Syntax next-server-name name no next-server-name

Parameters

  • name—Specifies the name of the next server in the boot process. (Length: 1–64 characters).

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Default Configuration

No next server name  is defined.

User Guidelines

The client will connect, using the SCP/TFTP protocol, to this server in order to download the configuration file.

Example

The following example specifies www.bootserver.com as the name of the next server in the boot process of a DHCP client.

switchxxxxxx(config-dhcp)# next-server www.bootserver.com

option

To configure the DHCP server options, use the option command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the options, use the no form of this command.

Syntax

option code {boolean {false | true} | integer value | ascii string | hex {string | none} | ip

{address} | ip-list {ip-address1 [ip-address2 …]}} [description text] no option code

Parameters

  • code—Specifies the DHCP option code. The supported values are defined in the User Guidelines.
  • boolean {false | true}—Specifies a boolean value. The values are coded by integer values of one octet: 0 = false and 1 = true.
  • integer value—Specifies an integer value. The option size depends on the option code.
  • ascii string—Specifies a network virtual terminal (NVT) ASCII character string. ASCII character strings that contain white spaces must be delimited by quotation marks. The ASCII value is truncated to the first 160 characters entered.
  • ip address—Specifies an IP address.
  • ip-list {ip-address1 [ip-address2 …]}—Specifies up to 8 IP addresses.
  • hex string—Specifies dotted hexadecimal data. The hexadecimal value is truncated to the first 320 characters entered. Each byte in hexadecimal character strings is two hexadecimal digits. Each byte can be separated by a period, colon, or white space.
  • hex none—Specifies the zero-length hexadecimal string.
  • description text—User description

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

User Guidelines

The option command enables defining any option that cannot be defined by other special CLI commands. A new definition of an option overrides the previous definition of this option.

The boolean keyword may be configured for the following options: 19, 20, 27, 29-31, 34, 36, and 39.

The integer keyword may be configured for the following options: 2, 13, 22-26, 35, 37-38, 132-134, and 211. The switch checks the value range and builds the value field of the size in accordance with the option definition.

The ascii keyword may be configured for the following options: 14, 17-18, 40, 64, 130, 209, and 210.

The ip keyword may be configured for the following options: 16, 28, 32, 128-129, 131, 135, and 136.

The ip-list keyword may be configured for the following options: 5, 7-11, 33, 41, 42, 45, 48, 49, 65, 68-76, and 150.

The hex keyword may be configured for any option in the range 1-254 except for the following: 1, 3-4, 6, 12, 15, 44, 46, 50-51, 53-54, 56, 66-67, 82, and 255. The switch does not validate the syntax of an option defined by this format.

Examples

Example 1. The following example configures DHCP option 19, which specifies whether the client should configure its IP layer for packet forwarding:

switchxxxxxx(config-dhcp)# option 19 boolean true description "IP Forwarding Enable/Disable Option"

Example 2. The following example configures DHCP option 2, which specifies the offset of the client in seconds from Coordinated Universal Time (UTC):

switchxxxxxx(config-dhcp)# option 2 integer 3600

Example 3. The following example configures DHCP option 72, which specifies the World Wide Web servers for DHCP clients. World Wide Web servers 172.16.3.252 and 172.16.3.253 are configured in the following example:

switchxxxxxx(config-dhcp)# option 72 ip-list 172.16.3.252 172.16.3.253

show ip dhcp

To display the DHCP configuration, use the show ip dhcp command in User EXEC mode.

Syntax show ip dhcp

Command Mode

User EXEC mode

Example

The following example displays the DHCP configuration.

switchxxxxxx# show ip dhcp DHCP server is enabled.

show ip dhcp allocated

To display the allocated address or all the allocated addresses on the DHCP server, use the show ip dhcp allocated command in User EXEC mode.

Syntax

show ip dhcp allocated [ip-address]

Parameters

  • ip-address —(Optional) Specifies the IP address.

Command Mode

User EXEC mode

Example

The following example displays the output of various forms of this command:

switchxxxxxx# show ip dhcp allocated DHCP server enabled The number of allocated entries is 3 IP address   Hardware address Lease expiration      Type ----------   ---------------- --------------------  --------- 172.16.1.11  00a0.9802.32de   Feb 01 1998 12:00 AM  Dynamic 172.16.3.253 02c7.f800.0422   Infinite              Automatic 172.16.3.254 02c7.f800.0422   Infinite              Static 
switchxxxxxx# show ip dhcp allocated 172.16.1.11 DHCP server enabled The number of allocated entries is 2 IP address   Hardware address Lease expiration      Type ----------   ---------------- --------------------  -------172.16.1.11  00a0.9802.32de   Feb 01 1998 12:00 AM  Dynamic 
switchxxxxxx# show ip dhcp allocated 172.16.3.254 DHCP server enabled The number of allocated entries is 2 IP address   Hardware address Lease expiration      Type ----------   ---------------- --------------------  ------- 172.16.3.254 02c7.f800.0422   Infinite              Static

The following table describes the significant fields shown in the display.

FieldDescription
IP addressThe host IP address as recorded on the DHCP Server.
Hardware addressThe MAC address or client identifier of the host as recorded on the DHCP Server.
Lease expirationThe lease expiration date of the host IP address.
TypeThe manner in which the IP address was assigned to the host.

show ip dhcp binding

To display the specific address binding or all the address bindings on the DHCP server, use the show ip dhcp binding command in User EXEC mode.

Syntax

show ip dhcp binding [ip-address]

Parameters

  • ip-address—(Optional) Specifies the IP address.

Command Mode

User EXEC mode

Examples

The following examples display the DHCP server binding address parameters.

switchxxxxxx# show ip dhcp binding DHCP server enabled The number of used (all types) entries is 6 The number of pre-allocated entries is 1 The number of allocated entries is 1 The number of expired entries is 1 The number of declined entries is 2 The number of static entries is 1 The number of dynamic entries is 2 The number of automatic entries is 1 IP address Client Identifier  Lease Expiration Type    State ---------- -----------------  -------------    ------- --------- 1.16.1.11 00a0.9802.32de     Feb 01 1998     dynamic allocated 1.16.3.23 02c7.f801.0422     12:00AM         dynamic expired 1.16.3.24 02c7.f802.0422                     dynamic declined 1.16.3.25 02c7.f803.0422                     dynamic pre-allocated 1.16.3.26 02c7.f804.0422                     dynamic declined 
switchxxxxxx# show ip dhcp binding 1.16.1.11 DHCP server enabled IP address Client Identifier  Lease Expiration  Type    State ---------- -----------------  ----------------- ------- --------- 1.16.1.11 00a0.9802.32de     Feb 01 1998      dynamic allocated                               12:00 AM 
switchxxxxxx# show ip dhcp binding 1.16.3.24 IP address Client Identifier   Lease Expiration  Type    State ---------- -----------------   ---------------  ------- --------- 1.16.3.24  02c7.f802.0422                       dynamic declined

The following table describes the significant fields shown in the display.

FieldDescription
IP addressThe host IP address as recorded on the DHCP Server.
Client IdentifierThe MAC address or client identifier of the host as recorded on the DHCP Server.
Lease expirationThe lease expiration date of the host IP address.
FieldDescription
TypeThe manner in which the IP address was assigned to the host.
StateThe IP Address state.

show ip dhcp declined

To display the specific declined address or all of the declined addresses on the DHCP server, use the show ip dhcp declined command in User EXEC mode.

Syntax

show ip dhcp declined [ip-address]

Parameters

  • ip-address—(Optional) Specifies the IP address.

Command Mode

User EXEC mode

Example

The following example displays the output of various forms of this command:

switchxxxxxx# show ip dhcp declined DHCP server enabled The number of declined entries is 2 IP address   Hardware address 172.16.1.11  00a0.9802.32de 172.16.3.254 02c7.f800.0422 
switchxxxxxx# show ip dhcp declined 172.16.1.11 DHCP server enabled The number of declined entries is 2 IP address    Hardware address 172.16.1.11   00a0.9802.32de

show ip dhcp excluded-addresses

To display the excluded addresses, use the show ip dhcp excluded-addresses command in User EXEC mode.

Syntax show ip dhcp excluded-addresses

Command Mode

User EXEC mode

Example

The following example displays excluded addresses.

switchxxxxxx# show ip dhcp excluded-addresses The number of excluded addresses ranges is 2 Excluded addresses: 10.1.1.212- 10.1.1.219, 10.1.2.212- 10.1.2.219

show ip dhcp expired

To display the specific expired address or all of the expired addresses on the DHCP server, use the show ip dhcp expired command in User EXEC mode.

Syntax

show ip dhcp expired [ip-address]

Parameters

  • ip-address—(Optional) Specifies the IP.

Command Mode User EXEC mode

Example

switchxxxxxx# show ip dhcp expired DHCP server enabled The number of expired entries is 1 IP address   Hardware address 172.16.1.11  00a0.9802.32de 172.16.3.254 02c7.f800.0422    
switchxxxxxx# show ip dhcp expired 172.16.1.11 DHCP server enabled The number of expired entries is 1 IP address  Hardware address 172.16.1.13 00a0.9802.32de

show ip dhcp pool host

To display the DHCP pool host configuration, use the show ip dhcp pool host command in User EXEC mode.

Syntax

show ip dhcp pool host [address | name]

Parameters

  • address—(Optional) Specifies the client IP address.
  • name—(Optional) Specifies the DHCP pool name. (Length: 1-32 characters)

Command Mode User EXEC mode

Examples

Example 1. The following example displays the configuration of all DHCP host pools:

switchxxxxxx# show ip dhcp pool host The number of host pools is 1 Name        IP Address  Hardware Address   Client Identifier ----------  ----------  ----------------   ----------------station     172.16.1.11                    01b7.0813.8811.66

Example 2. The following example displays the DHCP pool host configuration of the pool named station:

switchxxxxxx# show ip dhcp pool host station Name        IP Address  Hardware Address   Client Identifier ----------  ----------  ----------------   ----------------station     172.16.1.11                    01b7.0813.8811.66 Mask: 255.255.0.0 Default router: 172.16.1.1 Client name: client1 DNS server: 10.12.1.99 Domain name: yahoo.com NetBIOS name server: 10.12.1.90 NetBIOS node type: h-node Next server: 10.12.1.99 Next-server-name: 10.12.1.100 Bootfile: Bootfile Time server 10.12.1.99 Options: Code Type     Len Value             Description ---  -------  --- ----------------  -------------------------------- 2    integer    4 3600 14   ascii     16 qq/aaaa/bbb.txt 19   boolean    1 false                 "IP Forwarding Enable/Disable Option" 21   ip        4 134.14.14.1 31   ip-list   8 1.1.1.1, 12.23.45.2 47   hex       5 02af00aa00

show ip dhcp pool network

To display the DHCP network configuration, use the show ip dhcp pool network command in User EXEC mode.

Syntax show ip dhcp pool network [name]

Parameters

  • name—(Optional) Specifies the DHCP pool name. (Length: 1-32 characters).

Command Mode

User EXEC mode

Examples

Example 1—The following example displays configuration of all DHCP network pools:

switchxxxxxx# show ip dhcp pool network The number of network pools is 2 Name Address range mask Lease      ----------------------------------------------------   marketing 10.1.1.17-10.1.1.178 255.255.255.0 0d:12h:0m  finance 10.1.2.8-10.1.2.178 255.255.255.0 0d:12h:0m

Example 2—The following example displays configuration of the DHCP network pool marketing:

switchxxxxxx# show ip dhcp pool network marketing Name Address range mask Lease --------------------------------- -----------------------marketing 10.1.1.17-10.1.1.178 255.255.255.0 0d:12h:0m Statistics: All-range Available Free Pre-allocated Allocated Expired   Declined ---------- ---------   ----- -------------   --------- --------- -------- 162 150 68 50 20        3         9 Default router: 10.1.1.1 DNS server: 10.12.1.99 Domain name: yahoo.com NetBIOS name server: 10.12.1.90 NetBIOS node type: h-node Next server: 10.12.1.99 Next-server-name: 10.12.1.100 Bootfile: Bootfile Time server 10.12.1.99 Options: Code Type     Len Value                 Description ---  -------  --- --------------------  -------------------------------- 2    integer    4 3600 14   ascii     16 qq/aaaa/bbb.txt 19   boolean    1 false                 "IP Forwarding Enable/Disable Option" 21   ip        4 134.14.14.1 31   ip-list   8 1.1.1.1, 12.23.45.2 47   hex       5 02af00aa00

show ip dhcp pre-allocated

To display the specific pre-allocated address  or all the pre-allocated addresses on the DHCP server, use the show ip dhcp pre-allocated command in User EXEC mode.

Syntax

show ip dhcp pre-allocated [ip-address]

Parameters

  • ip-address—(Optional) Specifies the IP.

Command Mode

User EXEC mode

Examples

switchxxxxxx# show ip dhcp pre-allocated DHCP server enabled The number of pre-allocated entries is 1 IP address   Hardware address 172.16.1.11  00a0.9802.32de 172.16.3.254 02c7.f800.0422 
switchxxxxxx# show ip dhcp pre-allocated 172.16.1.11 DHCP server enabled The number of pre-allocated entries is 1 IP address   Hardware address 172.16.1.15  00a0.9802.32de

show ip dhcp server statistics

To display DHCP server statistics, use the show ip dhcp server statistics command in User EXEC mode.

Syntax

show ip dhcp server statistics

Command Mode

User EXEC mode

Example

The following example displays DHCP server statistics

switchxxxxxx# show ip dhcp server statistics DHCP server enabled The number of network pools is 7 The number of excluded pools is 2 The number of used (all types) entries is 7 The number of pre-allocated entries is 1 The number of allocated entries is 3 The number of expired entries is 1 The number of declined entries is 2 The number of static entries is 1 The number of dynamic entries is 2 The number of automatic entries is 1

time-server

To specify the time servers list for a DHCP client, use the time-server command in DHCP Pool Network Configuration mode or in DHCP Pool Host Configuration mode. To remove the time servers list, use the no form of this command.

Syntax

time-server ip-address [ip-address2 … ip-address8] no time-server

Parameters

  • ip-address [ip-address2 … ip-address8]—Specifies the IP addresses of Time servers. Up to eight addresses can be specified in one command line.

Command Mode

DHCP Pool Network Configuration mode

DHCP Pool Host Configuration mode

Default Configuration

No time server is defined.

User Guidelines

The time server’s IP address should be on the same subnet as the client subnet.

Example

The following example specifies 10.12.1.99 as the time server IP address.

switchxxxxxx(config-dhcp)# time-server 10.12.1.99

Was this article helpful?

Related Articles

Leave A Comment?