duplicate ip address assigned

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

duplicate ip address assigned

Alan Batie
We had a case yesterday where a statically assigned address was suddenly
given to another customer; in reviewing logs, it looks like there were
hints that something had gotten confused in the dhcp server; I shut off
the connection to the rogue customer to allow the static customer to get
the address, expecting that to solve the problem, but when I turned the
rogue customer back on, they stole the address again - the address was
being assigned to *both*.  I had to force the dynamic customer to a
static address to allow the real static customer to function properly.

66:66:66:66:66:66 - mac address of rogue dynamic customer
00:11:22:33:44:55 - mac address of static customer
1.1.1.100 - dynamic ip address rogue dynamic customer initially had
1.1.1.105 - dynamic ip address rogue dynamic customer got later
1.1.1.200 - static ip address assigned to static customer
1.1.1.254 - ip address of dhcp server on the customer vlan on interface
ens193
1.1.1.1   - customer vlan interface address of the router
99.99.99.99 - wan ip address of dhcp server on interface ens192
            * we're moving from bridging customer vlans to the dhcp server to
using dhcp relay
              I turned off the vlan bridging briefly, but turned it back on
until I have more time
              to make sure the dhcp relay is working right (tests worked, but
in an abundance of
              caution, I want to monitor transactions for a while...)
            * ens192 doesn't show up, so the wan address of the dhcp server
must have been obtained
              from the period when relaying was the only option

This is the furthest back we have logs; the vlan bridging was turned
off/on on the 7th, which is
when I think things got initially confused, but it was still correctly
assigning the static address:

> Apr  9 04:06:08 dhcp01 dhcpd: Dynamic and static leases present for
1.1.1.200.
> Apr  9 04:06:08 dhcp01 dhcpd: Remove host declaration StaticCustomer
or remove 1.1.1.200
> Apr  9 04:06:08 dhcp01 dhcpd: from the dynamic address pool for 1.1.1.0/24
> Apr  9 04:06:08 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
00:11:22:33:44:55 via ens193
> Apr  9 04:06:08 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193

and Wednesday, Dynamic Customer was still properly getting a dynamic
address:

> Apr 21 18:37:31 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPOFFER on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via 1.1.1.1
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPOFFER on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.100 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPACK on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.100 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPACK on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

I get that it's getting one request directly, and another from the
relay; I don't think that should matter...

Shortly after this, the address changed for no apparent reason; it's
also unclear why it repeatedly retried the request; it does look like it
shifted from an address assigned via relay to an address assigned
directly, but only briefly:

> Apr 21 18:42:34 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 21 18:42:34 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66 via
1.1.1.1
> Apr 21 18:42:35 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:37 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:43 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:43 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:43 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:43 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:47 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:47 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:47 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:47 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:52 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:52 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:52 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:52 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

But at 10pm, the static address was still properly being assigned:

> Apr 21 22:06:11 dhcp01 dhcpd: Dynamic and static leases present for
1.1.1.200.
> Apr 21 22:06:11 dhcp01 dhcpd: Remove host declaration StaticCustomer
or remove 1.1.1.200
> Apr 21 22:06:11 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
00:11:22:33:44:55 via ens193
> Apr 21 22:06:11 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193

and shortly after midnight, the dynamic address is still being assigned:

> Apr 22 00:11:37 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 00:11:38 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 22 00:11:41 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:41 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

> Apr 22 00:11:57 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

But then a few minutes later, DynamicCustomer steals the static address:

> Apr 22 00:17:01 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 00:17:01 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66 via
ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

And at 8:30, it's being given to *both* clients:

> Apr 22 08:33:14 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:33:14 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

> Apr 22 08:36:10 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
00:11:22:33:44:55 via ens193
> Apr 22 08:36:10 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193

> Apr 22 08:39:06 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 08:39:07 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:39:07 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:39:07 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:56:01 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:56:01 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

> Apr 22 08:56:08 dhcp01 dhcpd: DHCPDISCOVER from 00:11:22:33:44:55 via
ens193
> Apr 22 08:56:08 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
00:11:22:33:44:55 via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 00:11:22:33:44:55 via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPDISCOVER from 00:11:22:33:44:55 via
1.1.1.1
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
00:11:22:33:44:55 via 1.1.1.1

> Apr 22 08:56:09 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: duplicate ip address assigned

Simon Hobson
Alan Batie <[hidden email]> wrote:

>> Apr  9 04:06:08 dhcp01 dhcpd: Dynamic and static leases present for
> 1.1.1.200.
>> Apr  9 04:06:08 dhcp01 dhcpd: Remove host declaration StaticCustomer
> or remove 1.1.1.200
>> Apr  9 04:06:08 dhcp01 dhcpd: from the dynamic address pool for 1.1.1.0/24

Is 1.1.1.200 part of the dynamic pool in the config ? I think it is because that's exactly what the warning in the log is telling you.
What I think has happened is that you've configured the server to allocate 1.1.1.200 to one device via a host statement with fixed-address, AND also allowed it to be dynamically allocated to another device via the dynamic allocation mechanism. The ISC server does **NOT** automatically fix this configuration error for you - but the above warning was added some years ago to alert people to the issue given that many were being caught out by it.

Simon

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

RE: duplicate ip address assigned

Matthew.Stier@fujitsu.com
In reply to this post by Alan Batie
https://www.flexradio.com/insider/ip-addresses-static-vs-dhcp-vs-dhcp-reservations/

Static and DHCP address can share the same network, but Static addresses need to excluded from the pool of addresses the DHCP issues.

DHCP Reservations are simply DHCP issued address, which has been pre-arranged to be issued the same IP address each time.  (usually by MAC address) Don't fit the criteria, you don't get the address.

-----Original Message-----
From: dhcp-users <[hidden email]> On Behalf Of Alan Batie
Sent: Friday, April 23, 2021 12:42 PM
To: [hidden email]
Subject: duplicate ip address assigned

We had a case yesterday where a statically assigned address was suddenly given to another customer; in reviewing logs, it looks like there were hints that something had gotten confused in the dhcp server; I shut off the connection to the rogue customer to allow the static customer to get the address, expecting that to solve the problem, but when I turned the rogue customer back on, they stole the address again - the address was being assigned to *both*.  I had to force the dynamic customer to a static address to allow the real static customer to function properly.

66:66:66:66:66:66 - mac address of rogue dynamic customer
00:11:22:33:44:55 - mac address of static customer
1.1.1.100 - dynamic ip address rogue dynamic customer initially had
1.1.1.105 - dynamic ip address rogue dynamic customer got later
1.1.1.200 - static ip address assigned to static customer
1.1.1.254 - ip address of dhcp server on the customer vlan on interface
ens193
1.1.1.1   - customer vlan interface address of the router
99.99.99.99 - wan ip address of dhcp server on interface ens192
            * we're moving from bridging customer vlans to the dhcp server to using dhcp relay
              I turned off the vlan bridging briefly, but turned it back on until I have more time
              to make sure the dhcp relay is working right (tests worked, but in an abundance of
              caution, I want to monitor transactions for a while...)
            * ens192 doesn't show up, so the wan address of the dhcp server must have been obtained
              from the period when relaying was the only option

This is the furthest back we have logs; the vlan bridging was turned off/on on the 7th, which is when I think things got initially confused, but it was still correctly assigning the static address:

> Apr  9 04:06:08 dhcp01 dhcpd: Dynamic and static leases present for
1.1.1.200.
> Apr  9 04:06:08 dhcp01 dhcpd: Remove host declaration StaticCustomer
or remove 1.1.1.200
> Apr  9 04:06:08 dhcp01 dhcpd: from the dynamic address pool for
> 1.1.1.0/24 Apr  9 04:06:08 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200
> from
00:11:22:33:44:55 via ens193
> Apr  9 04:06:08 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193

and Wednesday, Dynamic Customer was still properly getting a dynamic
address:

> Apr 21 18:37:31 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPOFFER on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via 1.1.1.1
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPOFFER on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.100 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPACK on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.100 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:37:31 dhcp01 dhcpd: DHCPACK on 1.1.1.100 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

I get that it's getting one request directly, and another from the relay; I don't think that should matter...

Shortly after this, the address changed for no apparent reason; it's also unclear why it repeatedly retried the request; it does look like it shifted from an address assigned via relay to an address assigned directly, but only briefly:

> Apr 21 18:42:34 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 21 18:42:34 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66 via
1.1.1.1
> Apr 21 18:42:35 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:37 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:37 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:43 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:43 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:43 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:43 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:47 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:47 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:47 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:47 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 21 18:42:52 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:52 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 21 18:42:52 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 21 18:42:52 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

But at 10pm, the static address was still properly being assigned:

> Apr 21 22:06:11 dhcp01 dhcpd: Dynamic and static leases present for
1.1.1.200.
> Apr 21 22:06:11 dhcp01 dhcpd: Remove host declaration StaticCustomer
or remove 1.1.1.200
> Apr 21 22:06:11 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
00:11:22:33:44:55 via ens193
> Apr 21 22:06:11 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193

and shortly after midnight, the dynamic address is still being assigned:

> Apr 22 00:11:37 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 00:11:38 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:39 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

> Apr 22 00:11:41 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:41 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

> Apr 22 00:11:57 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPOFFER on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.105 (99.99.99.99)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:11:57 dhcp01 dhcpd: DHCPACK on 1.1.1.105 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

But then a few minutes later, DynamicCustomer steals the static address:

> Apr 22 00:17:01 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 00:17:01 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66 via
ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1
> Apr 22 00:17:02 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via 1.1.1.1

And at 8:30, it's being given to *both* clients:

> Apr 22 08:33:14 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:33:14 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

> Apr 22 08:36:10 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
00:11:22:33:44:55 via ens193
> Apr 22 08:36:10 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193

> Apr 22 08:39:06 dhcp01 dhcpd: DHCPDISCOVER from 66:66:66:66:66:66
(DynamicCustomer) via ens193
> Apr 22 08:39:07 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:39:07 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:39:07 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:56:01 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:56:01 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

> Apr 22 08:56:08 dhcp01 dhcpd: DHCPDISCOVER from 00:11:22:33:44:55 via
ens193
> Apr 22 08:56:08 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
00:11:22:33:44:55 via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 (1.1.1.254)
from 00:11:22:33:44:55 via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
00:11:22:33:44:55 via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPDISCOVER from 00:11:22:33:44:55 via
1.1.1.1
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPOFFER on 1.1.1.200 to
00:11:22:33:44:55 via 1.1.1.1

> Apr 22 08:56:09 dhcp01 dhcpd: DHCPREQUEST for 1.1.1.200 from
66:66:66:66:66:66 (DynamicCustomer) via ens193
> Apr 22 08:56:09 dhcp01 dhcpd: DHCPACK on 1.1.1.200 to
66:66:66:66:66:66 (DynamicCustomer) via ens193

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: duplicate ip address assigned

Alan Batie
In reply to this post by Simon Hobson
On 4/23/21 12:57 PM, Simon Hobson wrote:
> Alan Batie <[hidden email]> wrote:

> Is 1.1.1.200 part of the dynamic pool in the config ? I think it is because that's exactly what the warning in the log is telling you.
> What I think has happened is that you've configured the server to allocate 1.1.1.200 to one device via a host statement with fixed-address, AND also allowed it to be dynamically allocated to another device via the dynamic allocation mechanism. The ISC server does **NOT** automatically fix this configuration error for you - but the above warning was added some years ago to alert people to the issue given that many were being caught out by it.

I tried making the pool smaller in case that was an issue and it
complained about the static reservation not being in a subnet...

relevant excerpt from config:

subnet 1.1.1.0 netmask 255.255.255.0 {
   option routers 1.1.1.1;

   pool {
     range 1.1.1.2 1.1.1.250;
   }
}

host StaticCustomer {
     hardware ethernet 00:11:22:33:44:55;
     fixed-address 1.1.1.200;
}

host DyanmicCustomer {
     # keeps stealing address
     hardware ethernet 66:66:66:66:66:66;
     fixed-address 1.1.1.201;
}

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: duplicate ip address assigned

Simon Hobson
Alan Batie <[hidden email]> wrote:

> On 4/23/21 12:57 PM, Simon Hobson wrote:
>> Alan Batie <[hidden email]> wrote:
>
>> Is 1.1.1.200 part of the dynamic pool in the config ? I think it is because that's exactly what the warning in the log is telling you.
>> What I think has happened is that you've configured the server to allocate 1.1.1.200 to one device via a host statement with fixed-address, AND also allowed it to be dynamically allocated to another device via the dynamic allocation mechanism. The ISC server does **NOT** automatically fix this configuration error for you - but the above warning was added some years ago to alert people to the issue given that many were being caught out by it.
>
> I tried making the pool smaller in case that was an issue and it complained about the static reservation not being in a subnet...
>
> relevant excerpt from config:
>
> subnet 1.1.1.0 netmask 255.255.255.0 {
>  option routers 1.1.1.1;
>
>  pool {
>    range 1.1.1.2 1.1.1.250;
>  }
> }
>
> host StaticCustomer {
>    hardware ethernet 00:11:22:33:44:55;
>    fixed-address 1.1.1.200;
> }
>
> host DyanmicCustomer {
>    # keeps stealing address
>    hardware ethernet 66:66:66:66:66:66;
>    fixed-address 1.1.1.201;
> }

Post the log entry and config that caused it.


The snippet above illustrates your problem. Both 1.1.1.200 and 1.1.1.201 are within the dynamic pool and so **CAN** be given to any other client at any time. So sooner or later you'll see the same problem surface again next time client churn brings those addresses into use. The way to fix it is like this :

subnet 1.1.1.0 netmask 255.255.255.0 {
 option routers 1.1.1.1;

 pool {
   range 1.1.1.2 1.1.1.199;
   range 1.1.1.122 1.1.1.250;
 }
}

That will make it so that 200 and 201 cannot be given to a dynamic client, so the problem will disappear.

As I mentioned, it's an issue that appeared so often on this list that the code was updated to detect and warn about it. In part I think that was due to it being different to the "MS way of doing things" that many people had previously been used to.


An alternative way to manage this is with reserved allocations. If you add "reserved;" to a lease for 1.1.1.200 (and remove the host statement) then it will be reserved for that device - but is otherwise like any other dynamic lease (you do NOT exclude it from the dynamic range). But because hosts with fixed-addresses don't get lease entries, you may have to create a skeleton lease first.
I believe you can do this via OMSHELL, but I;ve not used that myself. I;ve only done it by stopping the server and editing the leases file manually.


Two ways of doing things, both have pros and cons.
Host statements with fixed-address are clear to see in the config file but don't follow the normal lease lifecycle - especially a problem with dynamic DNS.
Reserved leases follow the normal lease lifecycle, including dynamic DNS updates, but the config is hidden in the leases file. Having something that will parse the leases file would quickly show you them.


Simon

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users