The device inserts an option configured using the dhcp server option (based on an interface address pool) or option (based on a global address pool) command into DHCP Reply messages to be sent to a client only when the client requests this option.
The device inserts an option configured using the dhcp server force insert option (based on an interface address pool) or force insert option (based on a global address pool) command into DHCP Reply messages to be sent to a client regardless of whether the client requests this option.
In the global address pool view:
system-view
(Optional) Enable the DHCP server to trust Option 82.
dhcp server trust option82
By default, the device is enabled to trust Option 82.
ip pool ip-pool-name
(Optional) Force the DHCP server to insert a specified option field into DHCP Reply messages.
force insert option code &<1-254>
By default, the DHCP server does not forcibly insert a specified option field into DHCP Reply messages.
Configure user-defined options.
option code [ sub-option sub-code ] { ascii ascii-string | hex hex-string | cipher cipher-string | ip-address ip-address &<1-8> }
By default, no user-defined option is configured.
If an option carries a password, the option code in ascii or hex type is insecure. Therefore, you are advised to set the option code type to cipher. For security purposes, use a password that is at least six characters long and contains at least two types of the following: lowercase letters, uppercase letters, digits, and special characters.
Option |
Configuration Command |
Description |
---|---|---|
Option1 |
mask-length in the network (IP address pool view) ip-address [ mask { mask | mask-length } ] |
Subnet mask |
Option3 |
gateway-list ip-address &<1-8> |
Gateway address |
Option6 |
dns-list ip-address &<1-8> |
DNS server IP address |
Option15 |
domain-name domain-name |
Domain name suffix |
Option44 |
nbns-list ip-address &<1-8> |
NetBIOS server IP address |
Option46 |
netbios-type { b-node | h-node | m-node | p-node } |
NetBIOS node type |
Option50 |
N/A |
Requested IP address |
Option51 |
lease { day day [ hour hour [ minute minute ] ] | unlimited } |
IP address lease |
Option52 |
N/A |
Additional option |
Option53 |
N/A |
DHCP message type |
Option54 |
N/A |
Server identifier |
Option55 |
N/A |
Parameter request list |
Option57 |
N/A |
Maximum length of a DHCP message |
Option58 |
N/A |
Lease renewal time (T1), which is 50% of the lease time |
Option59 |
N/A |
Lease renewal time (T2), which is 87.5% of the lease time |
Option61 |
N/A |
Client identifier |
Option82 |
N/A |
Relay agent information |
Option120 |
sip-server { ip-address ip-address &<1-2> | list domain-name &<1-2> } |
SIP server IP address |
Option121 |
option121 ip-address { ip-address mask-length gateway-address } &<1-8> |
A group of classless routes |
Option184 |
option184 { as-ip ip-address | fail-over ip-address dialer-string | ncp-ip ip-address | voice-vlan vlan-id } |
Voice parameters |
In the DHCP Option template view:
system-view
Create a DHCP Option template and enter the DHCP Option template view.
dhcp option template template-name
By default, no DHCP Option template is created.
To allocate network parameters except IP addresses to static clients, configure a DHCP Option template. Network parameters configured in the DHCP Option template view take effect only for static clients. For static clients, if a network parameter is configured in both the DHCP Option template view and global address pool view, only the configuration in the DHCP Option template view takes effect.
To allocate only IP addresses to static clients (for details, see (Optional) Configuring Fixed IP Addresses in an Address Pool), you do not need to configure a DHCP Option template.
(Optional) Force the DHCP server to insert a specified option field into DHCP Reply messages.
force insert option code &<1-254>
By default, the DHCP server does not forcibly insert a specified option field into DHCP Reply messages.
Configure user-defined options.
option code [ sub-option sub-code ] { ascii ascii-string | hex hex-string | cipher cipher-string | ip-address ip-address &<1-8> }
By default, no user-defined option is configured.
If an option carries a password, the option code in ascii or hex type is insecure. Therefore, you are advised to set the option code type to cipher. For security purposes, use a password that is at least six characters long and contains at least two types of the following: lowercase letters, uppercase letters, digits, and special characters.
Not all options can be configured using the preceding command. See Table 2 for the list of options and their commands.
Configure a classless static route to be allocated to clients.
option121 ip-address { ip-address mask-length gateway-address } &<1-8>
By default, no classless static route to be allocated to DHCP clients is configured.
Configure Option 184.
option184 { as-ip ip-address | fail-over ip-address dialer-string | ncp-ip ip-address | voice-vlan vlan-id }
By default, the Option 184 field is not configured.
If you need to configure other items in the DHCP Option template view, complete them first before performing the following steps.
quit
ip pool ip-pool-name
static-bind ip-address ip-address mac-address mac-address option-template template-name