OcNOS-SP : System Management Guide : System Management Command Reference : DHCP Server Commands
DHCP Server Commands
This chapter describes the Dynamic Host Configuration Protocol (DHCP) server commands.
A DHCP server is a network server that automatically provides and assigns IP addresses, default gateways, and other network parameters to client devices. A DHCP server relies on the standard protocol known as Dynamic Host Configuration Protocol or DHCP to respond to broadcast queries by clients.
This chapter contains these commands:
 
address range low-address A.B.C.D (high-address A.B.C.D|)
Use this command to create an address-range in the IPv4 DHCP server pool.
Use the no form of this command to delete an address-range from the IPv4 DHCP server pool.
Command Syntax
address range low-address A.B.C.D (high-address A.B.C.D|)
no address range low-address A.B.C.D (high-address A.B.C.D|)
Parameters
A.B.C.D
The low range of the IPv4 addresses that the DHCP server should assign to DHCP clients.
A.B.C.D
The high range of the IPv4 addresses that the DHCP server should assign to DHCP clients.
Default
No default value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#address range low-address 3.3.3.1 high-address 3.3.3.4
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#address range low-address 3.3.3.1 high-address 3.3.3.4
address range low-address X:X::X:X (high-address X:X::X:X|)
Use this command to create an address-range in the IPv6 DHCP server pool.
Use the no form of this command to delete an address-range from the IPv6 DHCP server pool.
Command Syntax
address range low-address X:X::X:X (high-address X:X::X:X|)
no address range low-address X:X::X:X (high-address X:X::X:X|)
Parameters
X:X::X:X
The low range of the IPv6 addresses that the DHCP server should assign to DHCP clients.
X:X::X:X
The high range of the IPv6 addresses that the DHCP server should assign to DHCP clients.
Default
No default value is specified
Command Mode
DHCP6 configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#address range low-address 2001::1 high-address 2001::124
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#address range low-address 2001::1 high-address 2001::124
boot-file
Use this command to specify a boot file in the IPv4 DHCP server pool.
Use the no form of this command to delete a boot file from the IPv4 DHCP server pool.
Command Syntax
boot-file BOOTFILE
no boot-file BOOTFILE
Parameters
BOOTFILE
Name of the boot file (maximum 63 alphanumeric characters)
Default
No default Value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#boot-file ocnos-boot-file
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#boot-file ocnos-boot-file
dns-server A.B.C.D
Use this command to specify a DNS name server in the IPv4 DHCP server pool. Multiple name servers can be added to the pool.
Use the no form of this command to delete a DNS name server details from the IPv4 DHCP server pool.
Command Syntax
dns-server A.B.C.D
no dns-server A.B.C.D
Parameters
A.B.C.D
IPv4 DNS name server address
Default
No default value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#dns-server 10.12.3.23
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#dns-server 10.12.3.23
dns-server X:X::X:X
Use this command to specify a DNS name server in the IPv6 DHCP server pool. Multiple DNS name servers can be added to the pool.
Use the no form of this command to delete a DNS name server from the IPv6 DHCP server pool.
Command Syntax
dns-server X:X::X:X
no dns-server X:X::X:X
Parameters
X:X::X:X
DNS IPv6 name server address
Default
No default value is specified
Command Mode
DHCP6 configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#dns-server 2001::2
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#dns-server 2001::2
domain-name
Use this command to set the domain name in the IPv6 DHCP server pool.
Use the no form of this command to delete the domain name from the IPv6 DHCP server pool.
Command Syntax
domain-name NAME
no domain-name NAME
Parameters
NAME
Name of the domain (maximum 63 alphanumeric characters)
Default
No default Value is specified
Command Mode
DHCP6 configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#domain-name ipinfusion.com
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#domain-name ipinfusion.com
host-name
Use this command to set a host name in the IPv4 DHCP server pool.
Use the no form of this command to delete the host name from the IPv4 DHCP server pool.
Command Syntax
host-name NAME
no host-name NAME
Parameters
NAME
Name of the host (maximum 63 alphanumeric characters)
Default
No default value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#host-name dhcp-server
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#host-name dhcp-server
ip dhcp server (interface mode)
Use this command to configure an interface as a DHCP server starting interface.
Use the no form of this command to remove an interface as a DHCP server starting interface.
Command Syntax
ip dhcp server
no ip dhcp server
Parameters
None
Default
No default value is specified
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#interface eth2
(config-if)#ip dhcp server
ip dhcp server default-lease-time
Use this command to set the default lease time for the DHCP server to be shared with the DHCP client.
Use the no form of this command to delete the IPv4 default lease time configuration.
Command Syntax
ip dhcp server default-lease-time SECONDS
no ip dhcp server default-lease-time
Parameters
SECONDS
Default lease time in seconds. Default is 86400 seconds.
Default
Default value is 86400 seconds
Command Mode
Configure mode
VRF mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server default-lease-time 500
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server default-lease-time 400
ip dhcp server max-lease-time
Use this command to set the maximum lease time for the DHCP server to be shared with the DHCP client.
Use the no form of this command to delete the IPv4 maximum lease time configuration.
Command Syntax
ip dhcp server max-lease-time SECONDS
no ip dhcp server max-lease-time
Parameters
SECONDS
Maximum lease time in seconds. Default is 86400 seconds.
Default
Default value is 86400 seconds
Command Mode
Configure mode
VRF mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server max-lease-time 500
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server max-lease-time 400
ip dhcp server pool
Use this command to create a IPv4 DHCP server pool.
Use the no form of this command to delete a IPv4 DHCP server pool.
Command Syntax
ip dhcp server pool NAME
no ip dhcp server pool NAME
Parameters
NAME
Name of the pool (maximum 63 alphanumeric characters)
Default
No default value is specified
Command Mode
Configure mode
VRF mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
ipv6 dhcp server (interface mode)
Use this command to set an interface as a DHCPv6 server starting interface.
Use the no form of this command to remove an interface as a DHCPv6 server starting interface.
Command Syntax
ipv6 dhcp server
no ipv6 dhcp server
Parameters
None
Default
No default value is specified
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#interface eth2
(config-if)#ipv6 dhcp server
ipv6 dhcp server pool
Use this command to create a IPv6 DHCP server pool.
Use the no form of this command to delete a IPv6 DHCP server pool.
Command Syntax
ipv6 dhcp server pool NAME
no ipv6 dhcp server pool NAME
Parameters
NAME
Name of the pool (maximum 63 alphanumeric characters)
Default
No default value is specified
Command Mode
Configure mode
VRF mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool test-pool
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool test-pool
ipv6 dhcp server preference
Use this command to make a DHCPv6 server preferred.
Use the no form of this command to disable a server preference.
Command Syntax
ipv6 dhcp server preference
no ipv6 dhcp server preference
Parameters
None
Default
No default value is specified
Command Mode
Configure mode
VRF mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server preference
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server preference
ipv6 dhcp server rapid-commit
Use this command to enable the DHCP client to obtain configuration parameters from the server through a rapid two message exchange (solicit and reply).
Use the no form of this command to disable the IPv6 DHCP server rapid-commit option.
Command Syntax
ipv6 dhcp server rapid-commit
no ipv6 dhcp server rapid-commit
Parameters
None
Default
No default value is specified
Command Mode
Configure mode
VRF mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server rapid-commit
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server rapid-commit
log-server
Use this command to specify a log server in the IPv4 DHCP server pool. Multiple log servers can be added to the pool.
Use the no form of this command to delete a log server from the IPv4 DHCP server pool.
Command Syntax
log-server A.B.C.D
no log-server A.B.C.D
Parameters
A.B.C.D
IPv4 log server address
Default
No default value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#log-server 10.12.43.97
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#log-server 10.12.43.97
network A.B.C.D netmask A.B.C.D
Use this command to specify a network and netmask in the IPv4 DHCP server pool.
Use the no form of this command to delete the network and netmask from the IPv4 DHCP server pool.
Command Syntax
network A.B.C.D netmask A.B.C.D
no network A.B.C.D netmask A.B.C.D
Parameters
A.B.C.D
Network part of the subnet to use to assign IPv4 addresses to hosts
A.B.C.D
Mask part of the subnet to use to assign IPv4 addresses to host
Default
No default value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#network 3.3.3.0 netmask 255.255.255.0
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#network 3.3.3.0 netmask 255.255.255.0
network X:X::X:X netmask <1-128>
Use this command to specify a network and netmask in the IPv6 DHCP server pool.
Use the no form of this command to delete the network and netmask from the IPv6 DHCP server pool.
Command Syntax
network X:X::X:X netmask <1-128>
no network X:X::X:X netmask <1-128>
Parameters
X:X:X:X
Network part of the subnet to use to assign IPv6 addresses to hosts
<1-128>
Mask part of the subnet to use to assign IPv6 addresses to host
Default
No default value is specified
Command Mode
DHCP6 configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#network 2001:: netmask 64
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#network 2001:: netmask 64
ntp-server A.B.C.D
Use this command to specify an NTP server in the IPv4 DHCP server pool. Multiple NTP servers can be added to the pool.
Use the no form of this command to delete an NTP server from the IPv4 DHCP server pool.
Command Syntax
ntp-server A.B.C.D
no ntp-server A.B.C.D
Parameters
A.B.C.D
NTP IPv4 server address
Default
No default Value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#ntp-server 10.12.43.97
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#ntp-server 10.12.43.97
ntp-server X:X::X:X
Use this command to specify an NTP server in the IPv6 DHCP server pool. Multiple NTP servers can be added to the pool.
Use the no form of this command to delete an NTP server from the IPv6 DHCP server pool.
Command Syntax
ntp-server X:X::X:X
no ntp-server X:X::X:X
Parameters
X:X::X:X
NTP IPv6 server address
Default
No default Value is specified
Command Mode
DHCP6 configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#ntp-server 2001::2
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#ntp-server 2001::2
prefix high-range X:X::X:X low-range X:X::X:X netmask <1-128>
Use this command to add the DHCPv6 prefix range in the IPv6 DHCP server pool used for prefix delegation.
Use the no form of this command to delete the prefix-range from the IPv6 DHCP server pool.
Command Syntax
prefix high-range X:X::X:X low-range X:X::X:X netmask <1-128>
no prefix high-range X:X::X:X low-range X:X::X:X netmask <1-128>
Parameters
X:X::X:X
IPv6 prefix high range value
X:X::X:X
IPv6 prefix low range value
<1-128>
Network mask
Default
No default value is specified
Command Mode
Configure mode
VRF mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#prefix high-range 3001:db8:1234:: low-range 3001:db8:1c0f:: netmask 48
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#prefix high-range 3001:db8:1234:: low-range 3001:db8:1c0f:: netmask 48
temporary address X:X::X:X
Use this command to add an IPv6 temporary address to the IPv6 DHCP server pool.
Use the no form of this command to delete an IPv6 temporary address from the IPv6 DHCP server pool.
Command Syntax
temporary address X:X::X:X
no temporary address
Parameters
X:X::X:X
IPv6 DHCP Temporary address
Default
No default value is specified
Command Mode
DHCP6 configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#temporary address 2001::
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#temporary address 2001::
tftp-server
Use this command to specify a TFTP server in the IPv4 DHCP server pool.
Use the no form of this command to delete a TFTP server from the IPv4 DHCP server pool.
Command Syntax
tftp-server A.B.C.D
no tftp-server A.B.C.D
Parameters
A.B.C.D
TFTP IPv4 server address
Default
No default Value is specified
Command Mode
DHCP configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ip dhcp server pool test-pool
(dhcp-config)#tftp-server 10.12.43.97
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ip dhcp server pool test-pool
(dhcp-config)#tftp-server 10.12.43.97
vendor-options
Use this command to specify vendor options in the IPv6 DHCP server pool.
Use the no form of this command to delete the vendor options from the IPv6 DHCP server pool.
Command Syntax
vendor-options VENDOR-OPTS
no vendor-options VENDOR-OPTS
Parameters
VENDOR-OPTS
Vendor option details
Default
No default Value is specified
Command Mode
DHCP6 configure mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
#configure terminal
(config)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#vendor-options 00:00:09:bf:63
 
#configure terminal
(config)#ip vrf vrf1
(config-vrf)#ipv6 dhcp server pool ipv6_pool
(dhcp6-config)#vendor-options 00:00:09:bf:63