How do I combine static and dynamic DHCP leases on a Cisco router?
- by Brad
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 10.0.0.0/24 network. I have excluded 10.0.0.1 - 10.0.0.99 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 10.0.0.1 10.0.0.99
!
ip dhcp pool Internal-net
import all
network 10.0.0.0 255.255.255.0
default-router 10.0.0.1
domain-name 1770.local
lease 7
!
ip dhcp pool static-pool
import all
origin file flash://staticmap
default-router 10.0.0.1
domain-name 1770.local
Contents of staticmap:
*time* Aug 5 2010 09:00 AM
*version* 2
!IP address Type Hardware address Lease expiration
10.0.0.100/24 1 001f.5b3e.d50a Infinite
*end*
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
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
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
10.0.0.112 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.