DHCP vs. Static IP Addressing: Which to Use and Why

Networking · Last updated · About 6 min read

The difference between DHCP and static IP addressing, how each works, when to use which for radio gateways, dispatch PCs and servers, and the mistakes that cause duplicate-address outages.

Every device on an IP network needs an address, and there are two ways to give it one. With DHCP (Dynamic Host Configuration Protocol) the device asks the network for an address and a server hands one out. With a static address a person types the address into the device by hand. Both are normal; the trouble starts when the wrong one is used for the wrong job. For the protocol exchange itself see networking-dhcp.

The difference in one table

DHCP (dynamic) Static
Who assigns the address A DHCP server, automatically A person, manually on each device
Does the address change? It can: addresses are leased for a set time and may change after the lease expires or the device has been away Never, unless someone changes it
What is configured on the device Nothing: "obtain an IP address automatically" IP address, subnet mask, default gateway and DNS server
Setup effort Low per device, and a DHCP server must exist One visit or session per device
Risk Anything that must find the device by address breaks when the address changes A typing mistake or an address used twice causes a conflict; changes need a manual update everywhere
Best for Laptops, tablets, phones, guest devices, ordinary desktops Servers, gateways, printers, recorders, routers, anything other devices connect to

What DHCP gives a device

A DHCP server hands out much more than an address. A normal reply includes the subnet mask (subnet-masks-dotted-decimal-and-cidr-notation), the default gateway (the router toward other networks), and the DNS server addresses (networking-dns), and sometimes a time server (ntp-time-sync-troubleshooting). That is why a device on DHCP can be plugged in and work immediately.

An address from DHCP is a lease. The device renews it before it expires, and normally keeps the same address, but that is not guaranteed.

What a static address requires

When you set an address by hand you must supply all of the following, and every one must be right:

  1. IP address, unique on the network.
  2. Subnet mask, the same as the other devices on that network.
  3. Default gateway, if the device needs to reach anything beyond its own subnet or the Internet.
  4. DNS server, if the device uses host names.

Leave out the gateway and the device works on the local network but cannot reach anything else. A wrong mask causes the same symptoms, often only for some destinations, which makes it hard to spot.

The rule of thumb

Devices that provide a service use a fixed address. Devices that only use services can use DHCP.

The reason is simple. Anything that other devices are configured to connect to by address must always be at that address.

For the RadioPro IP Gateway the installation guide is firm about this. A gateway ships set to DHCP, but a static IP address is required for correct operation in a production environment, and the guide states that DHCP should not be selected unless an engineer at CTI Products is consulted. The reason is the one above: every Dispatch, Solo and Talk client is configured with the gateway's address, so an address that changes takes all of them with it. A gateway that finds no DHCP server also falls back to a link-local 169.254.x.x address, which clients on the normal subnet cannot reach at all (radiopro-ip-gateway-installation-and-configuration). The same applies to anything that is the target of a port forwarding rule: a rule that points at yesterday's DHCP address silently breaks.

Good candidates for a static address (or a reservation, below): gateways, servers, MCN server and modules, recorders, network printers, switches and routers, the dispatch consoles at a fixed position if clients or recorders reach them by address.

The middle way: DHCP reservations

A DHCP reservation keeps the central management of DHCP but guarantees the same address. The server is told "always give this device's MAC address (networking-mac-addresses) this particular IP address". The device itself stays set to obtain an address automatically. It is often the best choice for infrastructure because:

  • the address list lives in one place (the DHCP server) instead of on every device;
  • replacing a failed device only means updating the MAC address in the reservation;
  • the reserved address can never be handed to anyone else by mistake.

The weak spot is that the device depends on the DHCP server being up when it starts.

Choosing static addresses so they do not collide

If a network uses both, the DHCP server hands out addresses from a pool, a range such as .100 to .199. Put static addresses outside that range, for example .2 to .99. A static address inside the pool will eventually be given to another device, and then two devices have the same address (an IP conflict), producing intermittent connection problems that follow whichever device powered on second. See troubleshooting-roip-and-gateway-connectivity.

Keep a simple record of every static address, what it belongs to, and where it is configured. The most common cause of duplicate addresses is a forgotten device.

Telling which one a Windows PC is using

Open a Command Prompt and run:

ipconfig /all

Look at the adapter in use: DHCP Enabled: Yes means the address came from a server and the line "DHCP Server" shows which one. DHCP Enabled: No means the address was typed in. The same output lists the address, subnet mask, default gateway and DNS servers actually in use.

To release and renew a DHCP lease, use ipconfig /release followed by ipconfig /renew.

What an address starting 169.254 means

If a PC set to DHCP cannot reach a server it gives itself an address starting 169.254 (automatic private addressing). That address only works against other devices doing the same on the same segment. Seeing it means DHCP failed: check the cable or Wi-Fi, the switch port, and whether the DHCP server is running and reachable. If DHCP traffic has to cross routers, the router needs a DHCP relay (often called an "IP helper") to forward it. See networking-dhcp.

Common mistakes

  • A server or gateway left on DHCP, then "it stopped working after a power cut" because it came back with a different address.
  • A static address typed inside the DHCP pool.
  • Two people setting the same address on different devices.
  • A static address with the wrong subnet mask or no default gateway.
  • Assuming that turning DHCP off makes a network secure. It does not: anyone can type in a static address. Access control belongs at the firewall or switch (acl-access-control-list).

Source documents

This article summarizes the following published CTI Products manuals. They are the authoritative reference.

This article is part of the CTI Products Knowledge Base. Questions about RadioPro or MCN products? Call +1 (513) 595-5900 or email info@ctiproducts.com.

Informational only. This article is general background and is not engineering, safety, legal or regulatory advice. Verify requirements with the equipment manufacturer and the applicable authority before relying on it. Product names and trademarks belong to their respective owners.