OcNOS-SP : System Management Guide : System Management Command Reference : Dynamic Host Configuration Protocol Client
Dynamic Host Configuration Protocol Client
This chapter describes the Dynamic Host Configuration Protocol (DHCP) client commands.
DHCP is used to configure devices that are connected to a network so they can communicate on that network using the Internet Protocol (IP). DHCP is implemented in a client-server model where DHCP clients request configuration data, such as an IP address, a default route, or DNS server addresses from a DHCP server.
This chapter contains these commands:
feature dhcp
Use this command to enable the DHCP client and DHCP relay on the device.
Use the no form of this command to disable the DHCP client and DHCP relay and delete any DHCP-related configuration.
Command Syntax
feature dhcp
no feature dhcp
Parameters
None
Default
By default, feature dhcp is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#feature dhcp
ip address dhcp
Use this command to get an IP address from a DHCP server for this interface.
Use the no form of this command to disable the DHCP client for this interface.
You can give the ip dhcp client request command before giving this command to request additional options.
Command Syntax
ip address dhcp
no ip address dhcp
Parameters
None
Default
No default value is specified.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#interface eth0
(config-if)#ip address dhcp
(config-if)#
ip dhcp client request
Use this command to add an option to a DHCP request.
Use the no form of this command to remove an option from a DHCP request.
Command Syntax
ip dhcp client request dns-nameserver
ip dhcp client request host-name
ip dhcp client request log-server
ip dhcp client request ntp-server
no ip dhcp client request dns-nameserver
no ip dhcp client request host-name
no ip dhcp client request log-server
no ip dhcp client request ntp-server
Parameters
dns-nameserver
List of DNS name servers (DHCP option 6)
host-name
Name of the client (DHCP option 12)
ntp-server
List of NTP servers (DHCP option 42)
log-server
List of log servers (DHCP option 7)
Default
By default, ip dhcp client request is enabled
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#interface eth0
(config-if)#ip dhcp client request ntp-server
ipv6 address dhcp
Use this command to get an IPV6 address from a DHCP server for this interface.
Use the no form of this command to disable the DHCP client for this interface.
You can give the ipv6 dhcp client request command before giving this command to request additional options.
Command Syntax
ipv6 address dhcp
no ipv6 address dhcp
Parameters
None
Default
No default value is specified.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#interface eth0
(config-if)#ipv6 address dhcp
(config-if)#
ipv6 dhcp address-prefix-length
Use this command to configure the prefix-length for dynamically allocated ipv6 address.
Use the no form of this command to unconfigure the prefix-length.
Command Syntax
ipv6 dhcp address-prefix-length <1-128>
no ipv6 dhcp address-prefix-length
Parameters
<1-128>
IPv6 address prefix length
Default
Default ipv6 address prefix length is 128
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 4.2.
Examples
#configure terminal
(config)#interface xe1
(config-if)#ipv6 dhcp address-prefix-length 64
(config-if)
ipv6 dhcp client request
Use this command to add an option to a DHCPv6 request.
Use the no form of this command to remove an option from a DHCPv6 request.
Note:  
Vendor-specific options allow a specific vendor to define a set of DHCP options that really make sense for their device or operating system.
By default DHCPv6 uses four messages exchange (Solicit, Advertise, Request, and Reply) to obtain configuration parameters from a server. But when rapid-commit is specified, dhcp6-client will include a rapid-commit option in solicit messages and wait for an immediate reply instead of advertisements.The Rapid Commit option is used to signal the use of the two message exchange for address assignment.
Command Syntax
ipv6 dhcp client request dns-nameserver
ipv6 dhcp client request ntp-server
ipv6 dhcp client request domain-search
ipv6 dhcp client request vendor-specific-information
ipv6 dhcp client request rapid-commit
no ipv6 dhcp client request rapid-commit
no ipv6 dhcp client request vendor-specific-information
no ipv6 dhcp client request domain-search
no ipv6 dhcp client request ntp-server
no ipv6 dhcp client request dns-nameserver
Parameters
dns-nameserver
List of DNS name servers
ntp-server
Request for IPv6 NTP server
domain-search
Request for IPv6 domain search
vendor-specific-information
 
Request for IPv6 vendor-specific-information
rapid-commit
Request to enable rapid-commit
Default
No default value is specified.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3 and modified in OcNOS version 5.0
Examples
#configure terminal
(config)#interface eth0
(config-if)#ipv6 dhcp client request dns-nameserver
(config-if)#
 
(config)#interface eth0
(config-if)#ipv6 dhcp client request ntp-server
(config-if)#exit
 
(config)#interface eth0
(config-if)#ipv6 dhcp client request domain-search
(config-if)#exit
 
(config)#interface eth0
(config-if)#ipv6 dhcp client request vendor-specific-information
(config-if)#exit
 
(config)#interface eth0
(config-if)#ipv6 dhcp client request rapid-commit
(config-if)#exit
 
ipv6 dhcp client
Use this command to configure DHCP client options to a DHCPv6 request.
Use the no form of this command to remove client options from a DHCPv6 request.
Note:  
ipv6 dhcp client information-request is used to get only stateless configuration parameters (i.e., without address).
DAD-wait-time value is the maximum time (in seconds) that the client should wait for the duplicate address detection (DAD) to complete on an interface.
DUID option override the default when selecting the type of DUID to use. By default, DHCPv6 dhclient creates an identifier based on the link-layer address (DUID-LL) if it is running in stateless mode (with -S, not requesting an address), or it creates an identifier based on the link-layer address plus a timestamp (DUID-LLT) if it is running in stateful mode (without -S, requesting an address).
Command Syntax
ipv6 dhcp client information-request
ipv6 dhcp client dad-wait-time <1-600>
ipv6 dhcp client duid (ll | llt)
no ipv6 dhcp client duid
no ipv6 dhcp client dad-wait-time
no ipv6 dhcp client information-request
Parameters
information-request
 
Request to enable information-request
<1-600>
DAD wait-time in seconds
ll
Link-layer address
llt
Link-layer address plus timestamp
Default
No default value is specified.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3 and modified in OcNOS version 5.0
Examples
#configure terminal
(config)#interface eth0
(config-if)#ipv6 dhcp client information-request
(config-if)#exit
 
(config)#interface eth0
(config-if)#ipv6 dhcp client dad-wait-time 20
(config-if)#exit
 
(config)#interface eth0
(config-if)#ipv6 dhcp client duid ll
(config-if)#exit
show ipv6 dhcp vendor-opts
Use this command to display vendor-specific-information option value given by DHCP server.
Command Syntax
show ipv6 dhcp vendor-opts
Parameters
None
Command Mode
Executive mode
Applicability
This command is introduced in OcNOS version 5.0
Examples
#sh ipv6 dhcp vendor-opts
ifName vendor-opts
========== ====================
xe5 IP Infusion Inc
#