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

    Automatically remove reserved MAC addresses from DHCP Static Mappings

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 326 Views
    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.
    • P
      panjali.ganiyev
      last edited by

      How to automatically remove reserved MAC addresses from DHCP Static Mappings, for example, not active for 2 months?

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @panjali.ganiyev
        last edited by

        @panjali-ganiyev there is no automatic way to do that that I am aware of, you could prob always script something up.. if you have old static leases setup that you no longer need, you can always just click the trashcan icon next to the static entry.

        I personally would not automate such a thing - I have many a device that might not be on a specific network for a couple of months.. But if they "are" on that network I want them to have that specific IP, etc.

        My phones/tablets are perfect examples of that.. They are normally on my trusted network - but now and then I need to connect them to my iot network to setup a new iot device, etc. is it a requirement they get a specific IP on this network no not really. Just saying 2 months seems like a pretty short amount of time to start clearing static leases that just haven't been used - unless your for sure that device will no longer be used on that network - ever ;)

        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.8, 24.11

        P 1 Reply Last reply Reply Quote 0
        • P
          panjali.ganiyev @johnpoz
          last edited by

          @johnpoz The list of static IP addresses is very large. It would suit me to delete users not connecting for 2 months. If there is no option to delete automatically, maybe there is a way to sort them by long-term lack of connection? So that I manually them out. Thanks for the answer.

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @panjali.ganiyev
            last edited by

            @panjali-ganiyev hmmm, other than looking back through logs of dhcp I am not aware of a way to know that. static leases don't show up in the dhcpd.leases file

            If you handed off your logs to some syslog server it should be quite easy to look up some mac or IP for when the was the last time it got a lease.

            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.8, 24.11

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