• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Static IP Address with Unlimited Lease Time

DHCP and DNS
3
5
14.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    archedraft
    last edited by Oct 15, 2013, 6:58 PM Oct 15, 2013, 6:48 PM

    Is it possible to make it so that my static ip address have an unlimited lease time or would it be better to set it up for a specific time like 72 hours?

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Oct 15, 2013, 8:55 PM

      If your lease is infinite - when do you expect your client to come and check if any info has changed?  Like dns or gateway, etc.

      I can see no point to setting an unlimited lease..  How many clients do you have?  1000's?  Or a handful - if only a couple what does it matter if they renew the lease every few hours?  I wouldn't set it to minutes or anything..

      Its a couple of packets.. Unless your talking thousands of dhcp clients – the traffic is miniscule, have them check every hour 1 new info and renew.. Only thing I could think of why you might want to make it of some length -- is if your dhcp went down and the lease time expired than the client would give up the IP and have no connectivity.

      If your going to make it infinite - might as well just change it to static on the client.

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • S
        stan-qaz
        last edited by Oct 16, 2013, 6:07 PM

        Using the DHCP server the default, 7200 seconds or two hours is a very reasonable choice unless you have a huge number of clients. The default maximum limit 86400 seconds or 24 hours is pretty high so you could have the specific clients you are concerned about ask for that number.

        From: pfsense/services_dhcp.php

        Default lease time
        This is used for clients that do not ask for a specific expiration time.
        The default is 7200 seconds.

        Maximum lease time
        This is the maximum lease time for clients that ask for a specific expiration time.
        The default is 86400 seconds.

        I have most of my client computers/devices using the default 7200 and statically mapped, the network traffic and server load is unnoticeable. Having the lease that long does make it a minor pain to move something and wait for it to remap but I don't do that often enough for it to be a problem, if it was I'd not hesitate to set the expire time to 30 minutes.

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Oct 16, 2013, 6:15 PM

          ^ agreed, only reason I would shy away from a lease as low as 30 minutes is if dhcp server is offline for any reason you only have at most a 30 minute window before your network offline because all the leases expired and clients dropped the IP.

          With say a 24 hour lease say, in theory you could run all day even if your dhcp server went offline.  And if you change something - within 12 hours of the change, next day everyone should have the new info.

          Its a dance figuring out what best suits your network best..  But infinite doesn't seem like a viable option no matter how you look at it.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • A
            archedraft
            last edited by Oct 18, 2013, 5:33 PM

            Thanks for the information. It is for a home network. The reason I even brought this up was I have a home server and I check the logs to make sure everything is going well and since I have started using pfsense I now see every time the lease gets renewed and it just adds more to the log than I really care to see. If the server is on 24/7 does a 7200 minute lease still make sense? What is the benefit/disadvantage to changing the lease time?

            1 Reply Last reply Reply Quote 0
            4 out of 5
            • First post
              4/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.