Date First Published: 9th May 2022
Topic: Computer Networking
Subtopic: Network Identifiers
Article Type: Computer Terms & Definitions
Difficulty: AdvancedDifficulty Level: 9/10
Learn more about what a subnet mask is in this article.
A subnet mask, also known as a netmask, is a 32-bit binary number that identifies the portion of IPv4 addresses that are available in a network. For example, in a Class C network, 255.255.255.0 is the default subnet mask. Subnet masks 'mask' (hide) the host within a network and the last string can contain a number that ranges from 1 to 254. In a subnet mask of 255.255.255.0, the IP addresses 212.123.123.55 and 212.123.123.60 would be in the same subnet, but 213.123.123.0 wouldn’t be.
A subnet mask of 255.255.255.0 means that the first three strings of numbers are full. This means that the IP addresses of devices must stay the exact same in the first three strings of numbers. The last string of the IP address can range from 1 to 254.
The subnet mask '255.255.255.0' allows for up to 254 unique hosts. The reason why it does not allow for up to 256 unique hosts is that two of these numbers are always preassigned and unavailable for custom assignment. The last '255' is the assigned broadcast address and '0' is the assigned network address.
Large networks with hundreds or even thousands of hosts use a different subnet mask that allows for much more unique hosts. For example, 255.255.0.0 is the default subnet mask in Class B networks that allows for up to 65,534 hosts, since 256 x 256 = 65,536. Since two of these numbers are unavailable for custom assignment, there would be 65,534 unique hosts that can be created using a Class B network.
In a Class B network, the first half of the address (16 bits) identifies the network and the second half (remaining 16 bits) identifies the host within the network, making it possible for up to 16,384 networks to be created. This is because there are 64 available numbers in the first string and 256 available numbers in the second string and 64 x 256 = 16,384. The number '127' is reserved for loopback and testing purposes. 16,384 is equal to 25% of the total IPv4 address space.
Class A networks allow for even more unique hosts than Class B networks. For example, a Class A IP address, such as 123.0.0.0 has an extra '0' that allows for up to 16,777,214 IP addresses, since 256 x 256 x 256 = 16,777,216. Since two of these numbers are unavailable for custom assignment, there would be 16,77,216 unique hosts that can be created using a Class A network. The default subnet mask of a Class A network is 255.0.0.0.
The first 8 bits identify the network and the remaining 24 bits identify the host within the network, making it possible for up to 126 Class A networks to be created. Binary addresses start with 0, meaning that the IP address can range from 1 to 126.
No, IPv6 does not have subnet masks. Instead, it has a prefix-length. The prefix-length defines how many bits of the address are available in the network.
On Windows, the subnet mask can be viewed by opening Command Prompt as administrator and typing 'ipconfig/all' without the quotes. The 'Subnet mask' property is the subnet mask. 255.255.255.0 is the most common subnet mask for home networks.
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection