New IP address after each reboot

Jean-Philippe Martin jpmartin at studiohari.com
Tue Apr 26 07:33:56 UTC 2022


Hi Glenn
i don't use random mac addresses.
We used ISC DHCP in the past and this work well with lease and reservation
on hwaddr.
Kea permit a simplest management (with REST) and a simple way for high
availability. We have make module in saltstack (i will push it in github
when i have finish the kea formula)




Le mar. 26 avr. 2022 à 01:52, Glenn Satchell <glenn.satchell at uniq.com.au> a
écrit :

> Hi Jean-Philippe
>
> Are your clients using random mac addresses? if so then each time they
> reboot they get a different mac address, and to the server it looks like
> a new client. My guess is the client-id stays the same? Can you use the
> client ID in the reservation setup rather than hwaddr?
>
> regards,
>
> Glenn
>
> On 2022-04-26 08:21, Jean-Philippe Martin wrote:
>
> > Hi
> >
> > We use kea 2.01 (lease and reservation in mysql)
> >
> > I have exactly this problem :
> >
> > if i use a subnet with "match-client-id": false
> >
> > my reservation (identifier is hwaddr) work but other lease is a newer
> > ip at each reboot
> >
> > If i use a subnet with "match-client-id": true
> >
> > lease d'ont be reset at boot but reservation don't work any more
> >
> > best regards
> >
> > _________________________________________
> > Hi Anton,
> >
> > Have you considered dropping the DHCPRELEASE packets instead?
> >
> > You can read how this could be done in Gitlab #606 "Drop packets in
> > DROP class" at https://gitlab.isc.org/isc-projects/kea/-/issues/606
> >
> > Please refer to the Kea Arm for a discussion on the "DROP" class.
> >
> > Kind Regards Peter
> >
> > ________________________________
> > From: Kea-users <kea-users-bounces at lists.isc.org> on behalf of Anton
> > Starikov <starikov.a at tecomgroup.ru>
> > Sent: 18 October 2020 19:02
> > To: kea-users at lists.isc.org <kea-users at lists.isc.org>
> > Subject: [Kea-users] New IP address after each reboot
> >
> > Good afternoon!
> >
> > Sorry for my english.
> >
> > There is a problem with Kea Dhcp4 1.6.3 (1.8 is the same).
> >
> > After each reboot, the client (Ubuntu, Arch) gets a new ip address from
> > KeaDhcp. As I understand it, this is due to the fact that Kea, after
> > receiving DHCPRELEASE from the client, does not immediately release the
> > address (although it adds a line with expire = 0 to the
> > lease-database), but does it after a while.
> >
> > As an experiment, I limited the address pool to two ip. And with each
> > reboot (interval ~ 20 seconds), the client received different addresses
> > in a circle.
> >
> > Previously, Mikrotik was used as DHCP, there was no such problem. The
> > client rebooted and, if the address was still free, he received it
> > back.
> >
> > Is there any way to force Kea to immediately release such addresses?
> >
> > I tried to change the settings described in the documentation in
> > section "10. Lease Expiration", it didn't help.
> >
> > {
> >
> > "Dhcp4": {
> >
> > "loggers": [
> >
> > {
> >
> > "name": "kea-dhcp4",
> >
> > "output_options": [
> >
> > {
> >
> > "output": "/var/log/kea-debug.log",
> >
> > "maxver": 8,
> >
> > "maxsize": 204800,
> >
> > "flush": true,
> >
> > "pattern": "%d{%j %H:%M:%S.%q} %c %m\n"
> >
> > }
> >
> > ],
> >
> > "severity": "DEBUG",
> >
> > "debuglevel": 99
> >
> > },
> >
> > {
> >
> > "name": "kea-dhcp4.commands",
> >
> > "output_options": [
> >
> > {
> >
> > "output": "syslog"
> >
> > }
> >
> > ],
> >
> > "severity": "DEBUG",
> >
> > "debuglevel": 99
> >
> > },
> >
> > {
> >
> > "name": "kea-dhcp4.http",
> >
> > "output_options": [
> >
> > {
> >
> > "output": "syslog"
> >
> > }
> >
> > ],
> >
> > "severity": "DEBUG",
> >
> > "debuglevel": 99
> >
> > },
> >
> > {
> >
> > "name": "kea-dhcp4.callouts",
> >
> > "output_options": [
> >
> > {
> >
> > "output": "syslog"
> >
> > }
> >
> > ],
> >
> > "severity": "DEBUG",
> >
> > "debuglevel": 99
> >
> > }],
> >
> > "authoritative": false,
> >
> > "boot-file-name": "",
> >
> > "calculate-tee-times": true,
> >
> > "client-classes": [
> >
> > {
> >
> > "boot-file-name": "",
> >
> > "name": "pxe",
> >
> > "next-server": "10.0.0.12",
> >
> > "only-if-required": true,
> >
> > "option-data": [
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 66,
> >
> > "csv-format": true,
> >
> > "data": "10.0.0.12",
> >
> > "name": "tftp-server-name",
> >
> > "space": "dhcp4"
> >
> > },
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 67,
> >
> > "csv-format": true,
> >
> > "data": "grldr",
> >
> > "name": "boot-file-name",
> >
> > "space": "dhcp4"
> >
> > }
> >
> > ],
> >
> > "option-def": [ ],
> >
> > "server-hostname": "",
> >
> > "test": "member('ALL')"
> >
> > },
> >
> > {
> >
> > "boot-file-name": "",
> >
> > "name": "voip",
> >
> > "next-server": "10.0.0.10",
> >
> > "only-if-required": true,
> >
> > "option-data": [
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 66,
> >
> > "csv-format": true,
> >
> > "data": "10.0.0.10",
> >
> > "name": "tftp-server-name",
> >
> > "space": "dhcp4"
> >
> > },
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 67,
> >
> > "csv-format": true,
> >
> > "data": "grldr1",
> >
> > "name": "boot-file-name",
> >
> > "space": "dhcp4"
> >
> > }
> >
> > ],
> >
> > "option-def": [ ],
> >
> > "server-hostname": "",
> >
> > "test": "member('ALL')"
> >
> > }
> >
> > ],
> >
> > "control-socket": {
> >
> > "socket-name": "/tmp/kea-dhcp4-ctrl.sock",
> >
> > "socket-type": "unix"
> >
> > },
> >
> > "decline-probation-period": 86400,
> >
> > "dhcp-ddns": {
> >
> > "enable-updates": false,
> >
> > "generated-prefix": "myhost",
> >
> > "max-queue-size": 1024,
> >
> > "ncr-format": "JSON",
> >
> > "ncr-protocol": "UDP",
> >
> > "override-client-update": false,
> >
> > "override-no-update": false,
> >
> > "qualifying-suffix": "",
> >
> > "replace-client-name": "never",
> >
> > "sender-ip": "0.0.0.0",
> >
> > "sender-port": 0,
> >
> > "server-ip": "127.0.0.1",
> >
> > "server-port": 53001
> >
> > },
> >
> > "dhcp-queue-control": {
> >
> > "capacity": 500,
> >
> > "enable-queue": false,
> >
> > "queue-type": "kea-ring4"
> >
> > },
> >
> > "dhcp4o6-port": 0,
> >
> > "echo-client-id": true,
> >
> > "expired-leases-processing": {
> >
> > "flush-reclaimed-timer-wait-time": 5,
> >
> > "hold-reclaimed-time": 1800,
> >
> > "max-reclaim-leases": 100,
> >
> > "max-reclaim-time": 250,
> >
> > "reclaim-timer-wait-time": 10,
> >
> > "unwarned-reclaim-cycles": 5
> >
> > },
> >
> > "hooks-libraries": [
> >
> > {
> >
> > "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so"
> >
> > }
> >
> > ],
> >
> > "host-reservation-identifiers": [ "hw-address"],
> >
> > "interfaces-config": {
> >
> > "interfaces": [ "*" ],
> >
> > "re-detect": true
> >
> > },
> >
> > "lease-database": {
> >
> > "name": "/var/lib/kea/dhcp4.leases",
> >
> > "persist": true,
> >
> > "type": "memfile"
> >
> > },
> >
> > "match-client-id": false,
> >
> > "next-server": "0.0.0.0",
> >
> > "option-data": [
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 6,
> >
> > "csv-format": true,
> >
> > "data": "10.0.0.1",
> >
> > "name": "domain-name-servers",
> >
> > "space": "dhcp4"
> >
> > },
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 15,
> >
> > "csv-format": true,
> >
> > "data": "lab.winitlab.com",
> >
> > "name": "domain-name",
> >
> > "space": "dhcp4"
> >
> > },
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 119,
> >
> > "csv-format": false,
> >
> > "data": "057465636F6D046E6E6F76027275000A7465636F6D67726F757002727500",
> >
> > "name": "domain-search",
> >
> > "space": "dhcp4"
> >
> > }
> >
> > ],
> >
> > "option-def": [ ],
> >
> > "t1-percent": 0.5,
> >
> > "t2-percent": 0.875,
> >
> > "reservation-mode": "all",
> >
> > "sanity-checks": {
> >
> > "lease-checks": "warn"
> >
> > },
> >
> > "server-hostname": "",
> >
> > "server-tag": "",
> >
> > "shared-networks": [ ],
> >
> > "subnet4": [
> >
> > {
> >
> > "4o6-interface": "",
> >
> > "4o6-interface-id": "",
> >
> > "4o6-subnet": "",
> >
> > "authoritative": false,
> >
> > "calculate-tee-times": true,
> >
> > "id": 18,
> >
> > "match-client-id": false,
> >
> > "next-server": "1.1.1.1",
> >
> > "option-data": [
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 3,
> >
> > "csv-format": true,
> >
> > "data": "10.0.50.1",
> >
> > "name": "routers",
> >
> > "space": "dhcp4"
> >
> > },
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 6,
> >
> > "csv-format": true,
> >
> > "data": "10.200.0.1",
> >
> > "name": "domain-name-servers",
> >
> > "space": "dhcp4"
> >
> > },
> >
> > {
> >
> > "always-send": false,
> >
> > "code": 15,
> >
> > "csv-format": true,
> >
> > "data": "bncvbn.nnn",
> >
> > "name": "domain-name",
> >
> > "space": "dhcp4"
> >
> > }
> >
> > ],
> >
> > "pools": [
> >
> > {
> >
> > "option-data": [ ],
> >
> > "pool": "10.0.50.10-10.0.50.80"
> >
> > }
> >
> > ],
> >
> > "relay": {
> >
> > "ip-addresses": [ "10.0.50.1" ]
> >
> > },
> >
> > "reservation-mode": "all",
> >
> > "reservations": [],
> >
> > "subnet": "10.0.50.0/24",
> >
> > "t1-percent": 0.5,
> >
> > "t2-percent": 0.875,
> >
> > "valid-lifetime": 86400
> >
> > }
> >
> > ],
> >
> > "t1-percent": 0.5,
> >
> > "t2-percent": 0.875,
> >
> > "valid-lifetime": 4000
> >
> > }
> >
> > }
> >
> > --
> >
> > _______________________
> --
> 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
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>


-- 
_______________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20220426/71f83601/attachment-0001.htm>


More information about the dhcp-users mailing list