Cisco – Assign an IP to a MAC Address to DHCP POOL

ciscodhcpipipv4mac

The idea is that I want to have a static IP for the MAC computer always assign me the IP . please help , as would the commands ?

I have a cisco 3650 switch core where I configured the DHCP and VLAN former systems administrator assigned an IP to MAC address as follows :

  • ip dhcp pool NAME
  • host 192.168.17.137 255.255.255.0
  • client-identifier 0100.71cc.02XX.XX
  • client-name NAME

but I do not know how to do it for a VLAN IP 17 as mentioned always assign me a static IP .

Best Answer

On a Cisco IOS DHCP server, it is pretty simple. In the DHCP pool configuration, use the address command to assign an IP address to a MAC address:

address <ip-address> hardware-address <mac-address>

Preassigning IP Addresses and Associating Them to a Client:

Preassigning IP Addresses and Associating Them to a Client

Perform this task to preassign an IP address and associate it to a client identified by a client ID or MAC address.

For port-based address assignment, you must perform the task in the Automatically Generating a Subscriber Identifier for a DHCP Message Received on a Port task to associate the client ID with the subscriber ID. The subscriber ID value is based on the short name of the port to which the directly connected device is attached.

Configure a normal DHCP pool by supplying any DHCP options and lease time. Preassigned addresses are automatically excluded from normal dynamic IP address assignment. Preassigned addresses cannot be used in host pools, but there can be multiple preassigned addresses per DHCP address pool.

Note

Only one IP address can be assigned per port.

Preassigned addresses (also called reserved addresses) cannot be cleared by using the clear ip dhcp binding command.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. ip dhcp pool name
  4. network network-number [mask | / prefix-length]
  5. address ip-address client-id string [ascii]
  6. address ip-address hardware-address mac-address [hardware-number]
  7. end
  8. show ip dhcp pool [name]
  9. show ip dhcp binding

Edit:

Based on your comments:

ip dhcp pool Test-Pool
network 192.168.17.0/24
address 192.168.17.137 hardware-address 0100.71cc.02XX