DHCP Leases

Sdílet
Vložit
  • čas přidán 28. 12. 2019
  • In this video from ITFreeTraining, I will look at what is a DHCP lease. When a DHCP server allocates an IP Address to a device, the lease determines how long that device can use that IP Address. This video looks at what is a lease and the important time periods associated with that lease.
    What is a DHCP Lease?
    0:22 To start with, what is a DHCP lease? A DHCP lease is similar to a lease that you may take out on a house. That is the lease is for a certain time. The lease can also be extended before it ends. The lease may be ended early or renewed.
    Just like when you take out a lease on a house, you don’t own the house, but you get the right to use the house while the lease is in place. If the lease expires, you need to find a new place to live. Let’s have a closer look at how a DHCP lease works.
    DHCP Lease
    0:56 Consider that you have a device on the network that needs an IP Address to communicate. In this case a desktop computer. The device will communicate on the network and locate a DHCP server. The DHCP server will allocate the device an IP Address and a lease time. Essentially the device is free to use that IP Address for the lease time.
    The lease time is configured on the DHCP server. On Windows, the default lease time is eight days. On Linux the default lease time differs depending on the distribution.
    The device can also request a certain lease time, but ultimately it is up to the server to decide what lease time it wants to allocate to the device. Windows will always allocate the lease time that is configured on the server. On Linux, the administrator can configure a default value that will be used if the device does not request a certain time. If the device does request a certain lease time, Linux supports a maximum value that it will allocate up to.
    It is also possible to configure the lease time to unlimited; however, this is not recommended. As we will see in later videos, renewing a lease also allows network configuration to be changed. Setting the lease time to unlimited makes it harder for the administrator to make changes to network configuration at a later date.
    DHCP Lease Renewal
    2:18 Let’s consider what happens when the client has been given a lease. The lease in this example is set for eight days which is the default for Windows. For the first half of the lease, which is four days in this example, the client will not attempt to renew the lease. This is referred to as Timer 1 or T1. The administrator is free during this time period to perform a manual renewal if they wish. However, the device will not attempt to renew the lease during this period.
    The next timer is Timer 2 or T2. This is 87.5% of the lease time or seven eighths. In this example, this will be the time period of five to seven days. During this time, the device will attempt to renew its lease. It does this by attempting to contact the original DHCP server that it obtained the lease from.
    Once the lease time becomes greater than T2, the device goes into what is referred to as rebinding. Rebinding means that the device will attempt to obtain an IP Address from any DHCP server. If the device is able to contact the original DHCP server, it will be able to renew its IP Address. If it contacts a different DHCP server it will obtain a different IP Address.
    DHCP Lease Renewal Example
    3:37 Now let’s consider an example. On this network, there are two DHCP servers and one desktop computer. The desktop computer requires an IP Address so it requests one from a DHCP server. In later videos I will go into this process in more detail.
    The desktop computer now has a lease which allows it to use an IP Address on the network. In this example, I will once again use an eight-day lease, so for the first four days it uses the lease without trying to renew it.
    On the fifth day, it will attempt to renew it. The desktop will keep doing this up to the seventh day. If the desktop is able to contact the DHCP Server within these three days, the lease will be renewed. When this occurs, the lease time goes back to zero.
    The process now repeats. For the first half of the lease time, the desktop does not attempt to renew its lease. For this example, let’s consider that the first DHCP server has failed. The desktop will not be able to renew its lease. However, it will attempt to keep contacting the DHCP server and will not attempt to contact any other DHCP servers.
    Description to long for CZcams. Please see the following link for the rest of the description. itfreetraining.com/dhcp/leases
    References
    “Dynamic Host Configuration Protocol” www.ietf.org/rfc/rfc2131.txt

Komentáře • 22

  • @nicole.9889
    @nicole.9889 Před měsícem +1

    this was very helpful, thank you! studying for network+

  • @deeps474
    @deeps474 Před 5 měsíci +1

    great video with nice delivery! thank you.

  • @markmoorhead1
    @markmoorhead1 Před 4 lety +1

    great video please keep them coming, also do you plan on have videos on windows 10 and server on windows 8,8.1,10

  • @WhizeCracker
    @WhizeCracker Před 4 lety +4

    Thank you for your incredible and well-spoken guidance. SUBSCRIBED

  • @themistoclesnelson2163
    @themistoclesnelson2163 Před 2 lety +1

    Thank you! This was helpful!

  • @vladislavkaras491
    @vladislavkaras491 Před 4 měsíci

    Really great video!
    I wonder though, when the T2 timer starts, DHCP server sends Request. if it gets a new IP from a new DHCP server, does the communication look like Request and Ack or after the request (or ack) do we start from the beginning, from Discover?
    Thank you!

  • @05kali
    @05kali Před 3 lety

    dhcp server scope full yellow symbol but no lease ..

  • @L4C05
    @L4C05 Před 3 lety +1

    What if I will assign some open ports to a device with lease time 10 minutes? Device will request to renew the ip address but what if it wil get different one? Assigned ports will not work anymore or will it continue on new IP address?

    • @itfreetraining
      @itfreetraining  Před 3 lety +1

      Generally the DHCP server will try and give the same IP Address back to the same client when it requests. However, if for some reason this does not work the client will no longer be able to use the IP Address. In theory it could keep using the IP Address, however the DHCP server may allocate the IP Address to another computer on the network than one or both of them would get disabled.

    • @L4C05
      @L4C05 Před 3 lety

      @@itfreetraining Thank you

  • @crimsoncloak1565
    @crimsoncloak1565 Před 8 měsíci

    Can I force my Ip to change by unplugging/turning off my router in the rebinding time. According to my windows config it will expire in 2 days which will reach its 12 day lease.

    • @itfreetraining
      @itfreetraining  Před 7 měsíci

      It depends if the router keeps it in memory or stores in storage. The router may also let you keep the same IP address when the renew request come in. Windows will automatic try and renew it before the lease expires.

  • @geyike5006
    @geyike5006 Před 3 lety +1

    So if I make my lease time like 2 minutes, will the ip change every 2 minutes

    • @itfreetraining
      @itfreetraining  Před 3 lety +4

      The computer will request the IP Address to be renewed after about 1 minute since the process starts before the lease expires. If the renew request is granted the same IP Address will be used. If the request is rejected, the computer will need to change it's IP Address.

    • @deeps474
      @deeps474 Před 5 měsíci

      bruh did not understand the concept lol.

  • @enochliu8316
    @enochliu8316 Před 4 lety +1

    No Close Captions.

    • @itfreetraining
      @itfreetraining  Před 4 lety

      Sorry about that. I have uploaded the captions. Thanks for letting us know.

  • @Mark-hc8vu
    @Mark-hc8vu Před 4 lety +1

    Awesome