How could another network interface get an already assigned static IP address?

Started by Sopor, December 11, 2024, 07:26:44 PM

Previous topic - Next topic
Computers I run as a server I always set a static IP address (DHCP Static Mappings for this interface).

This computer has always been using 192.168.2.110.

Yesterday i replaced the motherboard with a complete different brand and model, but when i looked in the "Services: ISC DHCPv4: Leases" i could see the old motherboard as a lease type static at 192.168.2.110 and the new motherboard as lease type dynamic at 192.168.2.110.
The static was offline (red) and the dynamic was online (green).

They both have different MAC addresses and i could connect to the new motherboard on 192.168.2.110.

I then edit the "DHCP Static Mappings for this interface" and changed the MAC address and the dynamic lease type changed to static and the dynamic was gone.

How is it possible that a computer with a complete different MAC address can get an IP address that is set to static?

Did you configure overlapping dynamic pool and static reservations? Don't.

Static leases must lie outside the dynamic pool.

Why did it get this particular address exactly? Well, clients cache their leases and ask for their current address first when booting.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

That makes no sense.

The whole idea is to use dynamic IP address, but still be able to get the same IP address after every reboot.

If i use outside of the dynamic pool i have no use of "DHCP Static Mappings".

Example:

Subnet: 192.168.1.0/24
OPNsense: 192.168.1.1
Dynamic pool: 192.168.1.100-192.168.1.254
Static reservations: 192.168.1.2-192.168.1.99

That's how ISC DHCPd works, always has worked, and will work for the rest of its lifetime in OPNsense.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Sopor on December 11, 2024, 07:26:44 PMHow is it possible that a computer with a complete different MAC address can get an IP address that is set to static?
Because you made it available to do so.

Static mapping hands a given address to a client but it does not affect the process of dynamic allocation for any other client from the same pool. Your first client was not present at the time so the "static" address was back in the pool. Thus, you need to distinguish the pools as described, with the dynamic allocation process having no access to your static pool at all.
Deciso DEC697
+crowdsec +wireguard