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

dhcp and client

sarahr202
Level 5
Level 5

Hi every body.

I have two question

1) when dhcp release message is sent by client?

i was reading about Dhcp release message.  dhcp message is sent by  client to tell  dhcp server to release the binding and the  ip address  is available to be re- assigned. The book  does not say any thing if the client such as windows xp sends this message.

2)  please consider the following:

Let say an hotel provides internet access to its guests.  Let say 100 guests   are  assigned  ip addresses by dhcp server to  access internet.   All these guests   all of sudden unplug their laptops  .  Since  dhcp server did not receive any dhcp relase messages, therefore it will maintain  those bindings until their leases  expires.  Now  we have a situation where  these 100 ip addresses though not in use, can not be assigned  as dhcp server still believe they are being used.

thanks and have a good day

2 Accepted Solutions

Accepted Solutions

david_casey
Level 1
Level 1

For part #2, I'm not sure I see your question but it's a good idea not to have too large of a lease-time in a situation like that.  If the network admin began to receive reports that end-users were not obtaining an IP address they could either decrease the lease-time or increase the subnet size.

Dave

View solution in original post

Jon Marshall
Hall of Fame
Hall of Fame

sarahr202 wrote:

Hi every body.

I have two question

1) when dhcp release message is sent by client?

i was reading about Dhcp release message.  dhcp message is sent by  client to tell  dhcp server to release the binding and the  ip address  is available to be re- assigned. The book  does not say any thing if the client such as windows xp sends this message.

2)  please consider the following:

Let say an hotel provides internet access to its guests.  Let say 100 guests   are  assigned  ip addresses by dhcp server to  access internet.   All these guests   all of sudden unplug their laptops  .  Since  dhcp server did not receive any dhcp relase messages, therefore it will maintain  those bindings until their leases  expires.  Now  we have a situation where  these 100 ip addresses though not in use, can not be assigned  as dhcp server still believe they are being used.

thanks and have a good day

Sarah

1) It depends. The RFC says that a client when it is gracefully shutdown should send a DHCP release message to the DHCP server but some  OSs do and some don't. And the RFC also says that even if the client doesn't send a DHCP release this should not affect the correct operation  of DHCP.

WIndows XP as far as i know does not send a DHCP release when rebooted. If the lease is still active when it reboots it sends a DHCP request. If the lease has expired it sends a DHCP discover.

2) Correct. So you need to -

a) make sure you have enough IP addresses in your pool

and

b) make the lease time short ie. in a corporate LAN a lease time of days is not unusual. In a hotel environment you would probably looking at less than an hour for a lease.

Jon

View solution in original post

5 Replies 5

david_casey
Level 1
Level 1

For part #2, I'm not sure I see your question but it's a good idea not to have too large of a lease-time in a situation like that.  If the network admin began to receive reports that end-users were not obtaining an IP address they could either decrease the lease-time or increase the subnet size.

Dave

Jon Marshall
Hall of Fame
Hall of Fame

sarahr202 wrote:

Hi every body.

I have two question

1) when dhcp release message is sent by client?

i was reading about Dhcp release message.  dhcp message is sent by  client to tell  dhcp server to release the binding and the  ip address  is available to be re- assigned. The book  does not say any thing if the client such as windows xp sends this message.

2)  please consider the following:

Let say an hotel provides internet access to its guests.  Let say 100 guests   are  assigned  ip addresses by dhcp server to  access internet.   All these guests   all of sudden unplug their laptops  .  Since  dhcp server did not receive any dhcp relase messages, therefore it will maintain  those bindings until their leases  expires.  Now  we have a situation where  these 100 ip addresses though not in use, can not be assigned  as dhcp server still believe they are being used.

thanks and have a good day

Sarah

1) It depends. The RFC says that a client when it is gracefully shutdown should send a DHCP release message to the DHCP server but some  OSs do and some don't. And the RFC also says that even if the client doesn't send a DHCP release this should not affect the correct operation  of DHCP.

WIndows XP as far as i know does not send a DHCP release when rebooted. If the lease is still active when it reboots it sends a DHCP request. If the lease has expired it sends a DHCP discover.

2) Correct. So you need to -

a) make sure you have enough IP addresses in your pool

and

b) make the lease time short ie. in a corporate LAN a lease time of days is not unusual. In a hotel environment you would probably looking at less than an hour for a lease.

Jon

Thanks Jon and Dave.

thanks Jon.

If you don't mind, i have few more questions.


1)Let say we have a client which was assigned ip address 199.199.199.2 by dhcp server,  sends a dhcp release message upon shutdown.

Upon receiving that message, ip address 199.199.199.2 is returned to pool.  Now dhcp has following addresses  in its pool.

199.199.199.1

199.1991.199.2

After 30 minutes,the same client powers up and sends a request to dhcp server for ip address

Will the dhcp server assign 199.199.199.2 to client or it will assign 199.199.199.1 ?

I also read  that when a client first powers up, it checks the lease of last ip address used  if it is still valid,  client then sends the dhcp request with the  ip address it was assigned before to dhcp server.

Upon receiving the request, dhcp server first check if that ip address is available . if  that ip address is available,it will assign that ip address to the client.

Now here is my problem.  let say  client sends a dhcp release message before it shuts down to dhcp server .  We power up the client   Now what will this client do?  will it send dhcp request carrying the last ip address used provided that lease is still valid?  Will client upon sending dhcp release message also erase the lease?

thanks a lot.

I found the answer after a long search.   Please  see  tcp/ip guide on line  and check dhcp section.

Dhcp release message is only sent because of user action  for e.g  you want  to relase  ip address binding  , you  release the  dhcp message .

I erroneously  said in my earlier post  when host shutdowns, it sends the dhcp release message.  dhcp release message is sent as a result of user action.

When dhcp release message is sent,  host  loses the  current ip binding and dhcp server  also removes the binding and returns the address to the pool to be assigned.    When host powers up, it  will send  dhcp discover message  not  dhcp request  as there is no ip address binding currently on the host.

thanks and have a great  day.

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:

Review Cisco Networking products for a $25 gift card