Vendors can define DHCP options. The device can function as a DHCP server to allocate vendor-defined network parameters to clients. When the device functions as a DHCP Server, it can allocate network parameters to clients based on the Option fields in the requests from the clients.
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.
When a global address pool is used to allocate network parameters, configuration commands are different for dynamic and static DHCP clients.
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
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 |