cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2870
Views
5
Helpful
4
Replies

Dhcp server on Catalyst 2960 stops assigning address with addresses in pool

mkahanek1970
Level 1
Level 1

Folks,  I am using DHCP snooping to assign an ip address to a small pos printer based on the switch port it is plugged in to.  I use the following command on the port my printer(s) plug in to
 ip dhcp snooping vlan 3 information option format-type circuit-id override string <station of printer name, usually 4 or 5 characters>

I map that to a dhcp class and that dhcp class to a address range of one address.  I then have a kron command on the switch that issues a clear ip dhcp bind * every 5 minutes. 

The solution works as I need.  Which is to allow for a manager to take a spare ethernet pos printer and replace any of 8 printers at any time without I.T. intervention.  This solution was used to replace a tcp to serial based solution that was iffy at best.

However I have run in to an issue that has arisen.  SOMETIMES my switch simply stops assigning and address.  Debug says there are no available addresses in the pool.   When I do a show ip dhcp bind it shows no bindings.  The only way I can get it working again is to reboot the switch or remove the ip dhcp pool <name> and re-enter the pool information again.   I did not have this issue when I was running the pool on my cisco 1841 routers.  However when I moved the pool to my 2960 switches (due to router retirement) this issue has popped up.   As an FYI our lease time is set to infinite.   Also the choice to run the kron command every 5 minutes is because many times our stores fail to call in for new spares and may have to replace a defective printer 2 or 3 times to find a working printer. 

Any help would be appreciated.

1 Accepted Solution

Accepted Solutions

Ich Nafi
Level 1
Level 1

Please try:

show ip dhcp conflict

We had a similar Problem, where Windows-Machines cause IP-Conflict. The Switch (which did DHCP) disabled all IPs, that had conflicts). The hole pool was not usable after a while, even it said that no IP was bound.

To disable this behavior use:

no ip dhcp conflict logging

View solution in original post

4 Replies 4

pwwiddicombe
Level 4
Level 4

A few things that could be looked into:

- do you have port security enabled?

- with an infinite lease, do you have lots of IP addresses?

- DHCP traffic is relatively light.  A short lease time would allow a new printer to take over (i.e. a 10 minute lease time could be reused after 10 minutes after the other printer is removed, and it would only send about 5 packets every 5 minutes to renew the lease.).  This DOES imply, however, that you trust the DHCP environment...   Or if you have extra addresses, make it 24 hours or so,

We do have port security in the environment, but disabled on these ports.   The infinite lease is because there is no reason for them to expire as these printers should be three in place until they break.   There is only one address per printer class.   What is odd is I do not have this issue when I have the pool configured on a Cisco router.   Only on the switch.   So that tells me maybe it is just buggy software.   I may change the lease time to something else to see if that at least limits the number of times it enters this state.    I will post debug output whenever this issue occurs again.

Ich Nafi
Level 1
Level 1

Please try:

show ip dhcp conflict

We had a similar Problem, where Windows-Machines cause IP-Conflict. The Switch (which did DHCP) disabled all IPs, that had conflicts). The hole pool was not usable after a while, even it said that no IP was bound.

To disable this behavior use:

no ip dhcp conflict logging

mkahanek1970
Level 1
Level 1

I was able to re-create the problem and then issued sho ip dhcp conflict.  Indeed there was a conflict with discovery method ping.   When I issued the clear ip dhcp conflict * that resolved my issue.  I will need to add that to my script that runs every 5 minutes on my switches and I should be golden.

Thanks,

Review Cisco Networking products for a $25 gift card