This site requires JavaScript for navigation. Please enable JavaScript for the best learning experience.

  1. What is an Internet Protocol subnet mask (IP subnet mask)?
    1. What is an IP Subnet Mask?
    2. What is an IP Subnet?
    3. Why do you need subnets?
    4. What is a binary mask and what's it got to do with subnetting?
  2. What does an IP subnet mask do?
  3. What is an IP subnet mask used for?
  4. Where are subnet masks used?

What is an IP subnet Mask?

An IP subnet mask is a binary masking value used to identify and describe IP subnets.

That is the short definition but this short definition probably makes no sense, so we will explain what an IP subnet is first, and then look at how a subnet mask is used to create a subnet. From these two definitions we'll get a better idea of what an IP subnet mask really is. After we define what a subnet mask is, we'll look at what a subnet mask does, what it is used for and where it is used.

What is an IP subnet?

An IP subnet is a subnetwork. Subnetworks are smaller portions of larger networks that have been separated by breaking a larger range of IP addresses into two or more smaller ranges of addresses. To really understand what a subnet is, you need to understand the original IP addressing scheme called 'classful addressing'. The original classful IP addressing scheme created networks of varying sizes and identified the class, and therefore the size of the network using the first four bits of the IP address. This was not very efficient because some networks did not use all the IP addresses available in the range provided to them.

Why do You Need Subnets?

Breaking a larger network into subnets allows you to restrict certain kinds of network traffic such as broadcasts. Broadcasts are when a single computer sends data to all equipment on the network. This type of communication is necessary for functions such as ARP, RARP, WINS etc.

Breaking a larger network into subnets also allows the network to grow (to 'scale') more efficiently and wastes fewer IP addresses.

What is a Binary Mask?

A binary mask is a string of zeroes and ones that is used to filter or mask the values of specific bits in a second binary value. A logical operation is performed which uses the bits from the value to be masked and bits from the mask itself. The resulting output is then used for various purposes. See our tutorial about binary masks elsewhere on this site for more information.

What does an IP subnet mask do?

The IP subnet mask allows a computer to mask out the host portion of an IP address. But why would you want to do this? A host needs to know if the computer it is communicating with is on the same network or on a different network.

This leaves only the network portion of the original IP address. Knowing which network an IP address is part of is very important in IP communication. Hosts on the same subnet can talk to each other directly. Hosts on different subnets need a router to communicate with each other.

What is an IP Subnet Mask used for?

An IP subnet mask gets used a lot of different ways. An IP subnet mask is used to identify which portion of an IP address identifies the network, and which portion identifies the host. With the subnet mask and the IP address, a computer can tell whether the IP address it wants to talk to is on the local network, or outside your local network, beyond the default gateway.


Where are subnet masks used?

One IP address and subnet mask is always configured on each network interface installed on a piece of network-capable computing equipment, such as the Ethernet port on your desktop computer. The network address and subnet mask are usually part of dynamic route announcemnets exchanged between routers (though BGP converts the dotted quad format mask into a mask represented in CIDR notation).


Hosts are configured with a unique IP address and subnet mask for each interface on the network. Nearly all hosts have a single network interface, so only a single IP address and subnet mask are used. Hosts receive their IP address and subnet mask from DHCP or the IP address and subnet mask are set manually by the network administrator when the computer is first installed.


Routers are devices with multiple network interfaces, each configured by the network administrator with a unique IP address and subnet mask pair for each interface that is connected to an active network.  When routers receive an IP packet, they use a subnet mask to identify the network portion of the address in order to determine which route they should use to forward the IP packet.


Switches contain subnet masks in the VLAN declarations. The Network Address and the subnet mask are used as part of the VLAN declaration so that the switch knows which IP addresses belong to which VLAN.




Bookmark this page and SHARE:  


Support InetDaemon.Com

Get Tutorials in your INBOX!

Free Training