Networking

Static vs Dynamic IP: Differences and How to Check Which You Have

A static IP address stays the same until someone changes it by hand, while a dynamic IP address is handed out automatically by a DHCP server for a limited time and can change. Most devices and home internet connections use dynamic addresses, and you only need a static one when something must always be found at the same address, such as a server, a port forwarding target or a firewall allowlist entry.

"Static vs dynamic" applies at two levels, and people often mix them up. Your device has a local address on your home network, assigned by your router. Your router has a public address on the internet, assigned by your ISP. Each can be static or dynamic independently. If you're not sure which address is which, start with public vs private IP addresses.

Static vs dynamic IP at a glance

DynamicStatic
Assigned byA DHCP server (your router, or your ISP)Typed in by hand, or fixed by your ISP
ChangesPossibly, when the lease ends or the device reconnectsOnly when someone changes it
SetupNoneAddress, subnet mask, gateway and DNS entered on each device
Risk of conflictsLow, the server tracks who has whatTwo devices with the same address break each other
Public address costIncluded with most plansOften an extra charge or business plan, depending on the ISP
Good forLaptops, phones, almost everythingServers, printers, network gear, remote access

How dynamic addresses work: DHCP leases

RFC 2131 calls the period an address is assigned for a "lease". A client can extend the lease with later requests, release the address early, or ask for an infinite one. When a device reconnects, it asks for the address it had before, so in practice a device often keeps the same local address for weeks. Nothing guarantees it, though: if the device is away long enough for the lease to expire, the router may give that address to someone else. The full exchange is covered in what DHCP is and how it works.

RFC 2131 defines three ways a DHCP server can allocate addresses, and the third one matters here:

  • Automatic: a permanent address from the pool.
  • Dynamic: an address for a limited time; the only method that lets addresses be reused automatically.
  • Manual: the administrator chooses the address and DHCP just delivers it.

Manual allocation is what routers call a DHCP reservation (or "static lease", "address reservation"). You tie a device's MAC address to a fixed IP address in the router, and the device keeps getting that address over DHCP. You get a fixed address without touching the device's settings, and the router never hands that address to anything else. For a printer, a NAS or a game console behind a port forwarding rule, a reservation is usually better than a static address typed into the device.

How to check if your local IP is static or dynamic

Windows (PowerShell)

Get-NetIPAddress -AddressFamily IPv4 | Select-Object InterfaceAlias, IPAddress, PrefixOrigin, ValidLifetime

Example output (shortened):

InterfaceAlias  IPAddress      PrefixOrigin ValidLifetime
--------------  ---------      ------------ -------------
Ethernet 2      192.168.56.1         Manual 10675199.02:48:05.4775807
Wi-Fi           192.168.1.251          Dhcp 23:53:34

Microsoft documents PrefixOrigin as Dhcp when "the IP address prefix was provided by DHCP settings" and Manual when it "was manually specified". Here the Wi-Fi address is dynamic, with about 24 hours left on its lease. The manual address (a VirtualBox host-only adapter) has a ValidLifetime of TimeSpan.MaxValue, which is how Windows shows "infinite". Addresses starting with 169.254 show up as WellKnown: those are self-assigned because no DHCP server answered.

In Command Prompt, ipconfig /all gives the same answer in its DHCP Enabled. . . : Yes line, followed by Lease Obtained and Lease Expires for dynamic addresses.

Linux (NetworkManager)

nmcli -f ipv4.method connection show "<connection name>"

List connection names with nmcli connection show. According to the NetworkManager documentation, auto "enables automatic IPv4 address assignment from DHCP, PPP, or similar services", and manual "enables the configuration of static IPv4 addresses". link-local means a self-assigned 169.254.x.x address. Systems without NetworkManager, such as many servers, configure addresses elsewhere (netplan, systemd-networkd or /etc/network/interfaces).

macOS

Apple menu > System Settings > Network, click the network service, click Details, then TCP/IP. The Configure IPv4 menu shows Using DHCP (dynamic), Using DHCP with manual address (a fixed address you entered, with the rest from DHCP) or Manually (fully static).

How to tell if your public IP is static

There is no command that answers this, because your ISP decides. Three ways to find out:

  1. Check your plan or ask the ISP. A static public address is usually something you request and see on the contract or bill.
  2. Look at the router's WAN or internet status page. The connection type often reads DHCP, PPPoE or Static. "Static" there means your ISP gave you fixed values to enter.
  3. Watch it over time. Note your public address (search "what is my IP" or check the router) and compare after a router restart. If it changes, it's dynamic. If it doesn't, it may still be dynamic with a long lease.

Some ISPs also put many customers behind one shared public address, called carrier-grade NAT (CGN). RFC 6598 reserves 100.64.0.0/10 for the link between the ISP's CGN equipment and your router, so if your router's WAN page shows an address from 100.64.0.0 to 100.127.255.255, or a private one such as 10.x.x.x, you can't receive incoming connections directly, static or not.

When a static IP is worth it

  • Hosting something at home (a game server, a VPN endpoint, a camera system) that others must reach by address. Incoming traffic also needs port forwarding to a fixed local address, so the target device needs a reservation too.
  • Remote services that only accept known addresses. Company VPNs, databases and admin panels sometimes allow connections only from specific IP addresses.
  • Running a mail server. Receiving mail directly needs a stable address with matching DNS records.

For hosting at home, dynamic DNS is the common cheaper alternative. A small client on your router or a device updates a DNS name whenever the public address changes, so people connect to the name instead of the address. It doesn't help with allowlists, which need the address itself to stay fixed.

How to set a static local IP without breaking things

If you do type a static address into a device rather than use a reservation, pick an address outside the router's DHCP pool. If the pool is 192.168.1.100 to 192.168.1.199, use something like 192.168.1.20. Otherwise the router can hand the same address to another device, and both lose connectivity intermittently. Enter the subnet mask (usually 255.255.255.0, see subnet masks explained), the router's address as the gateway, and DNS servers, because a static setup gets none of these from DHCP.

Frequently asked questions

Is a static IP faster than a dynamic IP?
No. Speed depends on your connection and network, not on how the address was assigned. A static address only means the same address is used every time. Getting an address over DHCP takes a moment when a device joins the network, but that has no effect on throughput once it is connected.
Does a dynamic IP make me anonymous?
No. Your public address may change from time to time, but your ISP keeps track of which customer had which address, and websites can still recognise you through cookies, accounts and browser fingerprinting. A changing address is a side effect of how ISPs manage addresses, not a privacy feature.
How often does a dynamic IP change?
It depends on the DHCP lease time and on the network. Your router sets the lease for devices at home, often anywhere from hours to days, and devices renew before it runs out, so a device usually keeps the same local address while it stays connected. Public addresses from an ISP may stay the same for months or change on every reconnect; only the ISP can tell you its policy.
Should I set a static IP on my PC for gaming?
Only if you need a fixed local address for a port forwarding rule, and even then a DHCP reservation in the router is the safer way to get it. A static address does not reduce ping or packet loss.

Sources