cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
730
Views
5
Helpful
8
Replies

Can an bind an end user MAC address to an IP address?

What am I asking?

 

What I am trying to do is make sure that when my device (or preferably router) reboots the client gets the same IP assignment?  Why am I asking this? 

 

We have had issues getting into the network devices via vpn because the ip has changed even though we have assigned the ip statically to the device. 

This makes finding end points and main network management ip's really time consuming to find even with "fing" and other tools.  It would be very handy to just know that no matter what is ahppening on the network, dhcp lease renew etc that the originally ip address will always be with the same device.

 

Hope that makes sense?

 

 

8 Replies 8

Richard Burts
Hall of Fame
Hall of Fame

Perhaps there are aspects of your question that I do not understand correctly. You ask "the client gets the same IP assignment?" That could be an issue if the client is learning its IP address using DHCP. But you describe this as assigning the address statically. My interpretation of this would be a manually configured IP address on the device. In which case reboot of the router should not be an issue. 

If there is an issue when the router reboots then my understanding of your description is mistaken and I need additional details about your issue.

 

HTH

Rick

first exclude 10.0.0.1 255.255.255.0
then add anther POOL for only one host as show below 
Router1#configure terminal 

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#ip dhcp pool IAN

Router1(dhcp-config)#host 10.0.0.1 255.255.255.0

Router1(dhcp-config)#client-identifier 0100.0103.85e9.87

Router1(dhcp-config)#client-name win2k

Router1(dhcp-config)#exit

Hi, so this is what I am getting

 

Router(config)#do sh ip dhcp binding

IP address Client-ID/ Lease expiration Type

Hardware address

192.168.10.53 0001.C9B4.76CC -- Automatic

192.168.10.52 000C.85BC.494E -- Automatic

192.168.10.51 0001.63D0.7DDD -- Automatic

192.168.10.54 0060.5C70.7373 -- Automatic

 

For .54

 

So I can't clear the current binding

Router(config)#do sh ip dhcp binding

IP address Client-ID/ Lease expiration Type

Hardware address

192.168.10.53 0001.C9B4.76CC -- Automatic

192.168.10.52 000C.85BC.494E -- Automatic

192.168.10.51 0001.63D0.7DDD -- Automatic

192.168.10.54 0060.5C70.7373 -- Automatic

Router(config)#clear ip dhcp binding 192.168.10.54

^

% Invalid input detected at '^' marker.

 

Do I need to clear it to reassign it in the binding table?

 

If I try and create a new pool to add it to

 

Router(config)#ip dhcp pool binding

Router(dhcp-config)#host 192.168.10.54 255.255.255.0

^

% Invalid input detected at '^' marker.

 

So struggling to progress on this, any help appreciated

 

 

 

Hi,
I don't see your reply until today 
please share the following 
Router(dhcp-config)# ?

Hi

 Depending on the dhcp server, is pretty simple maintain the same IP to a client even after client or network devices reboot. 

Jitendra Kumar
Spotlight
Spotlight

i this below discussion you can understand well:-


when DHCP dynamically assigned an IP to the device use this command to view the client-identifier:

show ip dhcp binding x.x.x.x where x.x.x.x is the allocated IP

take note of the client-identifier and delete the dynamic entry:

clear ip dhcp binding x.x.x.x
create a host pool for this IP:

ip dhcp pool host_pool

host x.x.x.x 255.255.255.0

client-identifier 01xx.xxxx.xxxx.xx or hardware-address xxxx.xxxx.xxxx

 

https://community.cisco.com/t5/switching/how-can-i-bind-ip-address-to-the-respective-mac-address-of-a-pc/td-p/2327405

 

Thanks,

Jitendra

Thanks,
Jitendra

Hello


@FrankFlintstone16044 wrote:

We have had issues getting into the network devices via vpn because the ip has changed even though we have assigned the ip statically to the device. 


Can you elaborate, as others have stated , you can dynamically append a reservation in the scope of the dhcp server so a client will obtain the same ip address assignment upon connecting to the network ,however you state statically applying an ip address to a client and it doesn't retain that ip address this after a reboot of the rtr?

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

I don't remember the exact syntax of this, but you can use a database file (which can be remote or on the device flash) to store lease information if you are using the router/switch as the DHCP server. I assume that to be the case since if you were doing DHCP forwarding, the remote DHCP would be unaffected by router reboots.

One other clarification item. Do you want that client to have that IP address forever and no other client can use it? You could do that using explicit reservations or by doctoring the lease time after creating a DB file. That option does have some scaling issues as you could run out of IP addresses on that network once you have had enough clients connect. The database option seems like it might meet your needs.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-sy/dhcp-15-sy-book/config-dhcp-server.html#GUID-5F022CF5-671E-49E7-8FBD-69997EEBC730