can't find where to delete a device entry associated with an interface

Started by RobLatour, August 24, 2026, 06:16:18 PM

Previous topic - Next topic
I'm having trouble assigning a new device to an old ip address (I don't think it is the dnsmasq lease expiry issue - rather something else).

What I'm trying to do is to get a new device to come in and be assigned the address 192.168.7.24 which had previousily been assigned.
I waited until it had expired in the lease table, and then plugged in the new device - however it would not get the address I had wanted to spite me having already it defined in the dnsmasq host table (by its MAC) to be assigned to 192.168.7.24

I can get it assinged to 192.168.7.25 - but with that I get odd behaviours.

For example, the device is plugged directly into the OPNSense box's opt2 interface.  There is only one device plugged into that interface - but regardless with that one device plugged in I can ping both 192.168.7.24 and 192.168.7.25. 

As I'm using this device in conjunction with OPNSense's Time Service; I've tried stopping that server and turning it on at various points in my experementation to get this to work - just incase the time service has a hold on the IP address some how??

Also, oddly, while 192.168.7.24 no longer shows up in the lease table or the host table, I backed up my configuration and looked inside the back up file to find this (I just have no idea where to delete it from):

```
    <opt2>
      <gateway>192.168.7.1</gateway>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.7.24</from>
        <to>192.168.7.24</to>
      </range>
      <winsserver/>
      <dnsserver>192.168.7.1</dnsserver>
      <ntpserver/>
      <staticmap>
        <mac>24:0a:c4:26:9e:43</mac>
        <ipaddr>192.168.7.24</ipaddr>
        <hostname>MasterClock</hostname>
        <descr>MasterClock</descr>
        <arp_table_static_entry>1</arp_table_static_entry>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
    </opt2>
```
edit: I thought maybe if I could delete / clear the above I could get it to work - but can't seem to find how to do that.

edit: I should note I am running OPNsense 26.7.2_2-amd64 ; FreeBSD 15.1-RELEASE-p2 ; OpenSSL 3.5.7

Remove the dynamic range.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Thanks for this Patrick,

However, for clarification, by this I assume you mean to check the option on the interface entitled:
"This interface does not require an intermediate system to act as a gateway"

Which I did, followed by a save and apply, followed by another backup of my settings.
However, when I looked in them the same entry as shown in my original post was there.
```
    <opt2>
      <gateway>192.168.7.1</gateway>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.7.24</from>
        <to>192.168.7.24</to>
      </range>
      <winsserver/>
      <dnsserver>192.168.7.1</dnsserver>
      <ntpserver/>
      <staticmap>
        <mac>24:0a:c4:26:9e:43</mac>
        <ipaddr>192.168.7.24</ipaddr>
        <hostname>MasterClock</hostname>
        <descr>MasterClock</descr>
        <arp_table_static_entry>1</arp_table_static_entry>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
    </opt2>
```

Will these now be ignored? 

I'm asking as I would otherwise just test it, but I have to wait for mid morning tomorrow for the existing lease to expire.

Thanks again for your help.




No, you have a DHCP range from .24 to .24. In that case you probably cannot use the same address as a static assignment. My guess - I'm running Kea, not DNSmasq.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

The config snippet looks like it pertains to ISC DHCP, not dnsmasq. Which DHCP server are you actually using? It look like it has static ARP too, so that may be getting in your way. I think there may be some magic code that looks at those static mappings even if ISC DHCP is not enabled (not sure if I'm remembering this right).