Bug #6543
closedSome leases do not show up in DHCPv6 Lease status
100%
Description
I have noticed from time-to-time that some IPv6 devices have taken a DHCPv6 dynamic lease, and do not show up in the lease status. These leases are active & present in the /var/dhcpd/var/db/dhcpd6.leases file, but do not show up in the GUI.
The issue seems to affect mobile devices e.g. LiteOn based phones. These may have unexpected values in the address family and/or timestamp fields of the DUID.
Files
Updated by Axel Taferner over 8 years ago
I've experienced this same issue, in my case it is not limited to mobile devices. I've had this happen with a Macbook Air and Mac Mini recently, and other devices previously.
Updated by Chris Buechler over 8 years ago
Need some examples, what's shown in dhcpd6.leases that doesn't show on the status page?
Updated by Bruce Simpson over 8 years ago
I'd have to get back to you on that -- e.g. putting a watch on the file contents. There have clearly been leases missing and it's happened more than once. It may be a race condition somewhere. (I'm pivoting to looking at Duo again, so I will be down and dirty with the SG 4860 soon.)
Updated by Axel Taferner over 8 years ago
- File pfsense-dhcpv6-dhcpd6.leases-screenshot.png pfsense-dhcpv6-dhcpd6.leases-screenshot.png added
- File pfsense-dhcpv6-leases-status-screenshot.png pfsense-dhcpv6-leases-status-screenshot.png added
- File pfsense-dhcpv6-mac-mini-screenshot.png pfsense-dhcpv6-mac-mini-screenshot.png added
I like to statically assign DHCPv6 addresses to some devices on my network. But finding the DUID can sometimes be challenging. An easy way that sometimes worked would be to look at the DHCPv6 leases and convert an entry there to a static mapping. But as this bug states, sometimes DHCPv6 leases don't appear in the GUI.
Right now I can provide an example of such a case. It's a Mac Mini. It has a DHCPv6 assigned address. It shows up in /var/dhcpd/var/db/dhcpd6.leases but it does not show up in the GUI's Status / DHCPv6 Leases page.
As a side note, perhaps this is a separate bug, this is currently the only DHCPv6 assigned IP address that does not have a static mapping yet. Incidentally as can be seen in the attached screenshot of the status page, all the statically mapped clients are shown as "offline" even though several of them are online with their statically mapped DHCPv6 IP address.
Updated by Chris Buechler over 8 years ago
Axel: could you email me an unsanitized copy of your dhcpd6.leases? cmb at pfsense dot org. Nothing immediately sticks out, and none of my systems are missing any. I'm sure it's something in one of those two awk patterns, but it's not clear what that might be.
Updated by Axel Taferner over 8 years ago
I sent the email last week, I hope you received it.
Updated by Renato Botelho over 8 years ago
Axel Taferner wrote:
I sent the email last week, I hope you received it.
Hello Axel,
Can you also send it to me? renato at pfsense dot org?
Updated by Chris Buechler over 8 years ago
- Category set to DHCP (IPv6)
- Status changed from New to Confirmed
- Affected Version set to All
Forwarded it to you, Renato.
Updated by Renato Botelho over 8 years ago
Pushed a fix on RELENG_2_3, 2.3.2 snapshots will be fine
Updated by Renato Botelho over 8 years ago
- Assignee set to Renato Botelho
- Target version set to 2.3.2
Updated by Renato Botelho over 8 years ago
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Applied in changeset 1f9c2cb696f493aaaa3512f29c080b7e422b24f2.
Updated by Axel Taferner over 8 years ago
Awesome. Should I open another bug for the problem I mentioned where hosts who have statically assigned dhcpv6 leases are shown as offline on the "Status / DHCPv6 Leases" even when they are online/active? Or was this resolved by this fix also?
Updated by Renato Botelho over 8 years ago
Axel Taferner wrote:
Awesome. Should I open another bug for the problem I mentioned where hosts who have statically assigned dhcpv6 leases are shown as offline on the "Status / DHCPv6 Leases" even when they are online/active? Or was this resolved by this fix also?
Do you confirm the fix worked for you?
The other issue should go to a separate bug, please
Updated by Axel Taferner over 8 years ago
Sorry, I can't confirm if the fix worked for me as I'm not running the snapshots. I'll open another bug for the separate issue.
Updated by Renato Botelho over 8 years ago
Axel Taferner wrote:
Sorry, I can't confirm if the fix worked for me as I'm not running the snapshots. I'll open another bug for the separate issue.
You can install the package "System Patches" and then apply following patch to you system:
https://github.com/pfsense/pfsense/commit/1f9c2cb696f493aaaa3512f29c080b7e422b24f2.patch
Updated by Axel Taferner over 8 years ago
Renato Botelho wrote:
You can install the package "System Patches" and then apply following patch to you system:
https://github.com/pfsense/pfsense/commit/1f9c2cb696f493aaaa3512f29c080b7e422b24f2.patch
Done! Can confirm that it's working for me now with this patch applied. Thanks.
Updated by Chris Buechler over 8 years ago
- Status changed from Feedback to Resolved
works.
Whether systems show online or offline depends on whether the DHCPv6 leased IP is in the NDP cache. If the system hasn't actively used that IP to communicate with the Internet using the DHCPv6-assigned IP in a while (or at all), it will show up as offline.
Axel: Guessing the online/offline is working correctly in your case, as it's pretty straight forward code, it'd either all work or all not work. You're probably expecting to see systems online that aren't actually online using the DHCPv6-assigned IP. Check 'ndp -an' to confirm. If you see an active entry in 'ndp -an' and it shows offline on the DHCPv6 status page, then please open a new bug report with specifics. Guessing you'll just find they aren't in NDP.