ip dhcp-server use-port-name

Replaces the Dynamic Host Configuration Protocol (DHCP) client identifier with the port name for a DHCP server.
Syntax
ip dhcp-server use-port-name enable
ip dhcp-server use-port-name disable
no ip dhcp-server use-port-name enable
no ip dhcp-server use-port-name disable
Command Default

The DHCP client identifier is not replaced with the port name.

Parameters
enable
Enables the replacement of the DHCP client identifier with the port name.
disable
Disables the replacement of the DHCP client identifier with the port name.
Modes

Global configuration mode

Interface configuration mode

Usage Guidelines

This command generates a port name internally based on the port number on which the packet is received. This name is used as a client identifier, replacing the received DHCP client identifier option filed by the client.

The disable keyword is available only in interface configuration mode, and disables the replacement of the DHCP client identifier with the port name for the interface. When the disable keyword is used, the replacement of the DHCP client identifier with the port name for the interface is disabled for the specific interface, but the replacement remains enabled globally.

This command can be used only when a device is acting as an edge device.

This command can be used only when there is a requirement for a single IP address to be assigned, and for a single device.

The no form of the command disables the replacement of the DHCP client identifier with the port name in global configuration mode.

Examples

The following example enables the replacement of the DHCP client identifier (option 61) with the port name globally for a DHCP server.

device# configure terminal
device(config)# ip dhcp-server use-port-name enable

The following example disables the replacement of the DHCP client identifier (option 61) with the port name globally for a DHCP server.

device# configure terminal
device(config)# no ip dhcp-server use-port-name enable

The following example enables the replacement of the DHCP client identifier (option 61) with the port name for an Ethernet interface for a DHCP server.

device# configure terminal
device(config)# interface ethernet 1/1/8
device(config-if-e1000-1/1/8)# ip dhcp-server use-port-name enable

The following example disables the replacement of the DHCP client identifier (option 61) with the port name for an Ethernet interface for a DHCP server. Although the replacement of the DHCP client identifier with the port name for the interface is disabled for the specific interface, the replacement remains enabled globally.

device# configure terminal
device(config)# interface ethernet 1/1/8
device(config-if-e1000-1/1/8)# ip dhcp-server use-port-name disable
History
Release version Command history
09.0.10d This command was introduced.
10.0.10 This command was re-introduced.