News for hackers. Stuff that matters.
Re:MacBook Pro Insomnia by ThePowerOfFuet on Thursday July 31, 2025 @11:50AM (#44746882)
> I had changed the DHCP lease time on my router from the default to a really low value. I believe I had set it to 15 minutes.

What were you hoping to achieve by doing that?

Re:MacBook Pro Insomnia by mlyle on Thursday July 31, 2025 @11:54AM (#44746931)
I like low lease times. DHCP server knows what's really on the network, and if something requests lots and lots of the pool you'll be fine in 15-30 minutes.

If things are set to a really long time, >=12 hours, you find out the next day when everything is broken (or you get alerts in the middle of the night). If you set them to a randomized 15-90m span, you get things breaking immediately when you screw up the dhcp server.

Re:MacBook Pro Insomnia by cruffle_duffle on Thursday July 31, 2025 @11:59AM (#44746962)
Hah. Your answer just has more questions. What on earth is requesting so many DHCP leases?
Re:MacBook Pro Insomnia by mlyle on Thursday July 31, 2025 @12:31PM (#44747279)
You've never accidentally spun something up that consumes all the leases?

It's just been a couple of times, but I've definitely done it (e.g. bridged a couple of networks that shouldn't have been).

But mostly, it's the other two things: it provides me with a list of hosts active now, and if the DHCP server is subtly broken I get a sentinel signal of something being wrong earlier (and it tends to be a partial instead of complete failure).

One more bonus: if I move something to a static lease, out of the pool, it'll renumber in a reasonable time and I don't need to go kick link state to get it to request again.

Things like really big caches and really long lease times: They're good for average performance, and they can let you ride out small problems. The flip side is that they tend to mask problems and to create really big demand transients at times. The trick is always to find a good middle ground.

Re:MacBook Pro Insomnia by ncr100 on Thursday July 31, 2025 @01:13PM (#44747768)
Excellent answer - new appreciation for low lease times, thank you
Re:MacBook Pro Insomnia by ThePowerOfFuet on Saturday August 02, 2025 @10:13AM (#44767803)
Yeah, there's a lot of room to play between 900 and 86400 seconds.

Extremes of any sort generally aren't good. You fucked around and you found that out.

Re:MacBook Pro Insomnia by mlyle on Saturday August 02, 2025 @11:06AM (#44768213)
> You fucked around and you found that out.

I haven't had any notable issues with values in the 600-1200 second range, actually. (My macs don't wakeup to keepalive network on battery, though).

Re:MacBook Pro Insomnia by esseph on Thursday July 31, 2025 @07:45PM (#44751491)
Modern devices will randomize MAC unless told not to when connecting / reconnecting to a wifi/Ethernet network.

When on a pretty standard /24 network subnet, if there are more than a few dozen devices coming and going, the lease table can fill up until older lease reservations expire.

Re:MacBook Pro Insomnia by pauljara on Thursday July 31, 2025 @02:03PM (#44748325)
I was trying to determine if a lease expired, if my router would immediately try to lease that same IP out to another machine on the network. It felt like it cached an expired lease mapping and would try to keep that old IP un-leased in case the original machine to which it was mapped came back online. I was just trying to better understand the behaviour.
Re:MacBook Pro Insomnia by bigthymer on Thursday July 31, 2025 @05:57PM (#44750641)
Did you want certain IPs to be fixed to certain devices or do you prefer they be randomly allocated?
Re:MacBook Pro Insomnia by pauljara on Thursday July 31, 2025 @06:30PM (#44750897)
Neither really, though my ISP's router would allow me to assign IPs by MAC address so they're effectively reserved to a device. The router's web UI displayed a list of devices. I wanted to see if devices would start dropping off this list as soon as the DHCP lease time expired. When they did drop off this list, I had thought they reappeared with the same IP without me explicitly using the reservation functionality. So how was this happening? I figured the web UI might not be showing the full picture of all the data about devices; that the router held records of formerly connected devices beyond the DHCP lease time for some unknown reason.