Labor Day starts with $70+ in savings on Coursera Plus. Save 40% for 3 months.
Subnet masks produce more efficient networking and routing by creating subnets. In this article learn more about what subnets are and what they are used for.
![[Featured image] An IT support specialist is researching subnet masking on their phone while standing outside.](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://images.ctfassets.net/wp1lcwdav1p1/5MdONZS0V0n0GKbrkwZMKp/310fe09aa47eb73cf1f73f1a6cffb59c/u0vMT8PL-converted-from-jpeg.webp?w=1500&h=680&q=60&fit=fill&f=faces&fm=jpg&fl=progressive&auto=format%2Ccompress&dpr=1&w=1000)
In an IP address, a subnet mask is a number, structured like an IP address, that divides a large network into smaller subnets.
If you are using your home network, your subnet mask is likely 255.255.255.0, as IPv4 networks typically use it.
The subnet mask is used for dividing large networks into subnets, enabling a more efficient process for assigning IP addresses that doesn’t waste network space.
A network systems administrator typically performs the subnetting process. Discover more about the subnet mask, including what it is, its uses in subnetting, and related terms. If you're ready to begin developing your networking skill set, enroll in the Akamai Network Engineering Professional Certificate. In as little as three months, you can learn about network security, relational databases, Linux administration, Linux protocols, and more.
A subnet mask separates large networks into smaller subnets. Every internet protocol (IP) address has a network prefix and a host number. In an IP address, a subnet mask is a number structured like an IP address that shows the start of the host number in the IP address. Before the use of classless inter-domain routing (CIDR) in 1993, there were only three subnet masks used with the three main IP (IPv4) address classes. Class-based routing breaks down like this:
Class A: Network prefix of 8 bits; host number of 24 bits
Class B: Network prefix of 16 bits; host number of 16 bits
Class C: Network prefix of 24 bits; host number of 8 bits
The subnet mask for each class is defined here:
Class A: Subnet mask of 255.0.0.0
Class B: Subnet mask of 255.255.0.0
Class C: Subnet mask of 255.255.255.0
In class-based routing, there is a fixed number of hosts along with the number of IP addresses. With the introduction of CIDR in 1993, subnet masks broke down networks further so that IP addresses could be more efficiently created without wasting network space for entities that don’t need large quantities of host numbers. This process is subnetting and is done by a network systems administrator.
Read more: Information Technology (IT) Terms: A to Z Glossary
The 255.255.255.0 subnet mask is widely used in IPv4 networks, particularly on home network routers. An IPv4 address consists of 32 bits, split into four parts of 8 bits each, with values ranging from 0 to 255.
Let’s take a closer look at how a subnet mask is used to break down classes in CIDR. In class-based routing, each class has a specific number of hosts that can connect to a network:
Class A: For networks containing over 65,536 hosts
Class B: For networks containing 256 to 65,534 hosts
Class C: For networks containing fewer than 254 hosts
If your business has 1,000 devices that connect to the internet, you would need a class B, but you would be wasting IP addresses because of the limitation of the class system. Classless routing removes the need to restrict networks to the class divides, and subnet masks are the tool used to carve IP address network prefixes and host numbers in an efficient way.
Below is an example of how a subnet mask creates an IP address with a more efficient number of host numbers.
Take, for example, a typical class C IP address of 192.168.1.0 and a subnet mask of 255.255.255.0. However, you don’t need 254 host devices, only half of that number, so you need to create a subnet mask to do this. In order to get to half, you will need to borrow one bit from the original subnet mask so that the mask becomes 255.255.255.128 (11111111.11111111.11111111.10000000 in binary), which gives you two subnets and 128 minus two for the reserved IP addresses, so 126 hosts.
In CIDR notation, the IP address is: 192.168.1.0/25. The “slash 25” indicates that the IP address contains a subnet mask with 25 bits.
![[Video thumbnail] Should You Consider a Career in IT?](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://images.ctfassets.net/wp1lcwdav1p1/4NMdzJZAMtI2x2eyyo2xVC/8766336ee5b62ee406bc6c7c712cb021/maxresdefault__7_.webp?auto=format%2Ccompress&dpr=1&w=750&h=450&q=60)
Subscribe to our weekly LinkedIn newsletter, Career Chat, for industry updates, tips, and trends. Then, explore free IT-related resources to optimize your professional growth:
Watch on YouTube: Career Spotlight: IT Support Specialist
Read our Career Chat issue: How AI Is Transforming IT
Accelerate your career growth with a Coursera Plus subscription. When you enroll in either the monthly or annual option, you’ll get access to over 10,000 courses.


Editorial Team
Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...
This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.