Skip to content
Home » How to Set a Static IP Address in Windows 11 and 10 (For File Sharing, Port Forwarding, and Remote Access)

How to Set a Static IP Address in Windows 11 and 10 (For File Sharing, Port Forwarding, and Remote Access)

How to Set a Static IP Address in Windows pc

A dynamic IP address works fine if you only browse the web. But the moment you start sharing files on your LAN, forwarding ports on your router, or using Remote Desktop, you quickly realize: every time Windows gets a new local IP, your configuration breaks. That’s where a static IP address on your local network becomes important. Once you assign a fixed IP to your Windows PC, your router, NAS, and other devices always know where to find it. This article explains how to configure a static IP address on Windows 10 and Windows 11, using Settings, Control Panel, and Command Prompt.

Static vs dynamic IP on your local network (quick explanation)

Before we change any settings, it helps to quickly understand what we’re changing.

On a typical home or office network, your router has a DHCP server. Its job is to automatically give every device an IP address, usually something like 192.168.1.10, 192.168.1.11, and so on. These are dynamic IP addresses:

  • They are assigned automatically by the router.
  • They can change when you restart the router, restart your PC, or after a lease time expires.

A static IP address on your LAN is simply an address that doesn’t change until you manually change it. You either:

  • Reserve it in the router’s DHCP settings, or
  • Set it directly on the device (which is what we’re doing in this guide).

The key difference for you as a Windows user is predictability:

  • With a dynamic IP, today your PC might be 192.168.1.15, Tomorrow it might be 192.168.1.27.
  • With a static IP, your PC is always 192.168.1.100 (for example), So port forwarding, file sharing, and Remote Desktop rules don’t break.

We are not changing your public IP from your ISP here. We are only fixing the local (private) IP address that your Windows 10/11 machine uses inside your network.

When you should use a static IP on Windows

On a home or small office network, a static IP on your Windows PC is useful when:

  • You enable port forwarding on your router for a game server or remote access tool.
  • You use Remote Desktop to connect to this PC from another system.
  • You share files or printers and want other PCs to always reach this machine at the same address.
  • You run local services (web server, FTP, database, media server, etc.) on this PC.

In all these cases, if the router’s DHCP server keeps changing your PC’s IP, you’ll constantly update settings. A static IP fixes that.

Note: In this article, we are talking about local (private) IP addresses like 192.168.x.x or 10.x.x.x, not public IPs from your ISP.

Understand your current network layout

Before you change anything, you should see how your network is currently configured. Otherwise, it’s very easy to pick an IP that doesn’t belong to your subnet or that conflicts with another device.

Check via Command Prompt

  1. Press Windows + R, type cmd and press Enter.
  2. In Command Prompt, run: ipconfig /all
  3. Find your active adapter:
    • If you use a network cable, look for an Ethernet adapter.
    • If you’re on Wi‑Fi: look for Wireless LAN adapter Wi‑Fi.
  4. Note down these values:
    • IPv4 Address – for example 192.168.1.23
    • Subnet Mask – often 255.255.255.0 on home networks
    • Default Gateway – usually your router, for example 192.168.1.1
    • DNS Servers – might be your router or a public DNS like 8.8.8.8

These values tell you which network you are on and what range of IPs is valid.

Command to check IP and network configuration details

Choose a safe static IP for your PC

Now, you need to choose a static IP that:

  1. Is in the same subnet as your router.
  2. Is not used by any other device.
  3. Ideally sits outside the DHCP pool used by your router.

Example: Typical home network

Suppose ipconfig /all shows:

  • IPv4 Address: 192.168.1.23
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.1.1

That usually means:

  • Your network is 192.168.1.x.
  • Any IP from 192.168.1.2 to 192.168.1.254 is technically valid.

Most routers have a DHCP range, for example:

  • DHCP range: 192.168.1.2192.168.1.50

To avoid conflict with DHCP, you can manually choose something higher, such as:

  • 192.168.1.100
  • 192.168.1.150

If you can log into your router, check the LAN/DHCP settings page to see the exact range.

Tip: Never use the router IP (usually 192.168.1.1) for a PC. Don’t use addresses you know belong to other devices (like a NAS or printer).

You will now use this chosen address in the next steps.

Set a static IP in Windows 10 and 11 (Settings method)

Windows 10 and Windows 11 both allow you to configure a static IP Address from the Settings app. The UI is slightly different, but the logic is the same.

Windows 11

  1. Open Settings from the Start menu.
  2. Click Network & Internet.
  3. Click Ethernet or Wi‑Fi, depending on your connection.
  4. Click your active network connection.
  5. Scroll down to IP assignment and click Edit.
  6. Change the setting from Automatic (DHCP) to Manual.
  7. Turn IPv4 On.
  8. Enter:
    • IP address: For example 192.168.1.100
    • Subnet mask: For most home networks 255.255.255.0
    • Gateway: Your router IP, e.g. 192.168.1.1
    • Preferred DNS: 8.8.8.8 or router IP
    • Alternate DNS: 8.8.4.4 or 1.1.1.1 (optional)
  9. Click Save.

Windows will briefly disconnect and reconnect using the new static IP.

setup static ip on windows 11

Windows 10

  1. Press Windows + I to open Settings.
  2. Go to Network & Internet.
  3. In the left pane, select Ethernet (for wired) or Wi‑Fi (for wireless).
  4. Click on your active network connection.
  5. Scroll to IP settings and click Edit.
  6. In the drop‑down, change Automatic (DHCP) to Manual.
  7. Turn IPv4 On.
  8. Fill in the fields:
    • IP address: The static IP you chose, for example 192.168.1.199
    • Subnet prefix length: For 255.255.255.0, use 24
    • Gateway: Your router’s IP, for example 192.168.1.1
    • Preferred DNS: Either your router (192.168.1.1) or a public DNS like 8.8.8.8
    • Alternate DNS: Optional – for example 8.8.4.4
  9. Click Save.
Setup static IP address on Windows 10

To confirm, open Command Prompt again and run:

ipconfig

Check that the IPv4 Address now shows the static IP you set.

Set a static IP using Control Panel (classic method)

If you prefer the old‑style network dialog, or you’re used to Windows 7/8 guides, you can still use Control Panel in both Windows 10 and 11.

  1. Open Control Panel (search for it from Start).
  2. Go to Network and InternetNetwork and Sharing Center.
  3. On the left, click Change adapter settings.
  4. Right‑click your active adapter (Ethernet or Wi‑Fi) and select Properties.
  5. Click Internet Protocol Version 4 (TCP/IPv4), then click Properties.
  6. Select Use the following IP address.
  7. Enter:
    • IP address: e.g. 192.168.1.100
    • Subnet mask: e.g. 255.255.255.0
    • Default gateway: e.g. 192.168.1.1
  8. Under Use the following DNS server addresses, enter:
    • Preferred DNS server: e.g. 8.8.8.8 or your router IP
    • Alternate DNS server: e.g. 8.8.4.4
  9. Click OK, then Close.

This approach does exactly the same thing as the Settings method; it just uses the older UI.

Configure a static IP via Command Prompt (advanced)

For power users, netsh lets you script IP changes or configure multiple machines quickly.

1 Find the interface name

  1. Open Command Prompt as administrator.
    • Type cmd in Start, right‑click Command Prompt, choose Run as administrator.
  2. Run: netsh interface ipv4 show interfaces
  3. Note the Name of the adapter you want to configure. It’s usually something like Ethernet or Wi-Fi.
note down the IP config details

2 Set the static IP

Use this syntax:

netsh interface ip set address name="InterfaceName" static IP SubnetMask Gateway

Example:

netsh interface ip set address name="Ethernet" static 192.168.1.100 255.255.255.0 192.168.1.1

This tells Windows:

  • Set the IPv4 address to 192.168.1.100
  • Use subnet mask 255.255.255.0
  • Use the default gateway 192.168.1.1

3 Configure DNS servers

To set the primary DNS server:

netsh interface ip set dns name="Ethernet" static 8.8.8.8
Assign static IP address using Command Prompt

To add a secondary DNS server:

netsh interface ip add dns name="Ethernet" 8.8.4.4 index=2

You can verify the result with ipconfig /all.

Revert back to automatic IP (DHCP)

If you run into problems, or you just don’t need the static IP anymore, you can switch back to DHCP.

From Settings

  • In Windows 10 or Windows 11 go to:
    Settings → Network & Internet → [Ethernet/Wi‑Fi] → your active connection.
  • Under IP assignment, click Edit.
  • Change Manual back to Automatic (DHCP).
  • Click Save.

From Control Panel

  1. Open Network and Sharing Center, then select Change adapter settings.
  2. Right‑click your adapter → Properties.
  3. Select Internet Protocol Version 4 (TCP/IPv4)Properties.
  4. Select Obtain an IP address automatically and Obtain DNS server address automatically.
  5. Click OK.

From Command Prompt

netsh interface ip set address name="Ethernet" dhcp
netsh interface ip set dns name="Ethernet" dhcp

After a few seconds, run ipconfig to confirm that the address is coming from DHCP again.

Common problems after setting a static IP (and fixes)

After changing network settings, you may encounter issues such as no internet access, IP conflicts, or problems limited to Wi‑Fi or Ethernet. Most of these problems are caused by an incorrect gateway, an incorrect subnet, or an IP address already used by another device.

1. No internet access

If the network icon shows “No internet” or websites don’t load:

  • Double‑check the Gateway. It must exactly match your router IP.
  • Confirm the Subnet mask matches your router’s LAN settings.
  • Try switching DNS to a known public DNS like 8.8.8.8 or 1.1.1.1.

You can test connectivity by running:

ping 8.8.8.8
ping google.com

If ping to 8.8.8.8 works but google.com fails, it’s a DNS problem.

2. IP address conflict warning

If Windows shows anIP address conflict notification, another device is already using that IP address.

  • Temporarily revert your adapter to DHCP, see what IP it gets, and pick another static address far away from that.
  • Or check your router’s DHCP client list to see which addresses are in use and choose a free one.

3. Works on Ethernet but not on Wi‑Fi

Ethernet and Wi‑Fi are separate adapters. If you use both, they each need their own configuration.

  • If you set a static IP address on Ethernet, Wi‑Fi may still use DHCP.
  • Repeat the steps for whichever adapter you actually use.

Frequently Asked Questions

Do I need a static IP on both Windows 10 and my router?

You don’t have to, but it’s often helpful. In this guide we set a static local IP on your Windows 10/11 PC. Many routers also let you create a DHCP reservation, which permanently ties a device’s MAC address to the same IP. Both approaches give you a fixed address; using the router reservation is usually cleaner in larger networks.

Will setting a static IP on Windows change my public IP address?

No. The steps in this article only change your private (LAN) IP address inside your home or office network, such as 192.168.1.100. Your public IP from your ISP remains the same and is still controlled by your router and your provider.

Is a static IP address faster than a dynamic IP?

A static IP does not directly make your internet connection faster. Your download and upload speeds depend on your ISP plan and network quality. The benefit of a static IP is stability and predictability for services like port forwarding, Remote Desktop, and file sharing.

Is it safe to use a static IP on my Windows PC?

Using a static IP on your local network is generally safe as long as you keep Windows Firewall enabled, install security updates, and avoid exposing unnecessary ports to the internet. The real risk comes from insecure services you expose via port forwarding, not from the static IP itself.

What IP address should I use for a static IP in Windows 10 or 11?

Choose an address in the same subnet as your router (for example, 192.168.1.x if your router is 192.168.1.1) but outside the DHCP range. A common choice is something like 192.168.1.100 or 192.168.1.150. Always make sure no other device is already using this address to avoid IP conflicts.

Robeg

I am Robeg founder of this blog. My qualification. completed Bachelor of Arts (BA) and Microsoft Certified Professional (MCP). With a strong background in computer applications love write articles on Microsoft Windows (11, 10, etc.) Cybersecurity, WordPress and more.