• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 318 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 May 12, 2023, 4:22 PM

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

    J 1 Reply Last reply May 12, 2023, 4:48 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @panjali.ganiyev
      last edited by May 12, 2023, 4:48 PM

      @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.7.2, 24.11

      P 1 Reply Last reply May 12, 2023, 5:15 PM Reply Quote 0
      • P
        panjali.ganiyev @johnpoz
        last edited by May 12, 2023, 5:15 PM

        @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.

        J 1 Reply Last reply May 12, 2023, 5:24 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @panjali.ganiyev
          last edited by May 12, 2023, 5:24 PM

          @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.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received