sodcalculator

10 Tech How-To

How to Change the Subnet Mask in Windows 10 & 11

Guide 10-55941 · Updated · Step by step

Changing the subnet mask in Windows 10 or 11 lets you control how your computer communicates with other devices on your local network. You might need to do this when setting up a custom network, connecting to a router with a different subnet, or troubleshooting connectivity issues. This guide walks you through the process in both operating systems, which share nearly identical steps.

What You’ll Need

  • Administrator access to the Windows computer (you’ll need to confirm a User Account Control prompt).
  • The new subnet mask you intend to use, typically in dotted decimal format like 255.255.255.0 or 255.255.0.0. Your network administrator or ISP can provide this.
  • If you’re changing it on a Wi-Fi or Ethernet adapter, know which adapter is active (e.g., “Ethernet” or “Wi-Fi”).

Step-by-Step

  1. Open Network Settings. Right-click the network icon in the system tray (bottom-right corner of the taskbar) and select Network & Internet settings. Alternatively, press Windows + I to open Settings, then go to Network & Internet.
  2. Access Adapter Options. In the Settings window, click Advanced network settings (Windows 11) or Change adapter options (Windows 10). This opens the Network Connections window.
  3. Open Adapter Properties. Right-click the network adapter you’re using (e.g., “Ethernet” or “Wi-Fi”) and select Properties. If prompted by User Account Control, click Yes.
  4. Select Internet Protocol Version 4 (TCP/IPv4). In the list of items, scroll down and click on Internet Protocol Version 4 (TCP/IPv4) to highlight it. Do not uncheck it. Then click the Properties button below the list.
  5. Enter the New Subnet Mask. In the Properties dialog, you’ll see two options: Obtain an IP address automatically and Use the following IP address. If you’re using a static IP, the fields are already active. If you’re using DHCP but want to override just the subnet mask, select Use the following IP address—you’ll need to enter the IP address, subnet mask, and default gateway. If you only need to change the subnet mask while keeping DHCP for the IP, you’ll have to enter a static IP as well; Windows doesn’t allow a separate DHCP subnet mask override.
  6. Type the Subnet Mask. In the Subnet mask field, type the new mask (e.g., 255.255.255.0). Ensure you type it correctly; Windows will not accept an invalid mask like 255.255.255.1.
  7. Apply and Close. Click OK on both open dialogs to save changes. Windows will briefly disconnect the network adapter and reconnect with the new settings.
  8. Verify the Change. To confirm, open Command Prompt (press Win + R, type cmd, press Enter) and run ipconfig. Look for your adapter and check the Subnet Mask line.

Common Mistakes

  • Entering an invalid subnet mask. Windows validates the mask. Common valid masks include 255.255.255.0, 255.255.0.0, and 255.0.0.0. Avoid arbitrary numbers like 255.255.255.1.
  • Changing the mask on the wrong adapter. If you have both Ethernet and Wi-Fi, make sure you’re editing the one that’s actively connected.
  • Losing network access. If the new mask is incompatible with your router’s subnet, you’ll lose connectivity. For example, if your router uses 192.168.1.x with a mask of 255.255.255.0, changing to 255.255.0.0 might still work, but changing to 255.255.255.128 will break it.
  • Forgetting the default gateway. When switching to a static IP, you must also enter the default gateway (usually your router’s IP). Leaving it blank can cause internet issues.

Tips

  • Back up current settings. Before changing anything, note down your current IP, subnet mask, and gateway. You can get these by running ipconfig in Command Prompt.
  • Use PowerShell as an alternative. If you prefer command line, you can set the subnet mask with New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.1.10 -PrefixLength 24. The prefix length (e.g., 24) corresponds to a subnet mask (255.255.255.0).
  • Understand prefix length. Subnet masks are often expressed as a prefix length (e.g., /24). A /24 equals 255.255.255.0, /16 equals 255.255.0.0, and /8 equals 255.0.0.0. You can calculate the mask from the prefix length using a subnet calculator.
  • Test connectivity. After changing, try pinging another device on the network to verify the new mask works.

Troubleshooting

If you lose network access immediately after changing the subnet mask, the most likely cause is an incorrect mask or gateway. Here’s what to do:

  • Revert to automatic settings. Go back to the IPv4 properties and select Obtain an IP address automatically and Obtain DNS server address automatically. Click OK and see if connectivity returns. If it does, your manual settings were wrong.
  • Check the gateway. Ensure the default gateway matches your router’s IP. For example, if your router is at 192.168.1.1, the gateway should be 192.168.1.1, and the subnet mask should be 255.255.255.0 for a typical home network.
  • Run Windows Network Diagnostics. Right-click the network icon in the system tray and select Troubleshoot problems. Windows will attempt to diagnose and fix common issues.
  • Restart the adapter. In the Network Connections window, right-click your adapter and select Disable, then Enable. This forces a fresh connection attempt.
  • Use Command Prompt to reset. Open Command Prompt as administrator and run ipconfig /release followed by ipconfig /renew to get a new IP from DHCP.
  • Check for multiple adapters. If you have virtualization software (like VirtualBox or VMware), it may create virtual adapters that interfere. Temporarily disable them in the Network Connections window to isolate the issue.

Frequently Asked Questions

Can I change the subnet mask without a static IP?

No, Windows requires you to set a static IP if you manually change the subnet mask. You can’t override the subnet mask while keeping DHCP for the IP address.

What is the default subnet mask for a home network?

Most home routers use 255.255.255.0 (a /24 network), which allows up to 254 devices.

Will changing the subnet mask affect my internet connection?

Yes, it can. The subnet mask determines which devices are considered local. If you set it incorrectly, your computer may not be able to reach the router, cutting off internet access.

How do I find my current subnet mask?

Open Command Prompt and type ipconfig. Look for the Subnet Mask line under your active adapter.

What does a subnet mask like 255.255.255.0 mean?

It means the first three octets (255.255.255) identify the network, and the last octet (0) identifies the host. This is a /24 network, supporting up to 254 hosts.

Can I use a subnet mask with a non-standard value?

Yes, but it must be a valid mask. Windows will reject invalid ones. For advanced setups, you might use a custom mask, but ensure it’s correctly calculated to avoid connectivity issues.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →