Skip to content
Subnet Mask Explained

What Is A Subnet Mask?

A subnet mask determines which octets out of the four( 8-bit octets) are for the network and which  for the host device. So, to be able to give a unique IP to a device. You need to make sure it’s on the same network as the rest of the host devices.  So, for example, if a subnet mask starts as 255.255.255.0. This means that the fourth part (octet) [0] is for the host devices while the other three are reserved by the network (Left-to-right). A visual example would be something like this.

Subnet Mask Explained

So 255.255.255 are the three network parts (octets) while 0 is for the host part. However, If you don’t have an idea about what an IP address is and how Subnet and IP addresses go hand in hand. Give this ( Networking Basics ) a read before hand to understand the concept first. 

Number Of Host IP’s In A Basic Class “C” Network

(Note: There are multiple classes of network but  the most basic of them is “C class“. These are used by small scale businesses or in home networks where one network up to 254 hosts are enough. A default “C class” network starts with 255.255.255 and can have 192-223 as their first octet .  So one of the ways to know that you are dealing with a class C network is to look for these things:

  • The default subnet mask for C class is 255.255.255.0 (it can be 255.255.255.0 up till  255.255.255. 254) so when the first three octets are reserved by the network. It’s a Class C network.
  • The First Octet (part) of the IP Address can only be 192-223 inclusive. So anything from 192-223 in the first octet would mean it’s a class C Network. (192.168.1.0 , 193.168.1.0,  195,168.1.0 …. 223.168.1.0)

You can use any number to make up your IP address for host as long as its between 0 to 255 (exclusive [can’t use 0 or 255]). For example

Subnet Mask Explained

The 255.255.255 are three network octets (separated by a period). So, what you input in the first three octets (based on what class network you are working with) in this case 192.168.1 is the network and hence cannot be changed.  The last octet 0 in subnet mask (for this class “C”) is for the host and can be uniquely identified from 1-254.  

Subnet Mask Explained

What Is A Network ID & Broadcast ID?

The reason we do not use 0 or 255 for the host id’s is because in every network the very first and last IP is reserved for Network ID  and Broadcast ID.

(Note: Network ID: The network Id is the unique identifier for your network like a label. Hence is not used as a host id. For example: 192.168.1.101 belongs to the network 192.168.1.0 as long as the subnet mask is 255.255.255.0. The label being the network ID 192.168.1.0 for all the IP’s  from 1-254.

Note: Changes in the last octet of the subnet [0] will give multiple network ranges apart from 192.168.1.0 (subnets) which can be the only reason 192.168.1.101 be a part of some other network. 

Broadcast ID:  The Broadcast id is the address which is used for broadcasting to the entire network. Its the highest in numeric value [The last IP of the Network]. if you were to send a message or ping all other IP’s in the network. The Broadcast ID would be the one used by the network to do so.) Example: For the network 192.168.1.0 [with subnet mask 255.255.255.0] the broadcast IP would be 192.168.1.255. The Highest numeric value that can be used in that one network.

This is how a basic “C class” network usually set up. The “C class” has just one network and allows for 254 unique host IP’s that can be assigned.

  However, a subnet mask can allow for multiple networks by borrowing octets from the host as well. That process is known as subnetting. Subnetting basically allows you to create more networks within a subnet by reducing the number of hosts you can have. 

Conclusion:

  • A subnet mask allows you to determine how many networks (subnets) you can have and what class of network you are working with.
  • There are Three main class of networks: Class A , Class B, Class C
  • The First and Last IP Address for every network is reserved. First is reserved as Network ID (Label) & Last as Broadcast ID (for broadcasting/transmitting)
Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *