NETWORK

Static vs dynamic IP addressesWhen to fix an address and when to let DHCP assign it

A dynamic IP address is assigned automatically by a DHCP server and may change over time; a static IP address is configured manually and stays fixed. Most devices should use dynamic addresses. Servers, printers and anything with a port-forwarding rule need a fixed address, which is best provided by a DHCP reservation rather than manual configuration.

BlackhawkHub Editorial · Updated

Dynamic addressing

When a device joins a network it broadcasts a DHCP request and receives an address, a subnet mask, a default gateway and DNS servers, all valid for a lease period. Before the lease expires the device renews it, usually keeping the same address. If the device is away for longer than the lease, the address may be given to someone else.

This is the right model for almost everything: no configuration, no conflicts, and moving a laptop between networks just works.

Static addressing

A static address is typed into the device. It never changes, which is what you need when other things point at it:

  • Servers, printers, NAS units, cameras.
  • The target of a router port-forwarding rule (a Minecraft server, for example).
  • Network infrastructure: switches, access points, the router itself.

The cost is manual bookkeeping. The address must be outside the DHCP pool, unique, and correct for the subnet, and you have to enter the gateway and DNS servers by hand as well.

The middle ground: DHCP reservations

A reservation tells the DHCP server "always give this MAC address this IP". The device stays on automatic configuration, but its address is effectively fixed. You get static behaviour with dynamic convenience, and one place, the DHCP server, holds the whole address plan. For home and small-office networks this is usually the best choice.

Public static addresses

On the WAN side, ISPs assign either a dynamic public address that changes occasionally or, for a fee, a static one. A static public address simplifies hosting, VPN endpoints and mail servers (which need matching forward and reverse DNS). Dynamic DNS services cover most other cases.

Setting a static address on Windows

Settings → Network & internet → the adapter → IP assignment: Edit → Manual → IPv4 on → enter address, mask (as a prefix length or dotted mask depending on version), gateway and DNS.

From the command line:

cmd
netsh interface ipv4 set address name="Ethernet" static 192.168.1.50 255.255.255.0 192.168.1.1
netsh interface ipv4 set dns name="Ethernet" static 192.168.1.1

To return to DHCP:

cmd
netsh interface ipv4 set address name="Ethernet" dhcp
netsh interface ipv4 set dns name="Ethernet" dhcp

See the netsh record. Check the result with ipconfig /all, where DHCP Enabled shows No for a static configuration.

Troubleshooting

SymptomLikely cause
"Windows has detected an IP address conflict"Static address inside the DHCP pool, or duplicated by hand
Static device cannot reach the internetWrong gateway or DNS entered; verify with ipconfig /all and ping the gateway
Address 169.254.x.x on a dynamic deviceNo DHCP server reachable
Static device unreachable after a network changeSubnet changed and the device was not updated

Frequently asked questions

Should my home devices use static or dynamic addresses?

Dynamic for phones, laptops and most things. Use a DHCP reservation on the router for devices you connect to by address: a NAS, a printer, a game server, a smart-home hub.

Why does my static IP cause a conflict?

The address you chose is inside the DHCP pool and the server later leased it to another device. Pick an address outside the pool or, better, use a reservation.

Do I need a static public IP to host a server?

It helps but is not required. A dynamic public address changes occasionally; dynamic DNS keeps a hostname pointing at it. What you cannot work around is carrier-grade NAT.

Sources