DHCP option configuration on S series switch


For S series switches except S1700 switches, Option fields in a DHCP message carry control information and parameters that are not defined in some protocols. Options are classified into well-known and self-defined options. For more information about well-known DHCP options, see RFC 2132. Vendors can define their own options.
The S2720, S2750, S5700LI, S5700S-LI, and S5710LI switches in earlier versions of V200R007 do not support the DHCP Option configuration.
All switches in V200R007 and later versions support the DHCP Option configuration.
For example, you can set self-defined Option 64 to 0x11 in hexadecimal notation and configure well-known Option 121 to assign a classless static route (with the destination IP address set to and gateway address set to to clients as follows:
- Configuration on an interface: [HUAWEI] interface gigabitethernet1/0/1
[HUAWEI-GigabitEthernet1/0/1] dhcp server option 64 hex 11
[HUAWEI-GigabitEthernet1/0/1] dhcp server option121 ip-address 24
- Global configuration:
[HUAWEI] ip pool global1
[HUAWEI-ip-pool-global1] option 64 hex 11
[HUAWEI-ip-pool-global1] option121 ip-address 24
- Configuration using a DHCP Option template (this method is used when network parameters are delivered to clients with static IP addresses):
[HUAWEI] dhcp option template template1
[HUAWEI-dhcp-option-template-template1] option 64 hex 11
[HUAWEI-dhcp-option-template-template1] option121 ip-address 24

Other related questions:
DHCP option 60 support
S series switches (except S1700 switches) support the Option 60 field of DHCP Request packets only when they function as DHCP clients.

DHCP configuration on S series switch does not take effect
DHCP configuration may not take effect on an S series switch due to the following reasons: 1. DHCP server is disabled on the switch. 2. The DHCP address pool is configured incorrectly. 3. No IP network segment is specified on the interface connected to DHCP clients, or the specified IP network segment is on a different network segment from the address pool. 4. If ACL resources are exhausted, the DHCP commands run globally or on an interface will not take effect.

Duplicate option check in DHCP packets on S series switch
As specified in RFC, duplicate Options are not recommended in a DHCP packet if the length of the Option field in the DHCP packet does not exceed 255 bytes. However, different vendors process the Option field differently. DHCP response packets sent from some servers may contain duplicate options, such as Option 3 and Option 51. In some versions, after DHCP is enabled using the dhcp enable command, the switch drops received DHCP packets with duplicate options. In V100R003 and earlier versions, the switch checks for duplicate options in DHCP packets by default. In V100R006 and later versions, the switch does not check for duplicate options in DHCP packets by default. You can run the dhcp anti-attack check duplicate option command in the system view to enable the switch to check for duplicate options in DHCP packets.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top