cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
100211
Views
17
Helpful
12
Replies

how to reserve a specific MAC address in the existing Cisco DHCP server switch

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.

1 Accepted Solution

Accepted Solutions

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

View solution in original post

12 Replies 12

Cristian Matei
VIP Alumni
VIP Alumni

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.

Thanks for the feed back, Christian , 

juan espinosa

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

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

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.

Thanks for your reply. One more question is how can I reserve more than one Mac address in the Cisco DHCP switch. Currently, I am using Catalyst 3560G Switch and I am unable to reserves two MAC addresses at the same time. If I reserve one MAC address the other host goes on Automatic mode. Explain: I have two VLANs VLAN10 192.168.123.1 VLAN20 192.168.124.1 and I want to reserve multiple MAC addresses whatever he is belong to vlan10 or vlan20 but at the same time, I am able to reserve only one IP along with their mac. I have created another DHCP pool with the name of staticIP as per the above instructions

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.

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.  

Hi,

 

   Correct. And the "hardware-address" should not work.

 

Regards,

Cristian Matei.

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?

 

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.

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?

 

Review Cisco Networking for a $25 gift card