The default subnet mask is 255.0.0.0 (/8) for Class A, 255.255.0.0 (/16) for Class B, and 255.255.255.0 (/24) for Class C. A mask is a 32-bit number of ones followed by zeros: ones mark the network part and zeros mark the host part. Modern networks use CIDR prefixes such as /24 instead, but defaults still appear in exams, router settings and home networks.
Key takeaways
- Class A defaults to 255.0.0.0 (/8), Class B to 255.255.0.0 (/16) and Class C to 255.255.255.0 (/24).
- A subnet mask splits an IPv4 address into a network part and a host part using a bitwise AND operation.
- CIDR replaced classful addressing in 1993, so always check the actual prefix length instead of guessing from the first octet.
Every device on an IPv4 network has two numbers that work together: its IP address and its subnet mask. The address says who the device is. The mask says which part of that address is the network and which part is the individual host.
What is the default subnet mask?
The default subnet mask is the mask a network uses when it has not been divided into smaller subnets. For Class A it is 255.0.0.0, for Class B it is 255.255.0.0, and for Class C it is 255.255.255.0.
These three values are also called natural masks or classful masks. They come from the original classful design of IPv4, in which the first octet of an address decided how many bits belonged to the network and how many belonged to hosts.
A subnet mask is a 32-bit number made of a run of ones followed by a run of zeros. Each 255 means eight ones, and each 0 means eight zeros. So 255.255.255.0 is 24 ones followed by 8 zeros, which is why it is written as /24.
| Class | First octet | Default subnet mask | CIDR | Usable hosts |
|---|---|---|---|---|
| A | 1–126 | 255.0.0.0 | /8 | 16,777,214 |
| B | 128–191 | 255.255.0.0 | /16 | 65,534 |
| C | 192–223 | 255.255.255.0 | /24 | 254 |
| D | 224–239 | None (multicast) | — | — |
| E | 240–255 | None (reserved) | — | — |
If you only remember one row, remember Class C. Most home and small-office networks use 192.168.x.x addresses with 255.255.255.0, so it is the mask most people meet first.
How does a subnet mask work?
A subnet mask works by a bitwise AND operation between the IP address and the mask. Bits where the mask has a 1 stay as the network address, and bits where the mask has a 0 become the host address.
Take 192.168.1.10 with mask 255.255.255.0. The AND operation keeps the first three octets, 192.168.1, as the network, and leaves the last octet, 10, as the host. Two devices are on the same local network only if this operation gives the same network address for both.
That test is what a device uses every time it sends a packet. If the destination is on the same network, it sends the packet directly. If not, it sends the packet to its default gateway, usually your router. You can check your own public address with our what is my IP tool.
What is the Class A default subnet mask?
The Class A default subnet mask is 255.0.0.0, or /8. Class A addresses start with a first octet from 1 to 126, and only the first octet identifies the network.
That leaves 24 bits for hosts, which is 16,777,216 addresses in total. Two are unusable: the all-zero host address is the network address and the all-ones host address is the broadcast address, leaving 16,777,214 usable hosts.
Class A networks were meant for very large organizations. Only 126 of them exist, and most were handed out decades ago to large companies and government bodies. The address 127.0.0.1 is loopback, not a normal Class A network, which is why the range stops at 126.
What is the Class B default subnet mask?
The Class B default subnet mask is 255.255.0.0, or /16. Class B addresses start with a first octet from 128 to 191, and the first two octets identify the network.
That leaves 16 bits for hosts, or 65,536 addresses in total and 65,534 usable hosts after removing the network and broadcast addresses. There are 16,384 Class B networks.
Class B was designed for medium-sized organizations such as universities and mid-sized companies. In practice, many Class B networks were too large for their owners and too small for others, which is one reason classful addressing was abandoned.
What is the Class C default subnet mask?
The Class C default subnet mask is 255.255.255.0, or /24. Class C addresses start with a first octet from 192 to 223, and the first three octets identify the network.
That leaves 8 bits for hosts, or 256 addresses in total and 254 usable hosts. There are 2,097,152 Class C networks, which made them the natural size for small networks.
Most home routers hand out 192.168.0.x or 192.168.1.x addresses with this mask. If your network has more than 254 devices, a /24 is too small and you need a shorter prefix such as /23, which covers 512 addresses.
Why did CIDR replace default subnet masks?
CIDR, Classless Inter-Domain Routing, replaced classful addressing because fixed classes wasted addresses. A company needing 300 hosts had to take a Class B network with 65,534 addresses, wasting almost all of them.
CIDR lets a network use any prefix length, such as /25 for 128 addresses or /23 for 512 addresses, instead of only /8, /16 or /24. Routers then carry the prefix with the address, for example 192.168.1.0/24, so no device has to guess the mask from the first octet.
RFC 950, published in August 1985, defined the original subnetting procedure with address masks, as RFC 950 describes. Classful defaults were already fading by 1993, when CIDR was introduced, but the terms Class A, B and C survive in training, documentation and default device settings, as Global Knowledge explains.
The practical rule today is simple: never assume the mask from the first octet. Read the prefix length your DHCP server, router or cloud console actually assigns. A 10.x.x.x address, which looks Class A, is often used with a /24 or /16 mask in a private network.
What are the default masks for private IP addresses?
Private addresses use the same classful defaults as public ones, but they are not routed on the public internet. The three private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
In practice, a home network usually uses 192.168.0.0/24 or 192.168.1.0/24 with mask 255.255.255.0. A larger office might use 10.0.0.0/24 for one floor and 10.0.1.0/24 for another, even though 10.x.x.x is a Class A range with a /8 default.
That mismatch is normal and safe, as long as every device on the same subnet agrees on the same mask. When two devices disagree, one may think the other is local while the other thinks it is remote, and traffic fails in confusing ways.
How do I find my subnet mask?
Your subnet mask is shown in your device network settings, next to your IP address and gateway. It is usually assigned automatically by DHCP, so you rarely need to set it by hand.
- Windows: open Command Prompt and run
ipconfig. Read the Subnet Mask line under your active adapter. - Mac: open System Settings, then Network, select your connection, and open Details to see the subnet mask.
- Linux: run
ip addrin a terminal. The number after the slash, such as /24, is the CIDR form of your mask. - Router: log in to your router admin page and look at the LAN or DHCP settings, where the mask is shown for the whole network.
- Phone: on iPhone or Android, open Wi-Fi settings, tap your connected network, and read the subnet mask or prefix length.
If you are troubleshooting, compare the mask on two devices that cannot reach each other. A wrong mask is a common cause of devices that can reach the internet but not each other, or the reverse. Our guide to how to secure your Wi-Fi covers the router settings that sit next to these values.
What mistakes do people make with subnet masks?
The most common mistakes are guessing the mask from the first octet, forgetting the network and broadcast addresses, and using a mask that is too small for the number of devices.
- Guessing from the first octet: a 10.0.0.5 address does not automatically use 255.0.0.0. Check the assigned prefix.
- Counting 256 hosts on a /24: only 254 are usable. The .0 address is the network and .255 is broadcast.
- Mixing masks on one subnet: devices with different masks disagree about what is local, which breaks local traffic.
- Using /24 for a large site: a network with 300 devices needs at least a /23, not a /24.
- Confusing mask and gateway: the mask defines the local network; the gateway is the router that forwards traffic elsewhere.
The bottom line
The default subnet mask is 255.0.0.0 for Class A, 255.255.0.0 for Class B and 255.255.255.0 for Class C. Those three numbers tell a device where its network ends and its hosts begin.
In real networks, use the prefix length you are actually given, not the classful default. Check your settings, count usable hosts as total addresses minus two, and keep every device on a subnet on the same mask. You can verify your public address and DNS setup with the free DNS lookup tool.
Frequently asked questions
What is the default subnet mask for Class C?
The default subnet mask for Class C is 255.255.255.0, written as /24 in CIDR notation. It leaves 8 host bits, giving 256 addresses in total and 254 usable host addresses, because the first address is the network address and the last is the broadcast address.
What is the default subnet mask for Class A?
The default subnet mask for Class A is 255.0.0.0, written as /8. It leaves 24 host bits, giving 16,777,216 addresses and 16,777,214 usable hosts per network. Class A addresses start with a first octet from 1 to 126.
What is the default subnet mask for Class B?
The default subnet mask for Class B is 255.255.0.0, written as /16. It leaves 16 host bits, giving 65,536 addresses and 65,534 usable hosts per network. Class B addresses start with a first octet from 128 to 191.
What is the default subnet mask for 192.168.1.0?
The address 192.168.1.0 is a Class C private address, so its classful default mask is 255.255.255.0 (/24). In practice, check the mask your router or DHCP server actually assigns, because a home or office network can use a different prefix such as /23 or /25.
Is 255.255.255.0 always the default subnet mask?
No. It is the default only for Class C addresses, which start with 192 to 223 in the first octet. It is also the most common mask on home networks, which is why many people see it everywhere, but a Class A or Class B network has a different default.
What is the difference between a subnet mask and CIDR notation?
A subnet mask and CIDR notation describe the same thing in different forms. The mask 255.255.255.0 means the first 24 bits are ones, so CIDR writes it as /24. CIDR is shorter and can describe any prefix length, including /25 or /23, which classful masks cannot.
Do Class D and Class E have default subnet masks?
No. Class D addresses from 224.0.0.0 to 239.255.255.255 are for multicast groups, not for assigning to hosts, and Class E addresses from 240.0.0.0 to 255.255.255.255 are reserved for experimental use. Neither has a default subnet mask.
How do I find my subnet mask on Windows or Mac?
On Windows, run ipconfig in Command Prompt and read the Subnet Mask line for your adapter. On a Mac, open System Settings, then Network, select your connection and look at the subnet mask in the details. On Linux, run ip addr and read the prefix after the slash, such as /24.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against RFC 950, the Internet Standard Subnetting Procedure, and vendor IP addressing documentation.
How we write and fact-check →