pcmattman wrote:What you probably need to clarify (to us, if you already have to yourself) is exactly who your OS is targeting.
Basically, my target is the "guy who sits at home with a local network that consists of N machines plain tied together, there's a dhcp on each subnet and all of them go to the internet". IE, regular home networks. Alternative is corporate networks, which I've noticed qualify for the "single-subnet with dhcp and router / gateway for inet access" too. I generalized it to "if you're not that come & complain". Third option I want to support is link-local services (DNS-SD, mDNS). Static IP is out. If you want a static IP address, make a dhcp server tell you about it. No manual gateway or dns config either. Also, "lanning" - connecting computers & expecting exchange is a requirement.
What I want is an OS that is much like Windows, in that it configures your network easily, but with as few settings to **** up as possible. So, if I can make a network config that works for my target (above) without a single setting that's best. The only reason people dislike 169.254 addresses is that most of the time when Windows configured it (like, 99% of the time) it was your DHCP server not working or a faulty cable. So, people associate 169.254.* with "not working". That's plain wrong.
I was thinking of indicating network connectivity in 4 levels:
- 0% full, no connectivity because the cable's unplugged or I haven't found a usable IP yet
- 33% full (red), limited connectivity because I have an ip address but haven't heard *anything* from other machines on the network
- 66% full (yellow), limited connectivity because I can't find a dhcp server, but I can reach other computers
- 100% full (green), full connectivity (have a dhcp ip address & a gateway to access the internet through). No probes are sent to the "internet" to see if it's the internet as we now know; shielded corporate networks and intranets should also show fully green.
That separates the "cable problem" from the "no dhcp server situation" and should make people more confident in that it works. mDNS gives your pc a name instead of a number (and should be the preferred way of accessing your computer - by name).
Power users probably want to configure a static IP at some point for video gaming or something like that. They may also have a few servers to play with.
Network administrators do everything from configuring DHCP to static IP addresses regularly. They'll also want to configure their servers, and they probably don't want DHCP for that.
Not sure why power users or network admins need to configure static IPs.
Of course, you also need to figure out what'd happen if your OS ended up
being the DHCP server
I'm not creating a one-size-fits-all OS and I intend it never to be used for a dhcp server location. Not an issue.
The Windows DHCP server and "dhcp3-server" (debian) both keep track of "assigned" leases and gives that lease back to a machine when it requests an address. It should allocate from the pool before reusing an address in its database of "previous clients". Not that you should depend on that behaviour or anything... but generally stuff like that is done to avoid collisions.
Of course, Windows (and Linux AFAIK) also remembers the last lease address and asks for it again - this is unrelated to the DHCP server's database.
They do. The reason I want to extend a lease is to avoid the dodgy-but-still-dhcp-compliant devices. Same reason I trigger about 0.1% or at least 3 minutes before the deadline; desynced clocks will make your lease expire on the dhcp server before you think it does.
An optional configuration-thingy to specify a static IP configuration would be a nice feature
With what goal? For any of my target audience, it's either dhcp or link-local.
I think the hardest thing to do right with this kind of thing is to make an implementation that's "smart enough" to cater for users who don't care, and "complex enough" to cater for users who want to tweak. Balancing smart vs complex can be tough
Tweakers get to tweak their dhcp server. I'm not making a tweaker's OS. There are enough Linuxes out there already.
I have thought of another reason for link-local address beside the global IP. Link-local services should always work as soon as you start up your device. That means you need a link-local IP to talk mDNS and to send stuff to your printer - so it's multihomed. There's no reason to make it not multihomed by the way.