static-port-ip-mapping

Maps an Ethernet interface to the IP address for a Dynamic Host Configuration Protocol (DHCP) server.
Syntax
static-port-ip-mapping ip-address eunit/slot/port
static-port-ip-mapping ip-address veve-id
no static-port-ip-mapping ip-address eunit/slot/port
no static-port-ip-mapping ip-address veve-id
Command Default

Static port IP mapping is not enabled for a physical port.

Parameters
ip-address
Specifies the IP address of the client to be used for mapping.
eunit/slot/port
Specifies an Ethernet interface.
veve-id
Specifies a Virtual Ethernet (VE) interface.
Modes

DHCP server pool configuration mode

Usage Guidelines

Use this command if a specific IP address needs to be reserved among a range of IP addresses, with the same IP address assigned to all requests on the physical port. The same IP address is assiged for all the requests that come in on the specified port. This configuration is useful when you want the same IP address assigned to all requests that come in on a specified physical port.

This command is not supported on tagged ports, nor on virtual interfaces including LAGs and loopback interfaces. Only untagged ports and VE interfaces are supported. Static port-IP mapping on VE interfaces works only when the ip dhcp-server use-port-name command is explicitly enabled on the VE interface.

The no form of the command removes Ethernet interface mapping from the IP address.

Examples

The following example adds the client MAC address mapping to the IP address.

device# configure terminal
device(config)# ip dhcp-server pool list
device(config-dhcp-list)# network 10.10.10.0 255.255.255.0
device(config-dhcp-list)# lease-count 254
device(config-dhcp-list)# lease 1 0 0
device(config-dhcp-list)# static-port-ip-mapping 10.10.10.2 e1/1/3 

The following example demonstrates how to configure a DHCP server pool with specific settings, including network definition, lease parameters, excluded addresses, vendor options, and static IP mapping to a VE interface on a device:

device# configure terminal
device(config)# interface ve 1
device(config-vlan-1)# ip dhcp-server use-port-name enable
device(config-vlan-1)# exit
device(config)# ip dhcp-server pool test2
device(config-dhcp-test2)# network 25.25.25.0 255.255.255.0 
device(config-dhcp-test2)# lease-count 246
device(config-dhcp-test2)# excluded-address 25.25.25.1
device(config-dhcp-test2)# excluded-address 25.25.25.2
device(config-dhcp-test2)# excluded-address 25.25.25.3
device(config-dhcp-test2)# lease 1 0 0
device(config-dhcp-test2)# option vendor-encapsulated-options ip 10.0.10.1 10.0.10.2
device(config-dhcp-test2)# static-port-ip-mapping 25.25.25.50 ve1
History
Release version Command history
09.0.10d This command was introduced.
10.0.10 This command was re-introduced.
09.0.10j_cd4, 10.0.10f This command is supported for VE interfaces.