Enabling IP to Physical Port Mapping
You can reserve IP addresses within a DHCP
address pool against selected Ethernet ports. This allows any device connecting
to the
selected port on the switch to obtain the same IP address irrespective of the client
identifier sent by the device. This configuration is useful in preventing a newly
connected
device on a port from getting a new IP address.
The following limitations must be considered when using this option:
- This option should be used only when the ICX switch is configured as an edge device or as a gateway intended to assign the same IP addresses to its clients.
- Static port-IP mapping on Virtual
Ethernet (VE) interfaces works only when the
ip dhcp-server use-port-namecommand is explicitly enabled on the VE interface. - Only one IP address is allowed to be reserved for a selected port.
- This option should be used only when a single device is expected to be connected on the selected port. Any additional devices connected to the same port, using a hub or a downstream switch, will result in all the devices getting assigned the same IP address.
- Static port to IP mapping is not available on virtual interfaces, including LAGs and loopback interfaces. Only VE interfaces are supported.
- This option works when the client identifier used is Ethernet type or if a client identifier is not present; it does not work if a string type is used as the client identifier.
Note: To achieve better scaling
performance, disable the feature explicitly for an interface if a burst of DHCP
client traffic is expected on a single interface. If the feature is not explicitly
disabled for the interface, some of the DHCP clients may not be assigned an IP
address and may need to send the request again. Similar behavior may be seen during
the release of IP addresses also.
Use the following procedure to configure static port to IP mapping in a DHCP address pool.
- Enter global configuration mode.
- Enter interface configuration mode.
- Enable the replacement of the DHCP client identifier (option 61) with the port name for the Interface.
- Return to global configuration mode.
- Create a DHCP server pool.
- Configure the DHCP server address pool.
- Map an Ethernet interface to the IP address.
The following example shows a configured static port to IP mapping.
device# configure terminal device(config)# interface ethernet 1/1/8 device(config-if-e1000-1/1/8)# ip dhcp-server use-port-name enable device(config-if-e1000-1/1/8)# exit 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