option
Use option to configure a self-defined DHCPv6 option in a DHCPv6 address pool.
Use undo option to remove a self-defined DHCPv6 option from a DHCPv6 address pool.
Syntax
option code hex hex-string
undo option code
Default
No self-defined DHCPv6 option is configured in a DHCPv6 address pool.
Views
DHCPv6 address pool view
DHCPv6 option group view
Predefined user roles
network-admin
mdc-admin
Parameters
code: Specifies a number for the self-defined option, in the range of 21 to 65535, excluding 25 through 26, 37 through 40, and 43 through 48.
hex hex-string: Specifies the content of the option, a hexadecimal number whose length is an even number in the range of 2 to 256.
Usage guidelines
The DHCPv6 server fills the self-defined option with the specified hexadecimal number and sends it in a response to the client.
You can self-define options for the following purposes:
Add newly released options.
Add options for which the vendor defines the contents, for example, Option 43.
Add options for which the CLI does not provide a dedicated configuration command like dns-server. For example, you can use the option 31 hex 00c80000000000000000000000000001 command to define the NTP server address 200::1 for DHCP clients.
If a DHCPv6 option is specified by both the dedicated command and the option command, the DHCPv6 server preferentially assigns the content specified by the dedicated command. For example, if a DNS server address is specified by the dns-server command and the option 23 command, the server uses the address specified by dns-server command.
If you execute this command multiple times with the same code specified, the most recent configuration takes effect.
Examples
# Configure Option 23 that specifies a DNS server address 2001:f3e0::1 in DHCPv6 address pool 1.
<Sysname> system-view [Sysname] ipv6 dhcp pool 1 [Sysname-dhcp6-pool-1] option 23 hex 2001f3e0000000000000000000000001
Related commands
display ipv6 dhcp pool
dns-server
domain-name
sip-server