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 10.10.10.10/24 and gateway address set to 10.11.11.11) 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 10.10.10.10 24 10.11.11.11
- Global configuration:
[HUAWEI] ip pool global1
[HUAWEI-ip-pool-global1] option 64 hex 11
[HUAWEI-ip-pool-global1] option121 ip-address 10.10.10.10 24 10.11.11.11
- 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 10.10.10.10 24 10.11.11.11

Scroll to top