cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5802
Views
16
Helpful
9
Replies

DHCP via Mac Address

Live2 Bicycle
Level 3
Level 3

I have a Cisco 831 router. I am handing out DHCP to my network via the router

ip dhcp pool HmPrivate

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

dns-server 192.168.1.20

domain-name hmprivate.net

What I am trying to do is assign the same ip address to my laptop via DHCP by associating the mac address of the laptop to the DHCP ip address. This is easily done on a windows server.

I have not been able to figure it out on this router though. I have looked at the commands under the pool as well as in config mode. Nothing is jumping out at me.

Any assistance is greatly appreaciated!

1 Accepted Solution

Accepted Solutions

Hi,

DHCP manual binding doesn't use the mac address. You need to configure the client id to manually bind an address to a host. The client id uses ASCII characters. The easy to way to find the client ID is to enable 'debug ip dhcp server packet' on your router and use that address as your client ID under the DHCP pool configuration. Exercise caution when enabling debugs in a production network.

HTH

Sundar

View solution in original post

9 Replies 9

ajagadee
Cisco Employee
Cisco Employee

Del,

The feature that you are looking for is called Manual Bindings.

Please refer the below URL for configuration:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/ip_c/ipcprt1/1cddhcp.htm#wp1001108

I hope it helps.

Regards,

Arul

Anand Narayana
Level 6
Level 6

Hi Hope,

ur configuration lookz fine for a dynamic IP address assignment, but for a static IP for a MAC lookz like .....

ip dhcp pool test

host 192.168.1.2 /24

hardware-address aaaa.bbbb.cccc.dddd

if it is an windows OS, juz include 00 or 01 b4 the mac for linux OS, u don't require that 00 or 01.

hope this helps.

rate this post.

Ok I powered up my laptop got an ip address from the rtr of 192.168.1.21. On the router i did a sh arp to get my hardware address of 0015.0025.60aa. I then created the new DHCP pool for the static entry. From my windows laptop i do an ipconfig / release then a ipconfig / renew. I keep getting the 192.168.1.21 address and not the 192.168.1.13 address that I want.

Am I missing something really simple here? Why wont the laptop grab the 192.168.1.13 address?

ip dhcp pool HmLaptop

host 192.168.1.13 255.255.255.0

hardware-address 0100.1500.2560.aa

default-router 192.168.1.1

dns-server 192.168.1.20

client-name dhopewell2

Here is a list of all DHCP pools on my router.

no ip dhcp use vrf connected

ip dhcp excluded-address 192.168.1.1 192.168.1.10

ip dhcp excluded-address 192.168.1.250 192.168.1.254

ip dhcp excluded-address 192.168.50.1 192.168.50.100

ip dhcp excluded-address 192.168.24.1 192.168.24.100

!

ip dhcp pool HmPrivate

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

dns-server 192.168.1.20

!

ip dhcp pool HmWK

network 192.168.24.0 255.255.255.0

default-router 192.168.24.1

dns-server 10.0.101.12 10.0.101.13

option 150 ip 10.200.1.50 10.200.1.51

!

ip dhcp pool vlan10

network 192.168.50.0 255.255.255.0

default-router 192.168.1.1

dns-server 192.168.50.20

!

ip dhcp pool HmLaptop

host 192.168.1.13 255.255.255.0

hardware-address 0100.1500.2560.aa

default-router 192.168.1.1

dns-server 192.168.1.20

client-name dhopewell2

Del,

After you disconnect your PC, do a "clear ip dhcp binding * " on the router and then try to reconnect and see what IP Address the PC is getting.

Regards,

Arul

Nope, did not work. ANy other suggestions. It has to be something simple were missing.

Hi,

DHCP manual binding doesn't use the mac address. You need to configure the client id to manually bind an address to a host. The client id uses ASCII characters. The easy to way to find the client ID is to enable 'debug ip dhcp server packet' on your router and use that address as your client ID under the DHCP pool configuration. Exercise caution when enabling debugs in a production network.

HTH

Sundar

Urica That was it!!! Yea!!!

I changed the:

hardware-address 0100.1500.2560.aa

To:

client-identifier 0100.1500.2560.aa

And NOW I get my 192.168.1.13 address.

Thanks!!!

Glad to hear the issue is resolved!! :-)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco