Networking

How do I connect a subnet mask?

Updated 2026-08-14

Quick answer

To connect a subnet mask, configure it in the network settings of your device, ensuring it matches the IP address range of your network.

This guide provides steps to configure a subnet mask on various devices, along with common questions and caveats.

Steps

  1. 1

    Windows

    Go to Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings. Right-click your network connection, select Properties, then select Internet Protocol Version 4 (TCP/IPv4) and click Properties. Enter your subnet mask in the 'Subnet mask' field.

  2. 2

    macOS

    Open System Preferences > Network. Select your network connection, click Advanced, then go to the TCP/IP tab. Enter your subnet mask in the 'Subnet Mask' field.

  3. 3

    Linux

    Edit the network configuration file (e.g., /etc/network/interfaces or /etc/netplan/*.yaml) to include the subnet mask under the relevant interface configuration.

  4. 4

    Router

    Access your router's web interface (usually via a browser at 192.168.1.1 or 192.168.0.1). Navigate to the LAN settings section and enter the subnet mask.

Understanding Subnet Masks

A subnet mask defines the network portion of an IP address. It is essential for routing traffic within a network.

Platform-Specific Steps

Follow the steps below based on your device type to configure the subnet mask.

Watch out for

  • Ensure the subnet mask you configure matches the IP address range of your network to avoid connectivity issues.
  • Changing the subnet mask may require reconfiguration of other network settings.

FAQ

What is the default subnet mask for a Class C network?

The default subnet mask for a Class C network is 255.255.255.0.

How do I find my current subnet mask?

You can find your current subnet mask by checking your network settings on your device or using the 'ipconfig' command in Command Prompt on Windows.

Can I use a custom subnet mask?

Yes, you can use a custom subnet mask as long as it fits within the IP address range of your network.