option

Syntax

option <OPTION-NUM> {ascii <ASCII-STR> | hex <HEX-STR> | ip <IPV4-ADDR-LIST>}

no option <OPTION-NUM> {ascii <ASCII-STR> | hex <HEX-STR> | ip <IPV4-ADDR-LIST>}

Description

Defines custom DHCPv4 options for the current DHCPv4 server pool. DHCPv4 options enable the DHCPv4 server to provide additional information about the network when DHCPv4 clients request an address.

The no form of this command removes custom DHCPv4 options from the pool.

Command context

config-dhcp-server-pool

Parameters

<OPTION-NUM>

Specifies a DHCPv4 option number. For a list of DHCPv4 option numbers, see https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml. Range: 2 to 254.

ascii <ASCII-STR>

Specifies a value for the selected option as an ASCII string. Range: 1 to 255 ASCII characters.

hex <HEX-STR>

Specifies a value for the selected option as a hexadecimal string. Range: 1 to 255 hexadecimal characters.

ip <IPV4-ADDR-LIST>

Specifies a list of IP addresses in IPv4 format (x.x.x.x), where x is a decimal number from 0 to 255. Separate addresses with a space. A maximum of four IP addresses can be defined.

Authority

Administrators or local user group members with execution rights for this command.

Example

Defines DHCPv4 option 3 for the server pool primary-pool on VRF primary.

switch(config)# dhcp-server vrf primary
switch(config-dhcp-server)# pool primary-pool
switch(config-dhcp-server-pool)# option 3 ip 192.168.1.1

Deletes DHCPv4 option 3 for the server pool primary-pool on VRF primary.

switch(config)# dhcp-server vrf primary
switch(config-dhcp-server)# pool primary-pool
switch(config-dhcp-server-pool)# no option 3 ip 192.168.1.1