Skip to main content
Back to blog

Static IP Addresses: Two Ways, and Only One Is Written Down

How-To

Static IP Addresses: Two Ways, and Only One Is Written Down article illustration

The two standard answers to a device whose address keeps moving get offered in the same breath, as though they were one job done from different chairs. Set the address on the device, or reserve it on the router. Read the documentation for each and a different thing is happening, and only one leaves a record behind.

Setting the address turns the other arrangement off

Windows ships a command for creating an address on an interface, and its reference page spends two sentences on consequences rather than on syntax. Both are worth more than the instructions around them.

The first makes the two arrangements exclusive. Run that command on an interface already getting its address automatically, says the reference, and “DHCP is automatically disabled.” Not paused, not overridden for this one value. The interface stops asking. That direction of travel shows up again in the separate command for modifying an interface, which carries a setting for automatic configuration whose two accepted values are enabled and disabled, and whose stated default is enabled. Asking is the resting state. Typing an address in is the departure from it, and the departure is total rather than partial.

Duplicate address detection spoils the usual story. A hand-set address is not an unchecked address. Where the feature is switched on for that interface, the second sentence says, “the new IP address is not usable until DAD successfully finishes, which confirms the uniqueness of the IP address on the link.” The new number is held unusable until nothing else on the link is found answering to it.

Note the condition at the front of that sentence, because the hedge is the vendor’s own and not mine. The check happens where it is enabled, which is no promise that it is enabled everywhere.

Where the setting lives is a third fact, and it comes from the other reference. That page notes the value “is persistent across reboots and only stored in the active policy store”, and that “Changes to the persistent store will have no effect.” Even on the device, the decision is held in one particular place under its own rules, and editing the wrong copy of it achieves nothing.

So a device does look before it settles. What it will not do is tell anybody what it found, and the four messages it would otherwise have exchanged are the subject of the negotiation an address normally arrives through.

Reserving it puts the record somewhere else

The alternative leaves the device asking and changes the answer it gets. On a Windows server that is one command in the module for the address service itself, and its description runs to a single sentence that settles what a reservation actually is.

“Once reserved,” it reads, “the IP address is leased only to the client identified by the specific client identifier (ID).”

Note the verb. The address is still leased. A reservation does not lift the number out of the leasing arrangement and hand it over permanently. It narrows the set of clients the lease may go to, from any of them to exactly one, and leaves everything else about the arrangement in place. The timers still run, and the device still asks.

What identifies that one client is nothing you typed into it. The reference for the identifier is blunt about where it comes from: “For Windows clients, the MAC address is used as the client ID.” The record is keyed to something the device announces about its hardware, which means the device itself need know nothing about the arrangement made on its behalf.

Clearest of all, the two are interchangeable in the documented examples. One of them converts an existing lease into a reservation by passing the lease straight into the command that creates reservations. No new object, no different category. The same record, re-filed with a narrower condition on it.

That arrangement is defined in the protocol too, and the exchange it rides on sits behind the contrast between an address that holds and one that moves.

The conflict machinery is written down in two places

Both arrangements have to survive two devices claiming one number, and the documentation splits that answer across two separate products. Read either half alone and the mechanism looks far simpler than it is.

Half of it sits with the client, in the detection step above. The protocol adds a second duty to that same moment, and it carries more weight. Having taken an address, a client “SHOULD broadcast an ARP reply to announce the client’s new IP address and clear any outdated ARP cache entries in hosts on the client’s subnet.” The device does not only look. It corrects what its neighbours still remember about that number.

Its other half sits with the server, attached to a parameter for listing failures. The command that reads leases takes a switch for returning the bad ones, and its description is where the remainder of the mechanism is written down. “If an IP address lease is declined by the client because of a conflict with another client, the lease record is marked as bad, or declined, by the DHCP server service.” Then the consequence: “An IP address lease in this state is not offered to any client until expiry of a timer, which is 10 minutes.”

So a collision is not merely noticed. It is filed, and the number is withheld from everybody for ten minutes while the dust settles. The same page enumerates the states a lease can be in, and asking for all of them returns Active, Offered, Declined and Expired. One of those four exists for no other purpose than recording that two devices wanted the same address.

Set the address by hand and you keep one half and lose the other. The local check still runs where it is enabled. What is missing afterwards is anyone to report to, because that quarantine is triggered by a client declining an address it was offered, and a device configured at the keyboard is not in that conversation. There is no record of it to mark bad, for the straightforward reason that no record was ever made.

Which block the number should come out of is a different matter, settled by which number ranges are kept for internal networks.

Custody of an address, seen from two public records

A name published against an address describes the number, not whoever is on it. Operators publish names for addresses they hold, and our own page for looking those up says consumer and mobile ranges frequently carry a name built automatically from the address itself. The same page sets a limit on what such a name buys you: it is not a device name, and on an address that moves it is not unique to you over time either. This is the custody question from the far side, because the published name outlives whichever device currently holds the number, which is visible in what an operator has published against an address.

There is a registry record of who holds an address, and it stops a long way above your own equipment. Allocations are recorded against blocks and against the organisation that holds them, which answers a question one or two levels above the question actually asked. Our own page for reading those records attaches the caveat itself: the address may be shared, it may be dynamic, or it may sit behind carrier-grade translation, any of which breaks the link between the entry and a device. Custody of an address has a different answer at every level, and none of the levels reaches the thing on your desk, which is the point of the registry entry for the block an address belongs to.

Both routes end with a device that answers to the same number tomorrow. Only one of them also writes that number down somewhere other than the device it describes, keyed to something the device broadcasts rather than something you remembered to type.

That entry is what a collision can be filed against, and what a ten minute quarantine can be applied to. If the address has to stay put because something else depends on reaching it, pick the route that leaves the network able to be told.