← Learn··Updated 21 May 2026·3 min read

Dynamic vs static IP addresses

A short reference on dynamic vs static IPs — what each means, how DHCP leases work, when each is the right choice for clients and servers, and where the boundary between them gets blurry in cloud and home networks.

Networking
#networking
#dhcp
#ip

The one-line distinction

A static IP address is one that has been manually configured on a host and does not change unless someone changes it. A dynamic IP address is one assigned automatically by a DHCP server (or SLAAC in IPv6), with a lease that expires and may be renewed or replaced.

That is the entire distinction. Everything below is which one for which job and what the lease actually does.

How DHCP hands out a dynamic address

When a new host joins a network, DHCP runs a four-message handshake usually summarised as DORA:

flowchart LR
    H[New host]
    S[DHCP server]
    H -- 1. DISCOVER (broadcast) --> S
    S -- 2. OFFER (broadcast w/ candidate IP + lease) --> H
    H -- 3. REQUEST (accepts an offer) --> S
    S -- 4. ACK (confirms lease) --> H

The host broadcasts a Discover, any DHCP server on the segment responds with an Offer containing a candidate address, the host picks one and sends a Request, the server confirms with an Ack. From that point the host owns the address for the lease duration.

A typical lease is hours to days. Halfway through, the host starts trying to renew with the server that issued the lease; near expiry, if renewal has failed, it tries any DHCP server. If the lease expires without renewal, the host must give up the address and run DORA again.

When to use which

For client devices (laptops, phones, IoT) — dynamic. The address does not need to be stable; the lease lifecycle handles devices joining and leaving the network without manual configuration.

For servers — depends. Two patterns:

  • Static IP on the server itself. The server boots with a hard-coded address. Simplest; brittle if the network renumbers.
  • DHCP reservation (sometimes called "static DHCP"). The DHCP server keeps a table that says "the host with this MAC address always gets this IP." The server still uses DHCP, but always receives the same address. Best of both worlds for most homelab and SMB networks.

For anything other devices reach by IP rather than name — needs to be stable. Either static or reserved.

For anything reached by DNS name — can be either, as long as the DNS A/AAAA record is kept in sync. Dynamic DNS clients (ddclient, the router's built-in updater, or a script calling Cloudflare's API) refresh the record whenever the address changes.

Where the boundary gets blurry

  • Cloud VMs. Public cloud assigns the VM an IP at provisioning. The VM treats it as static, but the cloud provider can change it (e.g. on a stop-start cycle) unless you reserve an Elastic IP. Effectively "static unless you do something specific to make it stable."
  • Home routers. Most consumer routers obtain their public IP from the ISP via DHCP and hand out internal addresses on the LAN via their own DHCP server. The public IP changes whenever the ISP rotates leases (which can be daily or every several months, depending on the ISP). Static public IPs are usually a paid upsell.
  • IPv6 SLAAC. Hosts derive their own address from the router-advertised prefix plus their interface ID. Looks dynamic — the host picks it — but is deterministic from the MAC address by default. Privacy extensions (RFC 4941) randomise it to avoid being a tracking handle.
  • Carrier-grade NAT. Many mobile and some residential ISPs put customers behind CGNAT. The IP your device sees is dynamic and private; the IP that the wider internet sees is shared with thousands of other customers. Neither is yours individually.

The gotchas

Static-IP misconfiguration is one of the more annoying network bugs because the symptoms are wrong in non-obvious ways:

  • Two hosts with the same static IP. ARP conflicts; intermittent reachability that depends on which response arrived first. Always reserve via DHCP rather than configuring directly on the host when you can.
  • Static IP outside the DHCP pool. Best practice. If your DHCP server hands out 192.168.1.100-192.168.1.199, keep your static / reserved addresses outside that range to avoid the server later handing your "static" address to a new client.
  • Server static-IP that the network team renumbers. When the network's subnet changes, every statically-configured host needs reconfiguration. DHCP reservations move with the network.

Try it

The What's My IP tool at /tools/whats-my-ip shows whichever address the server sees your client coming from. If you reload it twice and the address is the same, you are on a stable lease (or a static IP); if you reload it after an hour and it has changed, you are on a short-lease dynamic address — common with mobile networks and some ISPs.