cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
19900
Views
0
Helpful
5
Replies

Forcing a DHCP release and renewal

pingduck
Level 1
Level 1

I have a switch running classic IOS 15.7. One function that I am trying depends on knowing if it is disconnected from DHCP server. The switch port is connected to another switch and it gets its IP using DHCP. e.g.

 

int Vlan 1

 ip dhcp client lease 0 0 1

 ip address dhcp

 

I found that "ip dhcp client lease" will sometime be overrode by the server's lease duration. If the server specified a longer duration, the client will obey.

 

I know about "release dhcp" and "renew dhcp" commands. However, I found that "renew dhcp" only renews but does not release and it also cannot renew while the release is in progress. 

 

The only workaround I found is shut and no shut the vlan interface. I am trying to avoid any config change. Any other ideas?

5 Replies 5

Hi,

 

You said "I found that "renew dhcp" only renews but does not release and it also cannot renew while the release is in progress. " When you renew dhcp, do you want to receive a different IP address than it was assigned before? Also, if dhcp release is in progress, I believe it should wait to renew; I do not see any problem with that. 

 

HTH,

Meheretab

HTH,
Meheretab