cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2214
Views
10
Helpful
4
Replies

DHCP and MAC adress

m.x
Level 1
Level 1

Hi,

 

When using DHCP on a Cisco router, does clearing the MAC-address-table affect the DHCP binding? Does it trigger the DHCP process again?

 

A customer has a specific  DHCP question. Their pool only has one adress and the sometimes switch laptops, but the new laptop doesnt get a DHCP given adress.. Now I was thinking that perhaps lowering the MAC age timer could help trigger the renew process. Or is that a silly thought?

Please let me know if my thinking is correct and/or there is a better alternative. More addresses is for now not an option..

 

Thanks in advance

2 Accepted Solutions

Accepted Solutions

Hi Seb,

 

Thanks for your quick response. I will try the 

lease 0 0 1

commandt to see whether this helps. 

 

Just another thought tho, if I unplug my laptop from a router, how long will the bound IP exit in the show ip dhcp bindign table? Is it instantly gone or does it wait a day (standard) untill the IP comes available again?

 

Thanks again!  

View solution in original post

Technically speaking when you switch off a PC it should send a DHCP RELEASE message to the DHCP server which gave its lease. If you pull the network cable it will not have a chance to do it.

In which case you will have to wait for the lease time in the DHCP server binding table to expire.

View solution in original post

4 Replies 4

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,
Clearing the MAC address table has no effect on the DHCP. The command you are looking for is clear ip dhcp binding . Keep in mind that this does not clear the binding on the hosts which have all ready been allocated an address, this can therfore cause IP conflicts.

When a DHCP request comes in, if the server has no free leases in the pool it will not give an offer.

 

The option you will want to use is the lease time (days/ hours/ minutes) option. This can be defined under the DHCP pool. Lowering the lease will cause DHCP bindings to timeout and require that the client keeps requesting a new lease. This should work in your scenario.

 

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/12-4/dhcp-12-4-book/config-dhcp-server.html#GUID-A7226CF3-66F5-46C3-B901-C94CAAB2FCDD


cheers,
Seb.

Hi Seb,

 

Thanks for your quick response. I will try the 

lease 0 0 1

commandt to see whether this helps. 

 

Just another thought tho, if I unplug my laptop from a router, how long will the bound IP exit in the show ip dhcp bindign table? Is it instantly gone or does it wait a day (standard) untill the IP comes available again?

 

Thanks again!  

Technically speaking when you switch off a PC it should send a DHCP RELEASE message to the DHCP server which gave its lease. If you pull the network cable it will not have a chance to do it.

In which case you will have to wait for the lease time in the DHCP server binding table to expire.

Hello


@m.x wrote:

When using DHCP on a Cisco router, does clearing the MAC-address-table affect the DHCP binding? Does it trigger the DHCP process again?


The pc should release on shutdown anyway, but you can also force the release through from the pc before you disconnect the network cable- ipconfig /release

Also If I remember there is an option in windows dhcp scoped to force release on shutdown
Lastly not directly connected but you could also decrease the lease time to a low value to assist renewing.

 


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
Review Cisco Networking for a $25 gift card