DHCP Sever configuration command directory
Configuration command for DHCPD
Configuration command for DHCPD address pool
Configuration command for DHCPD
Parameter
pkgs: The number of ICMP packets sent for the DHCPserver to check whether the address has been allocated.
Default
2
Command mode
global configuration mode
Explanation
The user can use the following command to configure that DHCPserver sends n ICMP packets while checking whether the address has been allocated.
ip
dhcpd ping packets n
Example
The following command configures that DHCPserver sends 1 ICMP packet while checking whether the address has been allocated
ip
dhcpd ping packets 1
Parameter
timeout: Timeout waits for the response of ICMP packet for the DHCPserver to check whether the address has been allocated.
Default
5
Command mode
global configuration mode
Explanation
The user can use the following command to configure the timeout waited for the response of ICMP packet for the DHCPserver to check whether the address has been allocated as n*100ms.
ip
dhcpd ping timeout n
Example
The user can use the following command to configure the timeout waited for the response of ICMP packet for the DHCPserver to check whether the address has been allocated as 300ms.
ip
dhcpd ping timeout 3
Parameter
time: interval
of DHCPserver to save the address allocation information to the database (minute
as the unit)
Default
60
Command mode
global configuration mode
Explanation
The user can use the following command to configure that DHCPserver writes the address allocation information into the database every n minutes.
ip
dhcpd write-time n
We suggest that the user do not set this value
smaller than the default value.
Example
The
user can use the following command to configure that DHCPserver writes the
address allocation information into the database every hour.
ip
dhcpd write-time 1440
Parameter
name: name
of DHCP address pool
Default
none
Command mode
global configuration mode
Explanation
The
user can use the following command to add a DHCP address pool named “name”,
and enter into configuration mode of DHCP address pool.
ip
dhcpd pool name
Example
The
user can use the following command to add a DHCP address pool named “test”,
meanwhile entering into configuration mode of DHCP address pool.
ip dhcpd pool test
Parameter
none
Default
Close DHCP service by default
Command mode
global configuration mode
Explanation
The
user can use the following command to enable DHCP service
ip
dhcpd pool name
Example
The following command enables DHCP service.
ip
dhcpd enable
Parameter
none
Default
none
Command mode
global configuration mode
Explanation
The
user can use the following command to disable DHCP service
ip
dhcpd disable
Example
The following command disables DHCP service.
ip
dhcpd disable
Configuration
command for DHCPD address pool
The command format for dhcpd address pool configuration is as follows:
network
ip-addr netmask
Parameter
ip-addr network address of address pool used for automatic
distribution
netmask: sub-network mask
Default
none
Command mode
Configuration mode of
DHCP address pool
Explanation
The
user can use this command to configure the network address of address pool used
for automatic distribution. This command only applies to automatic distribution
mode.
When configuring this command, insure that the network number of this “network” can be equal to that of one of IP address of the interface where the DHCP-request packet came from.
Example
The following command configures the network address of DHCP address pool as 192.168.20.0, sub-network mask as 255.255.255.0.
network 192.168.20.0 255.255.255.0
range
low-addr high-addr
Parameter
low-addr: The
low address used to automatically allocate the address range
hogh-addr:The high address used to automatically allocate the address range
Default
none
Command mode
DHCP address pool configuration mode
Explanation
The user can use this command to configure the address range used for automatic allocation. Each address pool can be configured at most 8 ranges, and each range should be within the network. This command only applies to automatic allocation mode.
Example
The following command configures the address allocation range of DHCP address pool as 192.168.20.210-192.168.20.219.
range
192.168.20.210 192.168.20.219
default-router
ip-addr
Parameter
ip-addr Default route allocated to the client
Default
none
Command mode
Configuration mode of DHCP address pool
Explanation
The user can use this command to configure the default route allocated to the client, the client can be configure at most 4 default routes which can be separated by spacebar.
Example
The following command configures the default route allocated to the DHCP client as 192.168.20.1
default-router
192.168.20.1
dns-server ip-addr …
Parameter
ip-addr DNSserver address allocated to the client
Default
none
Command mode
Configuration mode of DHCP pool address
Explanation
The user can use this command to configure the DNSserver address allocated to the client, the client can be configured 4 DNSsevers at most which can be separated by a spacebar.
Example
The following command configures the DNSsever address allocated to the client as 192.168.1.3.
dns-server
192.168.1.3
domain-name
name
Parameter
name Domain
name allocated to the client
Default
none
Command mode
Configuration mode of DHCP address pool
Explanation
The user can use this command to configure the domain name allocated to
the client
Example
The following command configures the domain name allocated to the client as “test.D-Link”.
domain-name
test.domain
lease
{days
[hours][minutes] | infinite}
Parameter
days:
days allocated by the address
hours:
hours allocated by the address
minutes:
minutes allocated by the address
infinite:
infinite allocation of the address
Default
1 day
Command mode
Configuration mode of DHCP address pool
Explanation
The user can use
this command to configure the time limit of the address allocated to the client.
Example
The following command configures the time limit of the address allocated to the client as 2 days and 12 hours.
Lease
2 12
netbios-name-server
ip-addr
Parameter
ip-addr Allocate the address of netbios name server of the client
Default
none
Command mode
Configuration mode of DHCP address pool
Explanation
The user can use this command to configure the address of name server allocated to the client, the client can be configured 4 netbios name server at most which can be separated by a spacebar.
Example
The following
command configures the address of netbios name server of the client as
192.168.1.10.
netbios-name-server
192.168.1.10
host
ip-addr netmask
Parameter
ip-addr Host address of the address pool used for manual allocation
netmask:
Sub-network mask
Default
none
Command mode
Configuration mode of DHCP address pool
Explanation
The user can use
this command to configure the host address of the address pool used for manual
allocation. This command only applies to the manual allocation mode and cannot
configure host and range in the same address pool in the same time.
Example
The following
command configures the manual allocation address of the DHCP address pool as
192.168.20.200, and the sub-network mask as 255.255.255.0.
host 192.168.20.200 255.255.255.0
hardware-address
hardware-address{
type}
Parameter
hardware-address
The hardware address used for matching the
clients
type:
Hardware address type
Default
type is defaulted as
1, means Ethernet.
Command mode
Configuration mode of DHCP address pool
Explanation
The
user can use this command to configure the hardware address used for matching
the clients, the format of the address is two hex number ab:cd:ef:gh separated
by colon. This command only applies to manual allocation mode.
Example
The
following command configures the hardware address of DHCP manually allocated
address pool as 10:a0:0c:13:64:7d
hardware-address
10:a0:0c:13:64:7d
Parameter
unique-identifier
Client
ID used for matching the clients
Default
none
Command mode
Configuration mode of DHCP address pool
Explanation
The user can use this command to configure the client ID used for matching the clients, the format of it is two hex number separated by dot: ab.cd.ef.gh. This command only applies to manual allocation mode.
Example
The
following command configures the client ID of DHCP manually allocated address
pool as 01:10:a0:0c:13:64:7d
client-identifier
01.10.a0.0c.13.64.7d
Parameter
name the name allocated to the client
Default
none
Command mode
Configuration mode of DHCP address pool
Explanation
The user can use this command to configure the name of host used to manually allocate the clients.
Example
The
following command configures the host name of the client as D-Linktect.
client-name
test
Parameter
none。
Default
none。
Command mode
管理态
Explanation
The user can use
this command to open the debug switch of data packet information of DHCPD.
Example
The following command opens the debug information output
switch of DHCPD data packet.
debug
ip dhcpd packet
Parameter
none。
Default
none。
Command mode
管理态
Explanation
The user
can use this command to open the debug switch of DHCPD event information.
Example
The
following command opens the switch of debug information output of DHCPD event.
debug
ip dhcpd event
Parameter
none。
Default
none。
Command mode
All
modes except user mode
Explanation
The user can use this command to display the statistical information of DHCPD, including the amount of various packets and the addresses of automatic, manual allocation.
Example
The
following command shows the statistics of DHCPD.
Show ip dhcpd statistic
Parameter
ip-addr: address
required to show the binding information
Default
Show all addresses of binding information
Command mode
All modes except user mode
Explanation
The user can use this command to show the address binding information of DHCPD, IP address, hardware address, binding type and timeout.
Example
The following
command shows the binding information of DHCPD.
Show
ip dhcpd binding
Parameter
none。
Default
none
Command mode
管理态
Explanation
The user can use this command to delete the statistics about packet amount of DHCPD.
Example
Use the
following Command to delete the statistics about packet amount of DHCPD.
Clear ip dhcpd statistic
Clear ip dhcpd binding {ip-addr|*}
Parameter
ip-addr:
address
required to delete binding information
*:
delete all of the binding infomation
Default
none
Command
mode
管理态
Explanation
The user can use this command to delete the binding information of the designated address
Example
The
following command deletes the binding information of 192.168.20.210
clear ip dhcpd binding 192.168.20.210
The
following command deletes the binding information of 192.168.20.210 and
192.168.20.211
clear
ip dhcpd binding 192.168.20.210 192.168.20.211
The
following command deletes all of the binding information
clear
ip dhcpd binding *