<div dir="ltr"><div>Greetings Kea Users,</div><div><br></div><div>I am attempting to get Pg based storage working for my first Kea installation.</div><div><br></div><div>I'm using kea-dhcp4-server 2.2.1-1</div><div><br></div><div>I do have leases in the DB:</div><div><br></div><div>z@[local]:kea=# select * from lease4;<br>═[ RECORD 1 ]══╤═════════════════════════════════════════<br>address        │ 178782308<br>hwaddr         │ \x9cebe803e3b9<br>client_id      │ \x019cebe803e3b9<br>valid_lifetime │ 3600<br>expire         │ 2023-09-27 12:45:32-05<br>subnet_id      │ 1<br>fqdn_fwd       │ f<br>fqdn_rev       │ f<br>hostname       │ ziti<br>state          │ 0<br>user_context   │ <br></div><div><br></div><div>and I've added a host entry:</div><div><br></div><div>INSERT INTO hosts (<br>    dhcp_identifier,<br>    dhcp_identifier_type,<br>    ipv4_address<br>)<br>VALUES (<br>    '\x9cebe803e3b9',<br>    0,<br>    178782258<br>);</div><div><br></div><div>which yields:</div><div><br></div><div>z@[local]:kea=# select * from hosts;<br>═[ RECORD 1 ]═════════╤═══════════════<br>host_id               │ 3<br>dhcp_identifier       │ \x9cebe803e3b9<br>dhcp_identifier_type  │ 0<br>dhcp4_subnet_id       │ ¤<br>dhcp6_subnet_id       │ ¤<br>ipv4_address          │ 178782258<br>hostname              │ ¤<br>dhcp4_client_classes  │ ¤<br>dhcp6_client_classes  │ ¤<br>dhcp4_next_server     │ ¤<br>dhcp4_server_hostname │ ¤<br>dhcp4_boot_file_name  │ ¤<br>user_context          │ ¤<br>auth_key              │ ¤</div><div><br></div><div>and my kea config looks like:</div><div><br></div><div>$ cat /etc/kea/kea-dhcp4.conf</div><div>"Dhcp4": {<br>    "interfaces-config": {<br>        "interfaces": [ "eno1" ]<br>    },<br><br>    "control-socket": {<br>        "socket-type": "unix",<br>        "socket-name": "/run/kea/kea4-ctrl-socket"<br>    },<br><br>    "lease-database": {<br>        "type":     "postgresql",<br>        "name":     "kea",<br>        "user":     "kea",<br>        "password": "REDACTED",<br>        "host":     "localhost",<br>        "port":     5432<br>    },<br><br>    "hosts-database": {<br>        "type":     "postgresql",<br>        "name":     "kea",<br>        "user":     "kea",<br>        "password": "REDACTED",<br>        "host":     "localhost",<br>        "port":     5432<br>    },</div><div><br></div><div>    [...]</div><div><br></div><div>       "subnet4": [<br>        {<br>            "subnet": "<a href="http://10.168.0.0/24">10.168.0.0/24</a>",<br><br>            "pools": [ { "pool": "10.168.0.100 - 10.168.0.200" } ],<br>        }<br>    ],</div><div>    [...]<br></div><div><br></div><div>However, when my client attempts to get an address, I get:</div><div><br></div><div>Sep 27 12:07:59 zed kea-dhcp4[232795]: INFO  DHCP4_INIT_REBOOT [hwtype=1 9c:eb:e8:03:e3:b9], cid=[ff:d5:ad:cf:0d:00:02:00:00:ab:11:1e:cb:1c:43:6d:72:82:5f], tid=0xc0909510: client is in INIT-REBOOT state and requests address 10.168.0.103<br>Sep 27 12:07:59 zed kea-dhcp4[232795]: INFO  DHCP4_LEASE_ALLOC [hwtype=1 9c:eb:e8:03:e3:b9], cid=[ff:d5:ad:cf:0d:00:02:00:00:ab:11:1e:cb:1c:43:6d:72:82:5f], tid=0xc0909510: lease 10.168.0.103 has been allocated for 3600 seconds<br>Sep 27 12:08:02 zed kea-dhcp4[232795]: INFO  DHCP4_LEASE_ADVERT [hwtype=1 9c:eb:e8:03:e3:b9], cid=[01:9c:eb:e8:03:e3:b9], tid=0x40ac136c: lease 10.168.0.100 will be advertised<br>Sep 27 12:08:02 zed kea-dhcp4[232795]: INFO  DHCP4_LEASE_ALLOC [hwtype=1 9c:eb:e8:03:e3:b9], cid=[01:9c:eb:e8:03:e3:b9], tid=0x40ac136c: lease 10.168.0.100 has been allocated for 3600 seconds</div><div><br></div><div>That is, I am expecting Kea to hand out 10.168.0.50, but it is handing out two addresses from the pool. This might be due to two different DHCP clients running on the client system (systemd-networkd and perhaps Network-Manager). I plan to dig into the two lease issue after figuring out the hosts table issue.<br></div><div><br></div><div>Any ideas on what I'm missing so that kea uses the hosts table for IP address assignments for given MAC addresses?</div><div><br></div><div>Thanks for any help!</div><div><br></div><div>-m<br></div></div>