[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cisco dhcp reservations

Posted on 2011-05-02
14
Medium Priority
?
1,691 Views
Last Modified: 2013-10-19
I'm configuring a cisco 1700 series router to provide DHCP and would like it to reserve some IPs for a couple of devices so that when they request an IP they get one I set for them.

I found the example below showing how to setup a pool for the individual device, what I want to know is how this will work with the main pool? does it depend on which pool assigns it first, or does this pool exclude it from the previous pool? The only way to exclude addresses I know is a global command, not specific to the IP pool.

Example:
Named Mars The MAC address of the client is 02c7.f800.0422 and the IP address of the client is 172.16.2.254.

ip dhcp pool Mars
host 172.16.2.254
hardware-address 02c7.f800.0422 ieee802
client-name Mars
0
Comment
Question by:TheAmeoba
  • 7
  • 3
  • 2
  • +2
14 Comments
 
LVL 47

Accepted Solution

by:
Craig Beck earned 500 total points
ID: 35503838
The DHCP service will check all pools and will assign an address based on the interface the DHCP request was received on.  If there is a more specific pool, or a MAC-based pool that will be used first if a match is found.
0
 
LVL 2

Author Comment

by:TheAmeoba
ID: 35503951
Ok I get that the mac based IP would be assigned to the client before the general pool, but what if say the pool network is 10.1.1.0/24 and you want to reserve 10.1.1.5/24 for a laptop. Would that IP be given out to the 5th computer to connect to the network if the laptop with the specified IP wasn't connected first?
0
 
LVL 17

Expert Comment

by:Marius Gunnerud
ID: 35504291
First off you can not create static bindings and network command under the same DHCP pool so you will need to create two seperate pools.

you do not need to exclude the address you want to reserve, but it doesn't hurt to have that command in there to make 100% sure it will not be leased out.  Just to repeat myself, once there is a reservation that address will not be leased out. To exclude an address from the lease issue the following commands.

enable
configure terminal
ip dhcp excluded-address 10.1.1.5

Then under the DHCP pool configure the static binding as you have mentioned in your original post.

To check it you can issue the following commands

enable
term mon
debug ip dhcp server packet

Then reboot the device you are reserving an address for and you should see something like the following output:

036325: May 2 15:48:18.814 CET: DHCPD: DHCPREQUEST received from client 0102c7.f800.0422 ieee802

Once you have checked that everything is ok issue the following command.

no debug all
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 47

Expert Comment

by:Craig Beck
ID: 35504903
There's a difference between reserving an IP address, and excluding one from the DHCP pool.

If you use the ip dhcp excluded-address 10.1.1.5 command, as in MAG05's example, the DHCP server will never offer that IP address.  This is ok if you want to statically assign that IP address to a client, but if you want to reserve that IP address so that a client can send a DHCP request for an IP address and always receive the same one you should not use that command.
0
 
LVL 17

Expert Comment

by:Marius Gunnerud
ID: 35505117
I stand corrected on the excluded config
0
 
LVL 2

Author Comment

by:TheAmeoba
ID: 35509268
yeah thats exactly my problem. I can't exclude it from DHCP all together, and it would pose a problem if the address is given to a device from the network pool first as the specific pool then won't have any available addresses to offer.
0
 
LVL 17

Expert Comment

by:Marius Gunnerud
ID: 35509975
When a reservation is configured that IP address will not be issued to another device.
0
 
LVL 2

Author Comment

by:TheAmeoba
ID: 35510143
Even if the device hasn't yet connected? ie there is no lease active against that IP yet.
0
 
LVL 17

Expert Comment

by:Marius Gunnerud
ID: 35511792
yes even when it hasn't connected yet.
0
 
LVL 17

Assisted Solution

by:Marius Gunnerud
Marius Gunnerud earned 500 total points
ID: 35512106
once the reservation is configured the lease becomes infinate. You can check it using sh ip dhcp bind
0
 

Expert Comment

by:Cyprusice
ID: 36112945
Do you have to make a new pool for every static binding you make? Everytime i add a new host and client identifier it replaces the last one entered. Or do you make a rang of some kind?
0
 
LVL 17

Expert Comment

by:Marius Gunnerud
ID: 36114272
a new static binding needs to be made for each client/host as you will need to specify the MAC address of the host the ip address is being bound to.
0
 

Expert Comment

by:OICU821
ID: 39584228
Regarding the last comment above - my question is for each host you wish to be issued a specific IP you will need to create a pool for each of them such as below?  Because after the first one I end up with only one address in the pool.  But I have been successful doing this as shown below but I just want to make sure we are not missing a better config.

ip dhcp pool staticaddresses1
host 192.168.135.56 /24
client-identifier 0100.0074.b864.81

ip dhcp pool staticaddresses2
host 192.168.135.65 /24
client-identifier 0100.0074.b865.22

ip dhcp pool staticaddresses3
host 192.168.135.53 /24
client-identifier 0100.0074.b865.22
0
 
LVL 17

Expert Comment

by:Marius Gunnerud
ID: 39584483
Yes, you need to create a separate pool for each static binding.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question