Assigning a static IP address to your Windows PC means giving it a fixed, unchanging network address. While most home networks use DHCP to automatically assign IP addresses, there are times when a static IP is more practical — like hosting a server, managing network devices, or setting up port forwarding. This guide walks you through setting a static IP on both wired (Ethernet) and wireless (Wi-Fi) connections in Windows 10 and 11.
Why Use a Static IP Address?
DHCP is convenient for most users, but static IPs come with benefits in specific situations:
- Port Forwarding: Many applications (gaming servers, remote desktop, CCTV) need a fixed IP to route incoming traffic properly.
- Server Hosting: Keeps your local web, media, or file server reachable at the same address.
- Device Management: Makes accessing printers, NAS drives, or other hardware easier when they have fixed addresses.
- Troubleshooting: Simplifies identifying your device on the network.
What You Need to Know Before You Start
Setting a static IP requires some network details, so grab these first:
- An Available IP Address: Choose one within your router’s subnet but outside the DHCP range, and make sure it’s not in use.
- Subnet Mask: Usually 255.255.255.0.
- Default Gateway: This is typically your router’s IP, like 192.168.1.1.
- DNS Servers: Can be your router’s IP or public DNS like Google’s (8.8.8.8, 8.8.4.4) or Cloudflare’s (1.1.1.1, 1.0.0.1).
How to Find Your Current Network Info:
Open Command Prompt (Windows + R, type cmd, press Enter), then run:
bash
Copy
ipconfig /all
Look for your active network adapter and note the IPv4 address, subnet mask, gateway, and DNS servers.
Step 1: Open Network Adapter Settings
- Click the Start button and select the Settings gear icon (or press Windows + I).
- Click Network & Internet.
- Depending on your connection:
- For Ethernet (wired), click Ethernet on the left.
- For Wi-Fi (wireless), click Wi-Fi, then click your connected network’s name.
Step 2: Change IP Settings to Manual
- Scroll to IP assignment and click Edit (or “Change IP settings”).
- Switch from Automatic (DHCP) to Manual.
- Toggle IPv4 to On.
Step 3: Enter Static IP Details
Fill in the fields:
- IP address: Your chosen static IP (e.g., 192.168.1.50) — remember, it must be unused and within your subnet but outside the DHCP range.
- Subnet prefix length: Usually 24 (which corresponds to subnet mask 255.255.255.0).
- Gateway: Your router’s IP (e.g., 192.168.1.1).
- Preferred DNS: Your primary DNS server (router IP or public DNS).
- Alternate DNS: Optional but recommended for backup (another public DNS server).
Click Save.
Step 4: Verify Your Static IP Setup
- Open Command Prompt (Windows + R, type cmd, Enter).
- Run:
nginx
Copy
ipconfig
Confirm the IPv4 address matches your static IP, and subnet mask and gateway are correct.
- Test internet access by visiting websites or pinging:
nginx
Copy
ping 192.168.1.1
ping google.com
If pages load and pings succeed, your static IP is working correctly.
How to Switch Back to Automatic (DHCP)
If you want to revert to automatic IP assignment:
- Follow steps 1 and 2 above to access IP settings.
- Change IP assignment back to Automatic (DHCP).
- Save and verify your PC now gets an IP in the router’s DHCP range by running ipconfig again.
Setting a static IP can make your home or office network easier to manage, especially if you’re dealing with servers, gaming, or smart devices. Just remember to pick an unused address and keep a note of your network settings!