How to Reserve an IP for a Client on Cisco DHCP Server

ciscocisco-catalystcisco-ios-12dhcp

So I thought I knew how to set up my DHCP Server on my 3550 switch and reserve IP's for clients.

I go into the pool I need to reserve the IP in, but I do not have the address command as an option to do it like I have in the past on IOS.

xxx3550#sh version 
Cisco IOS Software, C3550 Software (C3550-IPSERVICES-M), Version 12.2(35)SE5, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Thu 19-Jul-07 21:08 by nachen
Image text-base: 0x00003000, data-base: 0x00D45C28
ROM: Bootstrap program is C3550 boot loader
xxx3550 uptime is 1 year, 30 weeks, 6 days, 2 hours, 3 minutes
System returned to ROM by power-on
System restarted at 07:35:09 EDT Thu Oct 22 2015
System image file is "flash:c3550-ipservices-mz.122-35.SE5/c3550-ipservices-mz.122-35.SE5.bin"
Cisco WS-C3550-24-PWR (PowerPC) processor (revision L0) with 65526K/8192K bytes of memory.
Processor board ID CAT0937R3D4
Last reset from warm-reset
Running Layer2/3 Switching Image

Here is the DHCP pool config

ip dhcp pool data
   network 192.168.5.0 255.255.255.0
   default-router 192.168.5.1 
   dns-server xxx.xxx.xxx.x xxx.xxx.xxx.x 
   lease 8

When i go into dhcp pool configuration I do have the following available:

xxx3550(config)#ip dhcp pool data 
xxx3550(dhcp-config)#?
DHCP pool configuration commands:
  bootfile             Boot file name
  client-identifier    Client identifier
  client-name          Client name
  default-router       Default routers
  dns-server           DNS servers
  domain-name          Domain name
  exit                 Exit from DHCP pool configuration mode
  hardware-address     Client hardware address
  host                 Client IP address and mask
  import               Programatically importing DHCP option parameters
  lease                Address lease time
  netbios-name-server  NetBIOS (WINS) name servers
  netbios-node-type    NetBIOS node type
  network              Network number and mask
  next-server          Next server in boot process
  no                   Negate a command or set its defaults
  option               Raw DHCP options
xxx3550(dhcp-config)#

I just need to reserve an IP address for a specific MAC Address. I usually do
Address xxx.xxx.xxx.xx Hardware-Address AABB.CC00.11FF

Best Answer

There is a solution to avoid the multiple manual bindings.

Here is a link to Cisco documentation concerning DHCP origin and database files:

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-mt/dhcp-15-mt-book/config-dhcp-server.html

Essentially, you need a tftp/ftp server that records leases from the DHCP server in a database file (text file) on the Cisco device and reads the origin file (also a text file) in which you create all the manual bindings you need.

I use this as a disaster recovery tool in case of an unplanned reboot of the Cisco DHCP server:

  • The binding database saves the network from a DHCP storm and consequent Denial of Service against the DHCP server (self-imposed in the case of not having the binding database).
  • The origin file allows my static bindings to exist and can be edited programmatically as it is only a text file.

The above link contains examples and further reading links. For older IOS versions (back to at least 12.4) you can refer to similar online resources.