Page MenuHomeVyOS Platform

Leases in "show dhcp server leases" lose Pool and Hostname after some time
Closed, WontfixPublic

Description

When a lease is first given out, Pool is set and shown correctly via on commit { set shared-networkname = "<pool name>"; } in shared-network scope, but after some time, likely on renew events, the shared-networkname is deleted from the lease, as is hostname.

The dhcp server logs show errors (these are for dhcpv6, but may be related, as dhcpv6 uses the same on commit):

Jun 24 04:58:23 vyos dhcpd: Renew message from fe80::xxxx port 546, transaction ID 0xDD257800
Jun 24 04:58:23 vyos dhcpd: Reply NA: address xxxx to client with duid 00:01:00:01:xxxx iaid = xxxx static
Jun 24 04:58:23 vyos dhcpd: set shared-networkname: no scope

It may also be a bug in isc-dhcp.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

jjakob created this object in space S1 VyOS Public.
syncer assigned this task to Unknown Object (User).Aug 30 2019, 10:16 PM
syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.2 Crux (VyOS 1.2.4); removed VyOS 1.2 Crux.
syncer moved this task from Needs Triage to Backlog on the VyOS 1.2 Crux (VyOS 1.2.4) board.
Unknown Object (User) added a comment.Sep 2 2019, 1:35 PM

Hello, @jjakob . I cannot reproduce this issue on VyOS 1.2-rolling-201908311322. Can you give more details and configuration commands?
Did you use for ipv4 show dhcp server leases and for ipv6 run show dhcpv6 server leases ?

On my routers they are definitely missing from /config/dhcpd.leases. I have some static host mappings in the config too. I also confirmed the "on commit set shared-networkname" line is in dhcpd.conf.

I can't confirm this on dhcp v6, I don't have enough leases to see anything out of the ordinary.

Examples from 2 vyoses:

1.2-rolling-201908251327

vyos@vyos:~$ show dhcp server leases 
IP address    Hardware address    State    Lease start          Lease expiration     Remaining    Pool    Hostname
------------  ------------------  -------  -------------------  -------------------  -----------  ------  ----------
x.x.x.101     xx:xx:xx:xx:xx:11   active   2019/09/02 17:39:02  2019/09/03 05:39:02  9:47:11      LAN
x.x.x.203     xx:xx:xx:xx:xx:df   active   2019/09/02 19:10:33  2019/09/03 07:10:33  11:18:42     LAN     Galaxy-S6
x.x.x.213     xx:xx:xx:xx:xx:c0   active   2019/09/02 19:13:10  2019/09/03 07:13:10  11:21:19     LAN
x.x.x.218     xx:xx:xx:xx:xx:eb   active   2019/09/02 15:02:56  2019/09/03 03:02:56  7:11:05      LAN     Galaxy-S6
x.x.x.240     xx:xx:xx:xx:xx:e2   active   2019/09/02 16:39:06  2019/09/02 23:12:12  3:20:21

1.2.0-rolling+201906231514

vyos@vyos:~$ show dhcp server leases 
IP address      Hardware address    State    Lease start          Lease expiration     Remaining    Pool      Hostname
--------------  ------------------  -------  -------------------  -------------------  -----------  --------  ---------------
xx.x.x.101      xx:xx:xx:xx:xx:2b   active   2019/09/02 19:31:17  2019/09/03 07:31:17  11:34:14     LAN-pool
xx.x.x.104      xx:xx:xx:xx:xx:3c   active   2019/09/02 14:12:38  2019/09/03 02:12:38  6:15:35
xx.x.x.105      xx:xx:xx:xx:xx:2e   active   2019/09/02 14:06:48  2019/09/03 02:06:48  6:09:45      LAN-pool  asddfg
xx.x.x.115      xx:xx:xx:xx:xx:0a   active   2019/09/02 08:57:50  2019/09/02 20:57:50  1:00:47
xx.x.x.124      xx:xx:xx:xx:xx:df   active   2019/09/02 17:27:09  2019/09/02 23:30:04  3:33:01
xx.x.x.128      xx:xx:xx:xx:xx:f9   active   2019/09/02 14:01:04  2019/09/03 02:01:04  6:04:01
xx.x.x.129      xx:xx:xx:xx:xx:3d   active   2019/09/02 19:24:07  2019/09/03 07:24:07  11:27:04     LAN-pool
xx.x.x.136      xx:xx:xx:xx:xx:20   active   2019/09/02 11:13:59  2019/09/02 23:13:59  3:16:56
xx.x.x.139      xx:xx:xx:xx:xx:c0   active   2019/09/02 18:28:55  2019/09/03 06:28:55  10:31:52     LAN-pool  asdfdf
xx.x.x.146      xx:xx:xx:xx:xx:de   active   2019/09/02 14:43:32  2019/09/03 02:43:32  6:46:29
xx.x.x.151      xx:xx:xx:xx:xx:e7   active   2019/09/02 12:31:27  2019/09/03 00:31:27  4:34:24      LAN-pool  DESKTOP-asdffg
xx.x.x.161      xx:xx:xx:xx:xx:76   active   2019/09/02 13:58:27  2019/09/03 01:58:27  6:01:24      LAN-pool
xx.x.x.163      xx:xx:xx:xx:xx:72   active   2019/09/02 19:15:09  2019/09/03 07:15:09  11:18:06
xx.x.x.185      xx:xx:xx:xx:xx:b6   active   2019/09/02 11:22:40  2019/09/02 23:22:40  3:25:37
xx.x.x.194      xx:xx:xx:xx:xx:11   active   2019/09/02 13:56:47  2019/09/02 20:01:59  0:04:56
xx.xxx.xxx.100  xx:xx:xx:xx:xx:c2   active   2019/09/02 00:37:48  2019/09/03 00:37:48  4:40:45
xx.xxx.xxx.100  xx:xx:xx:xx:xx:c2   active   2019/09/02 02:23:38  2019/09/03 02:23:38  6:26:35      guest2    zxcvb

Almost all the above IPs are in LAN-pool.
It's not that important for me, more an inconvenience, it may be better to wait until the rolling buster release can be tried out with newer isc-dhcp.

Here's the sanitized dhcp-server config.

shared-network-name LAN-pool {
    subnet x.x.x.x/24 {
        bootfile-name pxelinux.0
        bootfile-server x.x.x.x
        default-router x.x.x.x
        dns-server x.x.x.x
        domain-search asdf.dg
        domain-search dfg
        lease 43200
        ntp-server x.x.x.x
        range 0 {
            start x.x.x.x
            stop x.x.x.x
        }
        smtp-server x.x.x.x
        static-mapping e {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
            static-mapping-parameters "option domain-name-servers x.x.x.x, x.x.x.x;"
        }
        static-mapping r {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
        }
        static-mapping t {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
        }
        static-mapping y {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
            static-mapping-parameters "option domain-name-servers x.x.x.x, x.x.x.x;"
        }
        static-mapping u-i {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
            static-mapping-parameters "option domain-name-servers x.x.x.x, x.x.x.x;"
        }
        static-mapping o-p {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
        }
        static-mapping as {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
        }
        static-mapping sd {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
        }
        static-mapping df {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
        }
        static-mapping fg {
            ip-address x.x.x.x
            mac-address xx:xx:xx:xx:xx:xx
        }
    }
}

This is fixed/was not present in 1.3-rolling.
1.2 is not possible to fix, the bug is in isc-dhcp which would need to be upgraded to a newer version.

erkin set Is it a breaking change? to Unspecified (possibly destroys the router).Aug 31 2021, 6:56 PM
erkin set Issue type to Bug (incorrect behavior).
syncer reassigned this task from Unknown Object (User) to Viacheslav.Jul 16 2023, 9:29 PM
syncer added a subscriber: Unknown Object (User).

ISC-DHCP is deprecated, and we do not expect new updates.
The 1.5 is migrated to KEA-DHCP
Close it as wontfix