How do subnet masks work?

Question:
What do subnet masks mean and how do they work?

Answer:
Subnetworks help improve performance, reduce congestion, enhance securityand allow us to isolate networks. On a wide area network, typically eachlocal area network is a subnet. Sometimes, a LAN can be configured to betwo or more subnets.

On an IP internetwork, an address takes the form of a 32-bit number,for instance: 135.200.45.90

An IP address can be viewed as follows:

If we were referring to a Class B address in the above example, the networkportion of the address would have read: 135.200.

On the other hand, if a Class C was the case, 135.200.45 would haveconstituted the network portion.

A subnetwork mask is also a 32-bit number that indicates the composition ofa IP internetwork; i.e. it reveals how many bits form the network portionand how many bits form the host portion.

Consider the following subnet mask:

FF.FF.FF.0 in hexadecimal, or
255.255.255.0 in decimal.
In binary, thisnumber would read:
11111111.11111111.11111111.00000000
Note that the first 24 bits are all 1s (such a subnet is sometimes referredto as a 24-bit mask). This indicates that the first 24 bits of the IPaddress refer to the network portion, and the trailing eight bits refer to thehost portion. Therefore we can have a maximum number of 254 hosts persubnet; in the above example it would be 135.200.45.1 through 135.200.45.254.

In order to decipher network and host portions of an IP address (we assume aClass B address and subnet mask in this example), the following procedure isused:

A logical AND operation is performed between the IP address and subnet mask.For instance: 135.200.45.254 and 255.255.255.0.

In binary, this would be:

10000111.11001000.00101101.11111110AND11111111.11111111.11111111.00000000resulting in:10000111.11001000.00101101.00000000which is:135.200.45.0
Therefore the subnet number is 45 and the network is 135.200.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may