The dhcp client-option command configures an option that will be sent as a reply to a client option.
The undo dhcp client-option command deletes the configuration.
By default, no options are specified as replies to client options.
dhcp client-option client-code client-string reply-option reply-code { suboption reply-sub-code { hex hex-string | ip ip-address | string ascii-string } } &<1-16>
undo dhcp client-option [ client-code [ client-string ] ] reply-option
undo dhcp client-option client-code client-string reply-option suboption { reply-sub-code } &<1-16>
Parameter | Description | Value |
---|---|---|
reply-option reply-code |
Specifies the code of a reply option. |
The value ranges from 2 to 254 excluding 3, 6, 15, 44, 46, 50-55, 57-59, 61, 82, and 119. |
suboption reply-sub-code |
Specifies the code of a reply sub-option. |
The value ranges from 1 to 254. |
hex hex-string |
Specifies a hexadecimal number as a sub-option. |
The value is a string of 1 to 128 case-insensitive characters of 0-9 or a-f. The value length must be an even number. |
ip ip-address |
Specifies an IP address as a sub-option. |
The value is in dotted decimal notation. |
string ascii-string |
Specifies a string as a sub-option. |
The value is a string of 2 to 128 characters corresponding to the ASCII codes 32 to 38 and 38 to 126 but cannot be those corresponding to the ASCII code 39 (representing single quotation marks) or 9 (representing the Tab key). The sub-option value cannot be only "-" and "--". |
client-option client-code |
Specifies an option code in a client message. |
Currently, only Option 60 is supported. |
client-option client-string |
Specifies the option content in a client message. |
The value is a string of 3 to 66 characters starting and ending with double quotation marks (""). The string excluding double quotation marks contains 1 to 64 characters. The value can contain case-sensitive characters corresponding to the ASCII codes 32 to 38 and 38 to 126 but cannot contain those corresponding to the ASCII code 39 (representing single quotation marks) or 9 (representing the Tab key). The sub-option value cannot be only "-" and "--". "Huawei AP" is Option 60 content conserved for a specific scenario and cannot be used. |
Usage Scenario
To specify options that will be sent as replies to client options, run the dhcp client-option command. For example, in a plug-and-play scenario, different options are sent to a DHCP client based on different Option 60 information in DHCP user requests.
Precautions
<HUAWEI> system-view [~HUAWEI] ip pool huawei server [~HUAWEI-ip-pool-huawei] dhcp client-option 60 "network1" reply-option 43 suboption 6 ip 192.168.1.1 suboption 8 string VPN-T1