option

Use this command to configure DHCP options.

Syntax

option code [instance number] {ascii string | hex string | ip address}
no option code [instance number] {ascii string | hex string | ip address}

Parameters

code Specifies a DHCP option code. Valid Values: 0 - 254.
instance number (Optional) Assigns an instance number to this option. Valid values are 0 to 255. The default instance is 0.
ascii string | hex string | ip address Specifies a code parameter. An ASCII character string containing a space must be enclosed in quotations.

Defaults

If instance is not specified, the default instance of 0 is applied.

Mode

DHCP address pool, class, or host configuration command mode.

Usage

These configuration parameters and other control information are carried in tagged data items that are stored in the options field of the DHCP message to network hosts. Several commonly-used options may also be configured using dedicated commands: domain-name, dns-server, netbios-name-server, netbios-node-type, and default-router.

The parameter format of a site-specific option must be either ascii or hex.

The “no” form of this command deletes a configured DHCP option.

Examples

This example shows how to configure DHCP option 19, which specifies whether the client should configure its IP layer for packet forwarding. In this case, IP forwarding is enabled with the 01 value:

System(rw-config)->ip dhcp pool localpool
System(rw-config-dhcp-pool)->option 19 hex 01

This example shows how to configure DHCP option 72, which assigns one or more Web servers for DHCP clients:

System(rw-config)->ip dhcp pool localpool
System(rw-config-dhcp-pool)->option 72 ip 168.24.3.252