Dhcpcmd.exe

Windows NTŪ Resource Kits

Contents

Introduction

Command-line syntax

Dhcpcmd commands

AddIpRange

AddReservedIp

EnumClients

MibCounts

ServerConfig

Introduction

You can use the Dhcpcmd utility as an auxiliary tool to administer DHCP servers.

Command-line syntax

dhcpcmd server_IP_address command [command options]

Dhcpcmd commands

The following Dhcpcmd commands are available:

AddIpRange

Used to add a range of IP addresses to an existing scope.

Syntax: dhcpcmd scope_address addiprange start_IP_range end_IP_range

Example: dhcpcmd 127.0.0.1 addiprange 11.101.0.0 11.101.4.1 11.101.4.254

AddReservedIp

Used to add a reserved IP address to an existing scope.

Syntax: dhcpcmd scope_address addreservedip reserved_IP_address hardware_string

where hardware_string represents the hardware address.

Example: dhcpcmd 127.0.0.1 addreservedip 11.101.0.0 11.101.13.53 08002B30369B

EnumClients

Used to list the lease information in a different format.

Syntax: dhcpcmd scope_address enumclients [-v | -h]

where

Option Meaning
-v Lists detailed lease information.
-h Lists lease information with hardware information.

Example : dhcpcmd 127.0.0.1 enumclients 11.101.0.0 -h

MibCounts

Displays the current DHCP server statistics.

ServerConfig

Used to display current server parameters, or to set server parameters.

Syntax: dhcpcmd scope_address config_parameter value

Examples:

dhcpcmd 127.0.0.1 serverconfig

Displays current parameters.

dhcpcmd 127.0.0.1 serverconfig backupinterval 15

Sets the database backup interval to 15 minutes.