### set dhcp

Use the set dhcp command to:

- Enable/disable DHCP (Dynamic Host Configuration Protocol). Enabling DHCP causes the PortServer to obtain an IP address from the host server. If DHCP is disabled, a static IP address must be defined for the device/terminal server, using the set config command.

- Renew the IP address of the device/terminal server. This causes the device/terminal serverto discard its current IP address and obtain a new one from the host server.

- Display the lease information for the current IP address.

Root privileges are required to change DHCP settings.

#### Command Syntax

##### Configuration Syntax

Enter the set dhcp command as shown below to configure DHCP settings.

`set dhcp [run={on|off}]|[renew]`

##### Display Syntax

Enter the set dhcp command with no parameters to display the lease information for the current IP address.

`set dhcp`

#### Parameters

Command | Description
run=on | Enables DHCP.
run=off | Disables DHCP.
renew | Renew the IP address of the device/terminal server.

#### Command Examples

##### Enabling DHCP

`set dhcp run=on`

##### Renewing the IP address

`set dhcp renew`