Hacker News new | ask | show | jobs
by alexpotato 1277 days ago
I always like this story about MacOs.

- Most OSes do a full dhcp look up when they connect to a network even if they have connected to the network before. Wifi saved networks is a good example of a network where you have some historical information on the connection

- MacOs however keeps track of the IP addresses that it saw for each of the networks it has connected to recently. If it sees a network it's been on before, it first tries to just use the old IP address. This is under the assumption that the lease is still tied to the user's laptop.

- In the best case, the laptop gets a working IP very quickly and in the worst case, you just do dhcp again

- From a user's perspective, if they walk into a meeting with a bunch of folks with non Mac laptops, it will seem like the Mac connects much faster than everyone else's machine

When I read this story, the author pointed out that many people say "Macs just feel like they work better!" and used this as an example. Granted, this partly comes from owning the ENTIRE stack from hardware to drivers to OS etc which is something only Mac can do.

1 comments

...and the network intrusion detection system throws up all sorts of alarm bells about IPs being spoofed and duplicate IPs in use.

I assume MacOS actually only re-uses IPs if it sees the lease hasn't already expired but it might be dumber than that.

IIRC it does, and otherwise throws out (or used to) an ARP check (or something like that) to see if any one on the local link is using the IP. A properly behaved DHCP server would not hand the IP again to someone else if the lease hasn't expired.
> properly behaved DHCP server

One of the common issues with this is that home routers don't usually persist leases across power cycles.

IIRC DHCP leases should be refreshed at their half-time. Or perhaps I am mistaken and this is how Windows works.