Another DHCP
Mikdilly
Member Posts: 309
In a review question in dhcp chapter in mspress book, question says you have configured a subnet with 2 dhcp servers, dhcp1 and dhcp2. Dhcp1 assigns addresses to to first 80% of subnet's scope range. Dhcp2 does the remaining 20%. ClientA obtains an address from dhcp1 and dhcp1 is then taken off the network. How long will it take before clientA attempts to obtain a new address from dhcp2?
A) 4 days
5 days
C) 7 days
D) 8 days
Book says it C) - 7 days.
Earlier in the chapter it says 'if client unable to communicate with original dhcp server, client waits for rebinding state(7 days after last lease renewal) in that state it tries to renew current lease with any available dhcp server.'
Since the scope of dhcp2 is different that dhcp1 it would get a NACK from dhcp2 and then what? Would it continue to try and send a renew message out to dhcp1 until the lease expires at 8 days and then start a new lease initialization process, getting a new address from dhcp2? If that's the case then wouldn't the answer be d - 8 days?
A) 4 days
5 days
C) 7 days
D) 8 days
Book says it C) - 7 days.
Earlier in the chapter it says 'if client unable to communicate with original dhcp server, client waits for rebinding state(7 days after last lease renewal) in that state it tries to renew current lease with any available dhcp server.'
Since the scope of dhcp2 is different that dhcp1 it would get a NACK from dhcp2 and then what? Would it continue to try and send a renew message out to dhcp1 until the lease expires at 8 days and then start a new lease initialization process, getting a new address from dhcp2? If that's the case then wouldn't the answer be d - 8 days?
Comments
-
royal Member Posts: 3,352 ■■■■□□□□□□So the client will try every so often to renew its lease with the DCHP server it obtained the IP from. Default DHCP renewal is 7 days. After the lease renewal is up, if it can't contact the DHCP server it'll do a DHCP Discover. If DHCP2 is on the same subnet, it'll give it an IP address from the scope of the subnet it lives on. If DHCP2 is on another subnet, the router will be configured as a DHCP Relay in which the DHCP Server will obtain IP Address Information for the subnet friom the router and check if it has a scope for that subnet and then give the client the IP from that subnet.
Does that help?“For success, attitude is equally as important as ability.” - Harry F. Banks -
Big Jizay Member Posts: 269I thought the default dhcp renewal was also 8 days. I thought I saw that in the MS Press book. I could be wrong though.The only thing that can stop you is you
Currently studying for 70-293 -
dynamik Banned Posts: 12,312 ■■■■■■■■■□Renewing a Lease
The DHCP client first attempts to renew its lease when 50 percent of the original lease time, known as T1, has passed. At this point the DHCP client sends a unicast DHCPRequest message to the DHCP server that originally granted its lease. If the server is available, and the lease is still available, the server responds with a unicast DHCPAck message and the lease is renewed.
If the original DHCP server is available, but the client’s current lease is no longer available, the DHCP server responds with a DHCPNack message, and the client immediately starts the process to obtain a new lease. This can happen if the client has changed subnets or if the DHCP server cannot fulfill the lease request for some other reason.
If there is no response from the DHCP server, the client waits until 87.5 percent of the lease time has passed (known as T2). At T2, the client enters the rebinding state, and broadcasts a DHCPRequest message to attempt to renew the lease from any available DHCP server. If no DHCP server is available by the time the lease expires, the client immediately unbinds itself from the existing lease and starts the process to obtain a new lease, beginning with a DHCPDiscover message.
How DHCP Technology Works: Dynamic Host Configuration Protocol (DHCP) -
Mikdilly Member Posts: 309So the correct answer is 7 days? I read in the book that once it gets a NACK it chucks the old address and starts the new lease initialization process by doing a DHCP discover message. All of this would happen on day 7. ClientA would then pick up a new address from dhcp2. And then he rested.
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□Royal, why'd you edit your post? It was correct. The lease is 8 days, but it'll broadcast like you said at 7 (if using defaults since that's 87.5% of the lease). I quoted Technet to support you
Mikdilly, it won't get a NACK from DHCP2 since it will try to renew directly with DHCP1 until the 7th day. -
royal Member Posts: 3,352 ■■■■□□□□□□Edit what?
I was just trying to be a smartass“For success, attitude is equally as important as ability.” - Harry F. Banks -
Big Jizay Member Posts: 269Thanks Dynamic and Royal for clearing up this mix up with DHCP.The only thing that can stop you is you
Currently studying for 70-293 -
Mikdilly Member Posts: 309Why wouldn't it get a NACK from dhcp2, on the 7th day it's in a rebinding state and will attempt to renew its current lease with any available server, dhcp2 is configured with scope that does not contain clientA's ip address, since clientA is trying to renew it's existing address, dhcp2 would send back a NACK telling clientA it doesn't know of the address and as a result clientA would start it's discovery process to renew it's existing ip address from any dhcp server available. It should then keep getting NACKs from dhcp2 until the lease expires and then gets a new address from dhcp2 on day 8. So now I'm back to thinking the correct answer is D.
-
royal Member Posts: 3,352 ■■■■□□□□□□If the client's lease is not expired and the client contacts the DHCP Server and it doesn't respond, the client doesn't send out a new DHCPDiscover. This request it sends is only a DHCPRequest. If the DHCP Server responds, the lease is renewed. If the Server never responds on any of the lease attempts, then when the lease expires, the client will unbind itself from the lease and send out a new DHCPDiscover.
It's at this point that it'll be possible for the client to hit DHCP2 and obtain a lease from that DHCP2 depending on a few circumstances.
1. The DHCP Server is on the same subnet as the client and has a scope for this client
2. The DHCP Server is on another subnet and some type of DHCP Relay is forwarding the BOOTP request to the DHCP Server which tells the DHCP Server which subnet it's being requested from. The DHCP Server then gives an IP Address back and fulfills the lease.
3. If the DHCP is on the same physical segment but a different subnet, then you'll need to either add a 2nd NIC so the DHCP Server can listen with an IP Address that belongs on that subnet. Or you would have to add a superscope so the DHCP Server does not send a NACK back.
Does that help?“For success, attitude is equally as important as ability.” - Harry F. Banks -
Mikdilly Member Posts: 309Based on the scenario they put up in the question the client will go into a rebinding state on day 7, based on what i read in the book, once it's in that state it will attempt to renew it's current address with any dhcp server on it's subnet. DHCP2 will send a NACK since it doesn't service the clients current ip address, once the client gets the NACK the lease renewal fails and the client begins a new lease initialization which makes their answer correct.