This is a copy paste from my Cisco 2851 router running-configuration file. I have used it to allocate fixed IP addresses to the devices within my network.
If the MAC address of an device has not been manually added to the static-bindings file stored on compact flash then the DHCP server would allocate an IP address from range.

ip dhcp pool static-dhcp-chm  #friendly name for static IP address pool
origin file flash:static-bindings  #here we indicate where to look for static mappings
default-router  # provide this IP address as default gateway
dns-server  # provide these DNS servers to the clients 

ip dhcp pool dhcp-pool-chm  # friendly name for dynamic IP address pool
import all

The content of static-bindings file stored on compact flash should be as follows:

*time* Jan 21 2005 03:52 PM
*version* 2
!IP address Type Hardware address Lease expiration /24 id 0194.ffff.5101.1f Infinite /24 id 01e8.ffff.e257.0f Infinite /24 id Infinite /24 1 be34.eb42.7fcb Infinite /24 1 0800.2720.e1af Infinite /24 1 0800.276a.5bfa Infinite /24 1 801f.027c.9eda Infinite

In case the assignment is not working, pay attention to Type field, change it between “id” and “1”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.