Basically, what I need is super similar to the unanswered cisco forum question below: https://supportforums.cisco.com/message/3139749#3139749

I have a Cisco 850 Series router. I have configured a DHCP pool for the network. I have excluded - from the DHCP pool. I want to add a static DHCP pool for stuff and I want DHCP to statically assign them the addresses of my choice below 100. Actually, I don't care what addresses I statically assign. They can be anything in the pool for all I care, I just want it to work.

Why are you doing this? Just statically assign the IPs on the devices!

I don't want to do this because I have some laptop users. They could obviously only use that static IP here. This isn't a problem if they could be bothered to change any location setting or something. They can't. So it HAS to be DHCP. It also has to be static IPs because I need to forward ports to them. I know, I know, this is weird but it's an apartment LAN/WLAN so this isn't exactly a typical use case.

Relevant sections of config below:

ip dhcp excluded-address
ip dhcp pool Internal-net
   import all
   domain-name 1770.local
   lease 7
ip dhcp pool static-pool
   import all
   origin file flash://staticmap
   domain-name 1770.local

Contents of staticmap:

*time* Aug 5 2010 09:00 AM
*version* 2
!IP address Type Hardware address Lease expiration 1  001f.5b3e.d50a   Infinite

You can see here I was trying addresses outside the excluded-address range to see if that would make any difference.

My testing machine's MAC:

mainframe:~ brad$ ifconfig en1
    ether 00:1f:5b:3e:d5:0a 

What shows up in the DHCP binding table:

basestar#show ip dhcp binding 
Bindings from all pools not associated with VRF:
IP address          Client-ID/          Lease expiration        Type
            Hardware address/
            User name          0100.1f5b.3ed5.0a       Aug 12 2010 10:06 AM    Automatic

What's up with the funny looking MAC in the DHCP binding table??

Is what I'm trying to accomplish basically impossible?

Am I going about this the wrong way? All I want to to be able to port forward some ports to specific devices. The way I would do this with a consumer router is to do what I'm trying to do here; assign static DHCP to those devices then configure PAT for ports on those addresses.

  • Apparently the "funny looking MAC" in that DHCP binding table is the DHCP client-id. – Brad Aug 5 '10 at 14:50

You almost got it working ,

In your staticmap file just change the Type of '1' to : 'id' ,

static file :

*time* Sep 3 2012 11:10 AM
*version* 1
!IP address    Type    Hardware address     Lease expiration /8     id       0100.301b.473d.d8       Infinite /8    id       0184.8f69.b77b.dc       Infinite

And the config snippet :

ip dhcp pool StaticBindings
 origin file flash:static-bindings

Works like a charm. ( Cisco 3945E )


I followed the instructions here instead: http://paulsuela.wordpress.com/2009/04/28/cisco-dhcp-static-ip-assignment/

Instead of using the static mapping file, create separate DHCP pools for each static assignment. Doesn't scale well as the mapping file, but it's a small network so that's fine.

The key is to make sure you have the correct client-id, which is not the same as the MAC address but COULD be similar if the client doesn't send a custom configured client-id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.