03-16-2020 05:17 AM
Dear Team
Can anyone tell me how to reserve a specific MAC address in the existing Cisco DHCP server switch?
I have multiple DHCP pools running in the cisco switch and I want to reserves a specific VLAN user IP address how can I archive this.
Solved! Go to Solution.
03-16-2020 06:26 AM
Hello,
there are two ways to create a reservation:
ip dhcp excluded-address 192.168.1.10
!
ip dhcp pool CLIENT_10
host 192.168.1.10 255.255.255.0
client-identifier 0100.3412.1b0c.19
The client-identifier option prepends a 01 (for Ethernet) to the MAC address.
or
ip dhcp excluded-address 192.168.1.10
ip dhcp pool CLIENT_10
hardware-address 0034.121b.0c19
host 192.168.1.10 255.255.255.0
03-16-2020 05:54 AM
Hi,
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 allocate 2 IP addresses to specific hosts, you would need to create 3 pools (two host pool with a single IP in each one, and one network pool for the other devices).
The reservation is not done based on the MAC address, but as per the RFC, based on the client-identifier of the DHCP client; you can catch the DHCP client-identifier by doing a packet capture at the source, or "debug ip dhcp server events" and "debug ip dhcp server packets" on the DHCP server. Here's an example of it.
https://www.theroutingtable.com/configuring-a-cisco-dhcp-ip-reservation/
Regards,
Cristian Matei.
02-22-2021 04:49 AM
Thanks for the feed back, Christian ,
03-16-2020 06:26 AM
Hello,
there are two ways to create a reservation:
ip dhcp excluded-address 192.168.1.10
!
ip dhcp pool CLIENT_10
host 192.168.1.10 255.255.255.0
client-identifier 0100.3412.1b0c.19
The client-identifier option prepends a 01 (for Ethernet) to the MAC address.
or
ip dhcp excluded-address 192.168.1.10
ip dhcp pool CLIENT_10
hardware-address 0034.121b.0c19
host 192.168.1.10 255.255.255.0
03-16-2020 06:48 AM
Thank you for your reply my issue has been resolve.
we need to create any other DHCP pool for reservation.
Could you please guide what is different between client-identifier and hardware-address
03-16-2020 07:41 AM
Hi,
Hardware-address is used to specify the MAC address (hardware-address) instead of DHCP client identifier. This, however, never worked for DHCP, it was there for backwards compatibility purposes with BOOTP. If you get a DHCP Request, and not BOOTP, the hardware-address option should not work.
Regards,
Cristian Matei.
03-17-2020 12:23 AM
03-17-2020 01:41 AM
Hi,
You would need to configure, as i stated before, one pool for each IP address you want to reserve for a specific client, based on the DHCP Client Identifier:
ip dhcp pool CLIENT_10
host 192.168.1.10 255.255.255.0
client-identifier 0100.3412.1b0c.19
!
ip dhcp pool CLIENT_11
host 192.168.1.11 255.255.255.0
client-identifier xxxxx
!
ip dhcp pool CLIENT_12
host 192.168.1.12 255.255.255.0
client-identifier yyyyy
Regards,
Cristian Matei.
03-18-2020 05:33 AM
Thank you Cristian Matei.
now I got your point. If I want to reserve 4 MAC addresses in the Cisco DCHP Switch then I need to create 4 DHCP pool which is other then the scope pool.
my issue has been resolve.
03-18-2020 05:48 AM
Hi,
Correct. And the "hardware-address" should not work.
Regards,
Cristian Matei.
08-04-2020 08:03 PM
This post has been very helpful. As I understand it, there is a prefix in a client-identifier which is 01 for Ethernet. Where can I find a list of any OTHER prefix? I presume that if my switch is configured as the DHCP server and I have a wireless device that I'd like to make a DHCP reservation for, the client-identifier isn't going to start with 01. Is that right?
Is there a command we can use to show the client-identifier list, as opposed to using show mac address-table?
08-04-2020 08:12 PM
I think I just answered one of my own questions. show ip dhcp binding shows all the client-identifiers.
Would still be great to have a list of prefixes.
09-27-2022 03:32 AM
How it looks in practice?
For example I have device pc/smartphone and I want reserve specific address ip for that device.
Let's assume that at the beginning device ip address is 192.168.2.37 and I want setup for that device address like 192.168.2.100 for ever and ever (even when device will be disconnected to the router no one should ever take that ip address).
So I think that should looks like
ip dhcp excluded-address 192.168.2.100
ip dhcp pool MY_STATIC_DEVICE
host 192.168.2.100 255.255.255.0
client-identifier aaaa.bbbb.cccc (device mac address)
default-router 192.168.2.1
dns-server 8.8.8.8
lease infinite
and that should be everything? Or should I manualy setup static ip also on that device? Or am I missing something?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide