Why DHCP Isn't Good Enough for a Server
By default your router hands out addresses dynamically via DHCP, leasing an IP to each device for a fixed period and reassigning it later — possibly to a different device — once the lease expires. That's fine for phones and laptops that move around, but it's a problem for anything you depend on having a fixed address: a home server, a NAS, a Plex box, or anything you SSH into or forward router ports to. If the DHCP lease renews and the device gets handed a different IP, your port forwards silently start pointing at nothing and your SSH shortcuts stop connecting. Pinning the address solves this permanently.
There are two ways to do it: configure a static IP directly on the server's network adapter, or configure a DHCP reservation on the router that always hands that device the same address. The reservation approach is generally the better one — it keeps all your IP assignments visible and managed in one place — but both are covered here.
Before You Start: Pick an IP Outside the DHCP Pool
Check your router's DHCP settings (usually under LAN or DHCP Server in the admin panel) to see its lease range — commonly something like 192.168.1.100 to 192.168.1.200. Choose an address outside that range, such as 192.168.1.50, so the router can never accidentally hand your chosen IP to a different device. You'll also need your subnet mask (almost always 255.255.255.0 on a home network), your default gateway (your router's IP, e.g. 192.168.1.1), and a DNS server (your router's IP again, or a public resolver like 1.1.1.1).
Method 1: Static IP via Windows Settings
- Open Settings → Network & Internet, then click your active connection (Ethernet or Wi-Fi).
- Under IP assignment, click Edit.
- Change the dropdown from Automatic (DHCP) to Manual.
- Toggle IPv4 on and fill in:
- IP address: the address you chose, e.g.
192.168.1.50 - Subnet mask:
255.255.255.0 - Gateway: your router's IP, e.g.
192.168.1.1 - Preferred DNS:
192.168.1.1or1.1.1.1
- IP address: the address you chose, e.g.
- Click Save.
Method 2: Static IP via netsh (Scriptable)
If you're setting this up on a headless server or want it reproducible, do it from an elevated Command Prompt. First find the exact adapter name:
netsh interface show interface
Then assign the static configuration, substituting your own values and adapter name:
netsh interface ip set address name="Ethernet" static 192.168.1.50 255.255.255.0 192.168.1.1
netsh interface ip set dns name="Ethernet" static 1.1.1.1
Method 3: DHCP Reservation on the Router (Recommended)
This achieves the same result without touching the server's own network settings at all — the server keeps requesting DHCP normally, and the router always answers with the same address because it recognizes the device's MAC address.
- Find the server's MAC address: on Windows, run
ipconfig /alland look for Physical Address under the relevant adapter. - Log into your router's admin panel (commonly
192.168.1.1or192.168.0.1in a browser). - Find DHCP Reservation, Address Reservation, or Static Leases — the naming varies by vendor but every consumer router has some version of this.
- Add a new reservation: paste the MAC address, assign your chosen IP (again, outside the dynamic pool, or the router may let you reserve within it — check your vendor's behavior), and save.
- Reboot the server, or release/renew its lease with
ipconfig /releasethenipconfig /renew(elevated Command Prompt), to pick up the reservation immediately.
Verifying It Worked
Run ipconfig on the server and confirm the IPv4 Address matches what you configured. From another device on the network, confirm it's reachable and stable:
ping -t 192.168.1.50
Reboot the server once and check the address again — if it changed, the reservation or static config didn't take, and it's worth double-checking the MAC address you entered matches the actual adapter in use (not a virtual adapter if the machine runs Hyper-V or WSL, which each get their own MAC).
Wrap-Up
Either method gets you a stable address, but a DHCP reservation is the lower-maintenance choice for anything long-lived, since it survives OS reinstalls and network resets without reconfiguration. Once the address is locked in, your port forwards, SSH configs, and any hardcoded connection strings will keep working indefinitely instead of breaking every time a lease renews.
Discussion & Insights