facebook How to Setup Static IP For Windows (IP, Gateway, DNS, Subnet)

How to Configure Static IP Address, Subnet Mask, Default Gateway, and DNS on Windows

How to Configure Static IP Address, Subnet Mask, Default Gateway, and DNS on Windows

If your network administrator or ISP has given you specific IP address, Subnet mask, Default gateway, and DNS server details, you need to configure them manually (static IP) instead of using DHCP. This is common in office networks, home labs, or when your router’s DHCP is disabled.

In this guide, we’ll use Windows 11/10 or Windows Server 2012, 2016, 2019, 2022, 2025 as the reference (steps are nearly identical on Windows 11). I’ll show you three methods:

  1. Graphical User Interface (easiest for beginners)
  2. Command Prompt (fast and scriptable)
  3. PowerShell (modern and powerful)

Important: Replace the example values below with your actual details:

  • IP Address: 192.168.1.100
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.1.1
  • Preferred DNS: 8.8.8.8
  • Alternate DNS: 8.8.4.4

  1. Right-click the Start button → Network Connections (or press Win + R, type ncpa.cpl and press Enter).
Jumpstart: Open The Network Connections Tab In Windows | Build5Nines
  1. Right-click your active adapter (Ethernet or Wi-Fi) → Properties.
  2. Select Internet Protocol Version 4 (TCP/IPv4)Properties.
  3. Choose Use the following IP address and fill in the details.
  4. Choose Use the following DNS server addresses and fill them in.
  5. Click OKOKClose.
How To Change IP Address in Windows 10: A Visual Guide

Windows applies changes instantly. Open a browser and test internet.


Method 2: Using Command Prompt (CMD)

  1. Right-click StartCommand Prompt (Admin).
  2. Identify your adapter name: netsh interface ipv4 show interfaces
  3. Set IP, Subnet, and Gateway: netsh interface ipv4 set address name="Ethernet" static 192.168.1.100 255.255.255.0 192.168.1.1
  4. Set DNS: netsh interface ipv4 set dns name="Ethernet" static 8.8.8.8 primary netsh interface ipv4 add dns name="Ethernet" 8.8.4.4 index=2
Show and Configure IPv4 on the Windows cmd Command Prompt with netsh (Set  IP Address) - Networking - Spiceworks Community

Show and Configure IPv4 on the Windows cmd Command Prompt with netsh (Set IP Address) – Networking – Spiceworks Community

  1. To Verify: ipconfig /all

Method 3: Using PowerShell (Modern & Script-Friendly)

  1. Right-click StartWindows PowerShell (Admin).
  2. Find your adapter: Get-NetAdapter
  3. Run this script (replace “Ethernet” if needed):
    $Adapter = "Ethernet"
    Set-NetIPInterface -InterfaceAlias $Adapter -Dhcp Disabled
    New-NetIPAddress -InterfaceAlias $Adapter -IPAddress 192.168.1.100 -PrefixLength 24 -DefaultGateway 192.168.1.1
    Set-DnsClientServerAddress -InterfaceAlias $Adapter -ServerAddresses ("8.8.8.8","8.8.4.4")
Configuring Network Adapter TCP/IP Settings using Powershell 4.0 Cmdlets .  – Chinny Chukwudozie, Cloud Solutions.
  1. To Verify: ipconfig /all

How to Verify Everything Works

Run ipconfig /all — you should see your static IP, subnet, gateway, and DNS.

How to set static IP address on Windows 10 - Pureinfotech

Then open a browser and visit google.com.


Common Troubleshooting Tips

  • IP conflict? Ping the address from another device.
  • Wrong adapter name? Use the commands above to check.
  • No DNS? Try Google DNS (8.8.8.8 / 8.8.4.4).
  • Restart PC/router if needed.

Conclusion

Configuring static network details on Windows 10 is quick and reliable with any of these methods. The GUI is beginner-friendly, while CMD and PowerShell are perfect for automation.

Save this guide — it’s a lifesaver for network admins and power users!

Got questions? Drop a comment below.

Happy networking! 🚀