How to create reservations in Cisco DHCP Server

Ok, so I'm trying to remove DCHP entirely from my windows server and have my Cisco switches run it.  Two of my VLANS have reservations on them for printers.  I thought I had this fixed last night, but the reservations do not seem to be working anymore.  Most of the research that I did told me to use the host command within the pool but that command does not work for me.

core.3750(dhcp-config)#host 192.168.135.53 255.255.255.0

% This command may not be used with network, origin, vrf or relay pools.  

So, this is what I set up instead.

ip dhcp pool pool135    network 192.168.135.0 255.255.255.0    default-router 192.168.135.1    domain-name sctc.local    dns-server 192.168.235.249 192.168.235.4    address 192.168.135.56 hardware-address 0000.74b8.6481    address 192.168.135.65 hardware-address 0000.74b8.6522    address 192.168.135.53 hardware-address 0000.74b8.6523  

It does not look that complicated, but the three devices listed took .2, .3, and .4 when they were restarted.  Can anyone tell me how I should set these reservations up?

User: Jeremy Hauger

Reduce Complexity & Optimise IT Capabilities.

Author Curtis Newman

You need to add something like this..

no ip cef no ip dhcp use vrf connected

ip dhcp excluded-address 173.18.0.1 173.18.0.10 ip dhcp excluded-address 173.18.0.65 173.18.0.70 ip dhcp excluded-address 173.18.0.60 ip dhcp excluded-address 173.18.0.58 173.18.0.59

ip dhcp pool DATA    network 173.18.0.0 255.255.255.192    dns-server 173.32.250.21 173.32.250.20    default-router 173.18.0.1    domain-name mydomain.com    netbios-name-server 173.32.250.21 173.32.250.20

Author Jeremy Hauger

Similar commands were included in another area of my configuration except for the cef command.  That is actually set to something other than no.  I will try to find out what it is for.

ip subnet-zero ip routing ip cef load-sharing algorithm universal 5C956F4C no ip dhcp use vrf connected ip dhcp excluded-address 192.168.239.1 ip dhcp excluded-address 192.168.239.254 ip dhcp excluded-address 192.168.240.1 ip dhcp excluded-address 192.168.240.254 ip dhcp excluded-address 192.168.238.1 ip dhcp excluded-address 192.168.238.254 ip dhcp excluded-address 192.168.135.1 ip dhcp excluded-address 192.168.135.254 ip dhcp excluded-address 192.168.235.200 192.168.235.254 ip dhcp excluded-address 192.168.235.1 192.168.235.49  

Eidt cef  is Cisco Express Forwarding, and since this switch is actually acting as a router between my VLANs I would prefer not to turn it off.

Just for some extra info for anyone looking at it.  I use a virtual interface on this switch for the DHCP server to use.

interface Vlan135  ip address 192.168.135.1 255.255.255.0  

Author Warren

It is strange how reservations are done in global config mode not dhcp config mode.  

Yes, it is a bit odd.  The real kicker is that when I'm doing more than one trying do use it for more than one dhcp range on different VLANs it won't let me use the host command in global conifg.  I'm still scratching my head on this one.

Author Dave Lewis

Create a separate DHCP pool for your static bindings. The error message is saying that you can't mix static bindings and a 'network' command within one pool so keep your existing pools per VLAN:

ip dhcp pool pool135 network 192.168.135.0 255.255.255.0 default-router 192.168.135.1 domain-name sctc.local dns-server 192.168.235.249 192.168.235.4

and then create a new one:

ip dhcp pool staticaddresses

host 192.168.135.56 /24

client-address 01 00.0074.b864.81

host 192.168.135.65 /24

client-address 0100.0074.b865.22

host 192.168.135.53 /24

Note that the client-address is the MAC address prepended with 01 which denotes ethernet. The hardware-address command is used for bootp rather than dhcp. The complete dhcp reference guide is here Opens a new window

You won't need the excluded-address commands but you can keep them in for safety if you prefer. If you want to double check the client identifier the printers are using (Ricoh's by the look of things) then use the following:

debug ip dhcp server packet

Then reboot a printer and it'll display similar to this:

036325: Aug 10 15:48:18.814 CET: DHCPD: DHCPREQUEST received from client 0100.2304.348c.37.

Don't forget to:

afterwards.

Author The Timmy

David538 is spot on, thanks, it led me to the solution I needed for doing the same with a Cisco router (an 800 series in particular)

ip dhcp pool DHCP-POOL    network 192.168.1.0 255.255.255.0    default-router 192.168.1.1    domain-name Pooponastick.yuck    dns-server 192.168.1.1    lease 0 2 ! ip dhcp pool STATIC-ADDRESSES    host 192.168.1.11 255.255.255.0    client-identifier 0178.2bcb.a700.71 ! Worked like a champ.

Thanks again.

Author Jeff Mason

Actually, it is "Worked like a CHARM," not "champ."

Things that bug me:

Peoples' incorrect usage of standard well-known sayings & terms:

No such word as "NUKE-YOU-LER"

It is NUKE-LEE-ER - nuclear - say "Nu" then say "clear" - now, put them together.

Worked like a CHARM, not 'champ.' Fought like a champ. Won like champ, but correct line is: worked like a charm.

UK = "worked a treat."

BOAT-load of stuff, not "BUTT-LOAD." (if you have a BUTT-load of something; you're in trouble)

Arrrggghhh!!

But YES, this, in the Global Config of my Cisco router, worked like a ** CHARM! ** Many thanks! 

ip dhcp pool staticaddresses    host 10.19.22.210 255.255.255.0    client-identifier 01xx.1c23.8a28.4c

Thanks for this!

Your rant is a childish and unproductive addition to a 2.5 year old post. Thank you, Champ.

Author Barry Woodhead

Hi Guy's, I've been following this tread and have successfully configured one of my ap's with a static address but I am only able to add one ap. My script is below but the ap that gets added is the last one on the list, does anyone know why?

The router IOS is 12.4(15)T4

Ip dhcp pool lwap_static_addresses host aa.bb.cc.130 /24 client-identifier 0100.19e7.5ce1.ce host aa.bb.cc.131 /24 client-identifier 0100.19e7.5ce1.fe host aa.bb.cc.132 /24 client-identifier 0100.2304.2566.62 host aa.bb.cc.133 /24 client-identifier 0100.1aa1.e00c.26 host aa.bb.cc.134 /24 default-router aa.bb.cc.129 option 43 ascii “aa.bb.cc.202”

Thanks in anticipation.

Author Nasir Bilal

From my experience, you have to create a separate pool for each static reservation. For that reason, your script is only hold the last entered address. You should rewrite your code like this:

ip dhcp pool lwap_static_address1

host aa.bb.cc.130 /24

client-identifier 0100.19e7.5ce1.ce

default-router aa.bb.cc.129

option 43 ascii 201Caa.bb.cc.202201D

ip dhcp pool lwap_static_address2

host aa.bb.cc.131 /24

client-identifier 0100.19e7.5ce1.fe

ip dhcp pool lwap_static_address3

host aa.bb.cc.132 /24

client-identifier 0100.2304.2566.62

Hope that helps!

Author Juber Pasha Shaik

Even I'm wondering why it is taking the last command only. 

One separate dhcp pool for each static binding is really insane. 

There should have been some other simple solution.

Tag by cisco

It is a simple solution. One DHCP pool per required reserved address makes sense. It is long winded though, but that's not the same as complicated.

Author Paola Agudelo

socia is an IT service provider.

Have a cuestion do i have to put my ip on my PC stactic to? thanks ill be waiting for a answer.

Author Alex Kuznetsov

i used the same dhcp pool:

ip dhcp pool pool_name

  network xxx.xxx.xxx.xxx 255.255.255.0

  default-router xxx.xxx.xxx.xxx

  dns-server xxx.xxx.xxx.xxx

  domain-name xxx

  address xxx.xxx.xxx.xxx client-id yyxx.xxxx.xxxx.xx

where client-id you can see with "sh ip dhcp binding"

This topic has been locked by an administrator and is no longer open for commenting.

To continue this discussion, please ask a new question .

Read these next...

Curated Some Websites doesnt load after domain migration

Some Websites doesnt load after domain migration

Hi all,I'm getting crazy cause of that issue.We have migrated from old to new domain and rejoined the devices successfully. Since then some websites are not responsive anymore - even I can reach them from the DNS Server itself, the endpoint is not able to...

Curated Snap! -- Driving a Moon Rover, Lunar Data Centers, Robot Realtors, Brain Zappers

Snap! -- Driving a Moon Rover, Lunar Data Centers, Robot Realtors, Brain Zappers

Your daily dose of tech news, in brief. Welcome to the Snap! Flashback: March 6, 2012: Google introduces Google Play (Read more HERE.) Bonus Flashback: March 6, 2009: NASA Launches Kepler, the first planet seeking space telescope (Read mo...

Curated Interactive AI survey: Share and compare your opinions to earn 75 points!

Interactive AI survey: Share and compare your opinions to earn 75 points!

Artificial technology has been making headlines in recent months, sparking discussion around the future impact of the technology. Recently, hundreds of your peers in Spiceworks shared their thoughts on how they believe artificial intelligence will affe...

Curated Learning Enterprise Architecture - in Infrastructure.

Learning Enterprise Architecture - in Infrastructure.

Hi there,I have been in IT for 10+ years, worked as IT Support, System Admin, IT Admin etc. Looking forward to become Enterprise Architect, so was looking around for certification perspective to learn properly and get certified if possible. I found TOGAF,...

Curated Spark! Pro series - 6th March 2023

Spark! Pro series - 6th March 2023

Good day fellow inhabitants of the Spiceworld! It is my privilege to provide you with the first Spark! of the week to hopefully inform and entertain, raising a smile on your Monday. Don’t forget to spice it up if yo...

DHCP Static Binding on Cisco IOS

Lesson Contents

Cisco IOS devices can be configured as DHCP servers and it’s also possible to configure a static binding for certain hosts. This might sound easy but there’s a catch to it…in this lesson I’ll show you how to configure this for a Cisco router and Windows 7 and Linux host. This is the topology I’ll be using:

DHCP Binding Demo Topology

The router called “DHCP” will be the DHCP server, R1 and the two computers will be DHCP clients. Everything is connected to a switch and we’ll use the 192.168.1.0 /24 subnet. The idea is to create a DHCP pool and use static bindings for the two computers and R1:

First we will create a new DHCP pool for the 192.168.1.0 /24 subnet:

Whenever a DHCP client sends a DHCP discover it will send its client identifier or MAC address. We can see this if we enable a debug on the DHCP server:

Cisco Router DHCP Client

Now we’ll configure R1 to request an IP address:

In a few seconds you will see the following message on the DHCP server:

When a Cisco router sends a DHCP Discover message it will include a client identifier to uniquely identify the device. We can use this value to configure a static binding, here’s what it looks like:

We create a new pool called “R1-STATIC” with the IP address we want to use for R1 and its client identifier. We’ll renew the IP address on R1 to see what happens:

Use the renew dhcp command or do a ‘shut’ and ‘no shut’ on the interface of R1 and you’ll see this on the DHCP server:

As you can see above the DHCP server uses the client identifier for the static binding and assigns IP address 192.168.1.100 to R1. If you don’t like these long numbers you can also configure R1 to use the MAC address as the client identifier instead:

This tells the router to use the MAC address of its FastEthernet 0/0 interface as the client identifier, you’ll see this change on the DHCP server:

Of course now we have to change the binding on the DHCP server to match the MAC address:

Do another release on R1:

And you’ll see that R1 gets its correct IP address from the DHCP server and is being identified with its MAC address:

So that’s how the Cisco router requests an IP address. Let’s look at the Windows 7 host now to see if there’s a difference.

Windows 7 DHCP Client

This is what you’ll find on the DHCP server:

Windows 7 uses its MAC address as the client identifier. We can verify this by looking at ipconfig:

That’s easy enough, we’ll create another static binding on the DHCP server so that our Windows 7 computers receives IP address 192.168.1.110:

Let’s verify our work:

This is what the debug on the DHCP server will tell us:

There you go, Windows 7 has received the correct IP address. Last but not least is our Linux computer which acts a little different.

Linux DHCP Client

Linux (Ubuntu) in my example acts a little different when it comes to DHCP client, let me show you:

The DHCP server shows this:

We see the MAC address of the linux server so we’ll create a static binding that matches this:

We’ll release the IP address on our Linux host:

Now take a good look at the debug:

That’s not good, even though we configured the client identifier it’s not working. Let’s double check the MAC address:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

645 Sign Ups in the last 30 days

satisfaction-guaranteed

Tags: DHCP , Network Services

Forum Replies

Thanks for the info Rene As always complete posts!

how to reserve a single ip for pc in router ? ?

That is exactly what this lesson is about…

I have some challenges with CCNA R&S lab about DHCP/DHCP relay.The lab number is 10.1.3.3 assuming that you have access to the new CCNA R&S oficial course… The lab has two clients, two intermediary routers and another router connected to the intermediary routers via serials. Intermediary router are R1 and R3, the central router is R2. To R2 are connected via Ethernet GIgabit interfaces a DNS Seriver and the ISP The lab tell me to do the R2 a dhcp server for the two PC’s connected to the intermediary routers R1 and R2 so they receive an IP… The challenge

Hi Catalin,

Your message wasn’t deleted but not approeved before, I do this manually because of spam. I think this example should help you:

http://networklessons.com/network-services/cisco-ios-dhcp-relay-agent/

If not, let me know.

15 more replies! Ask a question or join the discussion by visiting our Community Forum

dhcp reservation cisco router

Jesin's Blog

Welcome to the Portal of Technology

Cisco DHCP configuration

July 31, 2011 Networking Jesin A Leave a Comment

cisco dhcp configuration

A tutorial describing how to configure a Cisco router as a DHCP server, I’ll cover DHCP reservation and excluding of IP addresses as well. A DHCP server dynamically assigns IP addresses to hosts in a network, by creating DHCP reservations we can statically assign an IP address to a host based on its MAC address. IP address exclusion prevents conflicts among devices i certain hosts are manually assigned IP addresses. When configuring DHCP reservation it should be done differently for Windows DHCP clients and Linux DHCP clients because both of them make DHCP requests differently.

Configure a DHCP Pool on Cisco

On a Cisco router use the following commands to create a pool of IP addresses with a default gateway, DNS server and lease time.

The name of the pool is mynetwork1 which can be anything and it contains addresses from 192.168.0.1 to 192.168.0.254, the default gateway will be 192.168.0.1, DNS servers are 8.8.8.8 and 8.8.4.4 you can add more IP addresses by dividing them with spaces. Finally the lease time specifies how long the IP addresses will be valid before the client need to get them renewed. Here it is 4 days, 6 hours and 30 minutes.

DHCP IP address exclusion

Certain IP addresses like the IP address of the default gateway router and the DHCP server itself are assigned manually, since the DHCP pool covers the entire subnet containing the manually assigned IP address conflicts might occur. The following command excludes only one IP address

To exclude a range of IP addresses use the following command

Configure DHCP reservation

DHCP reservations are configured based on MAC addresses, an IP is statically assigned to a host with the specified MAC address. As said earlier DHCP reservations should be configured differently based on the DHCP client’s (the host TO which the IP will be assigned) Operating System.

DHCP reservation for Windows Clients

Follow these commands if you’re configuring a reservation for a windows host.

You need to create a separate pool for each DHCP reservation. The client-identifier is the MAC address of the host added with 01 at the beginning, so in this example the MAC address of the host is 080027d4e072 adding 01 at the beginning gives 01080027d4e072, divide four characters by a dot 0108.0027.d4e0.72

DHCP reservation for Linux Clients

The process is easy for statically assigning IP addresses to Linux hosts. Follow the commands below

the hardware-address is the MAC address of the Linux host, just enter it as it is. Create a pool for each DHCP reservation.

Useful Cisco DHCP commands

For displaying the IP addresses assigned to hosts use

Display IP conflicts in the network

Display DHCP events as they occur

Turn off debugging

Set an interval for cleaning up expired DHCP bindings

Manually clear a binding

Related posts:

linux category thumbnail

Leave a Reply Cancel reply

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

Vultr SSD VPS

Cisco IOS Cookbook, 2nd Edition by Kevin Dooley, Ian Brown

Get full access to Cisco IOS Cookbook, 2nd Edition and 60K+ other titles, with a free 10-day trial of O'Reilly.

There are also live events, courses curated by job role, and more.

Allocating Static IP Addresses with DHCP

You want to ensure that your router assigns the same IP address to a particular device every time it connects.

The following commands ensure that the router assigns the same IP address to a device each time it requests one:

The router allows you to statically bind an IP address to a MAC address to ensure that a particular device always receives the same IP address. This is particularly useful for devices such as servers that must be available for access via a well-known IP address or DNS entry. Any device that accepts inbound sessions will probably require a static address. Being able to allocate these addresses via DHCP provides network administrator with greater control.

The configuration for a static DHCP mapping is slightly different than a dynamic pool. In particular, you must assign a separate dhcp pool for each static server. In our example, we created a pool named IAN to allocate a static IP address to user Ian. Also, instead of defining a network range of IP ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.

Don’t leave empty-handed

Get Mark Richards’s Software Architecture Patterns ebook to better understand how to design components—and how they should interact.

It’s yours, free.

Cover of Software Architecture Patterns

Check it out now on O’Reilly

Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.

dhcp reservation cisco router

Stack Exchange Network

Stack Exchange network consists of 181 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Reserve an IP for client on Cisco DHCP server

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.

Here is the DHCP pool config

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

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

YLearn's user avatar

2 Answers 2

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 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.

SeanP's user avatar

You have to create another pool with client-identifier and your Client ID, which usually defaults to MAC prepended with 01 (Ethernet client), or hardware-address and your MAC like this:

If you prefer to configure it manually, please have a look at:

ar_'s user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

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 cisco dhcp cisco-catalyst cisco-ios-12 or ask your own question .

Hot Network Questions

dhcp reservation cisco router

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

dhcp reservation cisco router

How to configure DHCP reservation on Cisco 3750

Here is steps to configure DHCP reservation with MAC address on Cisco Catalyst 3750

IP Pool : 10.10.10.0/24 MAC#1 :  1111.2222.3333 MAC#2 :  4444.5555.6666

* You cannot use network range on MAC Address based reservation DHCP configuration

ip dhcp pool node1    host 10.10.10.50 255.255.255.0    client-identifier 0111.1122.2233.33    client-name node1    default-router 10.10.10.1  

 ip dhcp pool node2   host 10.10.10.51 255.255.255.0    client-identifier 0144.4455.5566.66    client-name node2    default-router 10.10.10.1

ip dhcp pool node1    host 10.10.10.50 255.255.255.0    hardware-address 0111.1122.2233.33    client-name node1    default-router 10.10.10.1  

 ip dhcp pool node2   host 10.10.10.51 255.255.255.0    hardware-address 0144.4455.5566.66    client-name node2    default-router 10.10.10.1

Related Articles

dhcp reservation cisco router

Leave a Reply Cancel reply

You must be logged in to post a comment.

HTML tutorial

Expert Links

Recent posts.

Recent Comments

dhcp reservation cisco router

Popular Posts

dhcp reservation cisco router

Random Posts

IMAGES

  1. How to Configure DHCP Cisco Router

    dhcp reservation cisco router

  2. How to Configure DHCP on Cisco Routers (With Command Examples)

    dhcp reservation cisco router

  3. Dhcp reservation on cisco router

    dhcp reservation cisco router

  4. Configure Cisco router as DHCP server

    dhcp reservation cisco router

  5. configure cisco router as dhcp server / cisco ios dhcp configuration > BENISNOUS

    dhcp reservation cisco router

  6. dhcp router cisco

    dhcp reservation cisco router

VIDEO

  1. Cisco Packet Tracer(DHCP, switch, router)

  2. CISCO| BUILDING DHCP SERVER

  3. CCNA (Router DHCP) how to configure DHCP on Cisco Router 2811

  4. Computer network _ Cisco Packet tracers _ DHCP and DNS server configuration

  5. How to Configure Static IP in server 2019

  6. Cisco Smart Licensing Enable PLR / SLR for FMC

COMMENTS

  1. how to reserve a specific MAC address in the existing Cisco DHCP

    You would have to create a dedicated pool, with a single IP address, for each reservation you want to do; for example, if you have a /24 and you want to

  2. DHCP reservation on router

    each reservation is one separate pool. take care about hardware-address command because it will only work if the client-identifier is the MAC address otherwise

  3. Static reservation in Router DHCP pool

    can you run debug dhcp detail and debug dhcp server events on the router and verify that the client identifier you have configured is actually

  4. How to create reservations in Cisco DHCP Server

    So, this is what I set up instead. ip dhcp pool pool135 network 192.168.135.0 255.255.255.0 default-router 192.168.135.1 domain-name sctc.local

  5. Cisco ios dhcp reservation and Cisco dhcp lease release

    cisco router dhcp server , cisco router dhcp reservation , cisco router dhcp lease time , how to configure dhcp on cisco router , cisco

  6. DHCP Static Binding on Cisco IOS

    The router called “DHCP” will be the DHCP server, R1 and the two computers will be DHCP clients. Everything is connected to a switch and we'll use the 192.168.

  7. Cisco DHCP configuration

    Configure DHCP reservation ... DHCP reservations are configured based on MAC addresses, an IP is statically assigned to a host with the specified

  8. Allocating Static IP Addresses with DHCP

    Selection from Cisco IOS Cookbook, 2nd Edition [Book] ... You want to ensure that your router assigns the same IP address to a particular device every time

  9. Reserve an IP for client on Cisco DHCP server

    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

  10. How to configure DHCP reservation on Cisco 3750

    Here is steps to configure DHCP reservation with MAC address on Cisco Catalyst 3750 ... default-router 10.10.10.1. ip dhcp pool node2