openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
160 stars 96 forks source link

Leases for IPv6 SLAAC devices? #187

Open vk496 opened 1 year ago

vk496 commented 1 year ago

Hello,

I'm wondering if it possible to have leases with IPv6 devices that obtained their IP by SLAAC. Since OpenWrt have knowledge of the devices using SLAAC, I think it would be very nice to reach those devices by some name (like DHCP hosts without hostname?) instead of always looking for their IPv6 address.

I would like to know if this feature make any sense. If yes, I could try to implement it

oskar456 commented 1 year ago

IPv6 router does not have knowledge of the devices that obtained their IP by SLAAC. It only provides the prefix, the device will pick up an address from it (mostly) randomly. In theory you could watch the Duplicate Address Detection messages to see which address is being used by a particular device but you will never know when such address disappears from the network, unless you do active probing by NDP.