Devices in a subnetwork have IP addresses that begin with the same prefix. The length of this prefix is different for different devices—it depends on the network size, whose length is identified using the subnet mask.

While troubleshooting network issues, you must ensure that the subnet mask is correct. So, we'll share how to find and change the subnet in Windows 11.

How to Find the Subnet Mask in Windows 11

The easiest way to find the subnet mask in Windows 11 is through the Windows Command Prompt or Windows PowerShell. To find it using the Command Prompt, follow the steps below:

  1. Press the Win key to launch the Start Menu.
  2. In the search bar, type Command Prompt and choose the Run as administrator option from the right pane.
  3. In the elevated Command Prompt window, type ipconfig /all and press Enter. This command will display all the important details about the network your computer is connected to, including the subnet mask.
  4. Scroll and look for Subnet Mask. It'll be under the Wireless LAN adapter Wi-Fi section.
    Finding the Subnet mask in Command Prompt

The steps to do it using Windows PowerShell are similar to the Command Prompt. To do it, open Windows PowerShell with admin rights, type the ipconfig /all command, and press Enter.

In the result that appears, you can see the subnet mask under the Wireless LAN adapter Wi-Fi section.

How to Change the Subnet Mask in Windows 11

Now that you know how to find the subnet mask on your computer, let's check out how to change it.

1. Change the Subnet Mask Using the Windows Settings

The settings menu is the central hub of a Windows operating system. It's a place to configure different settings of your computer and manage the network. You can also use it to change the subnet mask.

Here's how to do it:

  1. Open the Windows Systems Settings menu, and choose Network & internet from the left panel.
  2. Select Wi-Fi, and then choose your network in the following window.
  3. Click the Edit button next to the IP assignment option.
    Edit button in the Settings menu
  4. In the prompt that crops up, click on the drop-down icon and choose Manual.
  5. Enable the toggle next to the IP version you're using.
  6. Enter the details, including the subnet mask, and click Save.
    Entering the new Subnet Mask in the Settings menu

2. Change the Subnet Mask Using the Control Panel

The Control Panel is the go-to place to configure window settings and make changes to your device. To use it to change the subnet mask, follow the below instructions:

  1. Press the Win key, type Control Panel in the search bar, and press Enter.
  2. Click the drop-down icon next to View by and choose Large icons.
  3. Choose Network and Internet, and then select Network and Sharing Center in the following window.
  4. Click on your network next to Connections.
    Network name in the Control Panel
  5. Choose Properties from the window that appears.
  6. Select the IP version you're using. For instance, if you're using IPv4, select Internet Protocol Version 4 (TCP/IPv4) and click the Properties button.
    IPv4 properties option in the Control Panel
  7. Select the Use the following address option and enter the details.
    Changing the Subnet Mask in the Control Panel
  8. Click OK to save the changes.

3. Change the Subnet Mask Using Windows PowerShell

Windows PowerShell is also one of the places from where you can change the subnet mask in Windows 11. Here's how to do it:

  1. Open Windows PowerShell with admin rights, type the following command, and press Enter. This command will display all the network adapters installed on your device.
            Get-NetAdapter -physical
        
  2. To change the subnet mask, type the following command and press Enter. Make sure to replace the "ifIndex Number" with the number associated with the network adapter whose subnet mask you want to change. And replace "subnet prefix length" with the new subnet prefix length you want.
            Set-NetIPAddress -InterfaceIndex (ifIndex Number) -PrefixLength (subnet prefix length)
        

For instance, if the ifIndex Number is 3 and the new subnet prefix length you want is 24, then the command will be:

        Set-NetIPAddress -InterfaceIndex 3 -PrefixLength 24
    
Command to change the subnet mask in PowerShell

Changing the Subnet Mask in Windows 11

The subnet mask helps to identify the network and the host bit of the IP address. If you want to find and change the subnet mask on your computer, you can do it using either of the above methods.

Meanwhile, you might be interested to know more about subnets and how to calculate them.