Dynamic IP address

Also known as: dynamic IP

On this page 7

A dynamic IP address is an IP address assigned automatically to a device for a limited period, most often by a DHCP server, and which may change when that period ends or the device reconnects. In address configuration, it is the default method for laptops, phones and most home and office devices, because it requires no manual setup on the client.

The term applies on two levels. Inside a local network, a router or DHCP server hands out private addresses to devices. On the internet side, an internet service provider assigns a dynamic public address to the customer’s router. In both cases the address is leased, not owned, and the network can reuse it once the device no longer needs it.

How a dynamic IP address is assigned

In IPv4 networks, dynamic addressing relies on the Dynamic Host Configuration Protocol (DHCP). A new client broadcasts a request, and the server answers with an address taken from its configured address pool, together with the subnet mask, default gateway, DNS servers and a lease time.

The exchange follows four messages, often remembered by the acronym DORA.

StepMessagePurpose
1DiscoverClient broadcasts a search for DHCP servers
2OfferServer proposes a free address and settings
3RequestClient formally asks for the offered address
4AcknowledgeServer confirms the lease and its duration
The DHCP exchange that assigns a dynamic address

Before using the address, many clients check with an ARP probe that no other device already answers on it, which helps avoid an IP address conflict. If no DHCP server responds at all, an IPv4 client typically falls back to a link-local address in the 169.254.0.0/16 range, known on Windows as APIPA, which only allows communication on the local segment.

Lease time and renewal

A dynamic address is valid only for its lease duration. The client does not wait until the lease runs out; it tries to renew early, so in a stable network a device usually keeps the same address for long periods even though it is technically dynamic.

TimerDefault point in the leaseClient behavior
T1 renewal50 percent of the leaseAsks the original server to extend the lease
T2 rebinding87.5 percent of the leaseAsks any available server to extend the lease
Lease expiry100 percent of the leaseStops using the address and starts over
Lease timers in DHCP

Typical lease times range from one to eight hours on guest Wi-Fi to one day or several days on home and office networks. Short leases recycle addresses quickly when many visitors come and go, while long leases reduce DHCP traffic and make addresses more predictable. Choosing the lease length is therefore a trade-off between pool size and address stability.

Dynamic addressing in IPv6

IPv6 offers more than one way to obtain a dynamic address. With SLAAC, a host learns the network prefix from router advertisements, part of the Neighbor Discovery Protocol, and builds its own interface identifier without any server. DHCPv6 can instead assign addresses centrally, similar to DHCP in IPv4.

Most modern operating systems also create temporary privacy addresses that change regularly, often daily, so that outside services cannot easily track a device by a fixed identifier. On the provider side, ISPs commonly delegate a whole IPv6 prefix to the customer router, and that prefix may itself be dynamic.

Dynamic versus static IP addresses

The opposite of a dynamic address is a static IP address, configured manually or guaranteed permanently by the provider. Between the two sits the DHCP reservation, which keeps the convenience of DHCP but always gives one device the same address.

AspectDynamic addressDHCP reservationStatic address
Configuration effortNone on the clientOne entry on the serverManual on each device
Address stabilityMay changeStableStable
Risk of conflictsLow, managed by serverLowHigher if poorly documented
Best suited forLaptops, phones, guestsPrinters, cameras, NAS devicesRouters, servers, DNS
Public address costUsually included by ISPsNot applicableOften an extra fee
Comparison of address assignment methods

A practical rule is to use dynamic addressing by default, reservations for devices that others must find, and fully static configuration only for infrastructure that must work even when DHCP is down.

Practical consequences and pitfalls

A changing address causes problems whenever something depends on knowing where a device is. Typical examples are remote access to a home server, firewall rules based on addresses and services that whitelist a client IP.

ProblemCauseSolution
Home server unreachableISP changed the public addressDynamic DNS that updates a hostname
Port forwarding stops workingInternal target received a new addressDHCP reservation for the target
Access list blocks a userRule tied to an old addressAuthenticate by identity, not address
Devices get APIPA addressesDHCP server unreachable or pool fullCheck server, relay and pool size
Inbound connections impossibleCarrier-grade NAT shares one public addressRequest a public address or use IPv6
Problems caused by dynamic addresses and their solutions
  • Size the pool generously, because exhausted pools on busy Wi-Fi networks are a common cause of connection failures.
  • Exclude static ranges from the pool so that manually configured devices never collide with leased addresses.
  • Use a DHCP relay when clients and the server sit in different subnets.

A plain-language summary

Every device on a network needs an address, much like a house needs a street number to receive mail. A dynamic IP address is a number that is lent, not given. When a phone joins a Wi-Fi network, the router hands it a free number for a while.

When the phone leaves, the number goes back into the pool for someone else. This is why most people never type an address into their devices. The network handles it automatically, and the number may simply be different next time.

An example from practice

A small accounting office with 25 employees uses its router as the DHCP server. Laptops and phones receive dynamic addresses with an eight-hour lease from a pool of 100 addresses, while the guest network uses a separate pool with a one-hour lease.

Problems started when the shared printer occasionally received a new address and staff could no longer print. The administrator created a DHCP reservation for the printer and the network storage device, keeping all other devices dynamic. For remote access to the office storage, a dynamic DNS hostname now follows the public address the provider changes from time to time.

The result is no manual address management for staff devices, no more printing outages, and remote access that keeps working after every change of the public address.