Main menu

Pages

What is the Subnet Mask.... and how does it affect the local network

What is the Subnet Mask.... and how does it affect the local network


Certainly, a home or workplace is not devoid of a network between a group of devices to share information or resources, and therefore you will find yourself forced to deal with these networks in some way, regardless of the degree of your experience in this field, which some consider difficult, but rather reaches a degree of complexity somewhat due to the large number of concepts and technologies. used, but this is not the truth, as once you understand and simplify some of these concepts, you will find yourself able to deal with networks and their elements smoothly.



Among these various terms and concepts, the name Subnet Mask stands out, which you will certainly find yourself seeing or hearing about before, and through the coming lines we will explain in detail what Subnet Mask is and how important it is for networks in general, and also how it affects your local network, for example.


In principle, most of those who read these lines now know that when you connect a group of devices together, we will get a network between those devices, and the biggest example of that is your home router, which connects more than one computer, phone, or even a smart screen to it in order to connect to the Internet. But at the same time, all these devices become connected together locally on the same network, and you can, for example, share files between them through that network, despite the different operating systems for each of them.


And the router always performs the task of organizing the connection between them by assigning an internal IP number to each device so that the router becomes able to organize the connection between them and know each device by linking the value of its IP with the value of the network card address or the Mac Address of the same device. But how is that IP determined, and how does each device recognize other devices in the same network and is able to distinguish and communicate with them, and how does the router know all that information? The answer is via the Subnet Mask.


Subnet Mask is one of the elements of the famous TCP / IP protocol. It is a 32-bit value divided into 4 digits, each of 8 bits, just like the IP number. It is used in the network to specify several factors such as the Network ID, the address of each device, or the Host Address. Also, the number of IP addresses of the devices connected to this network, the extent of this network, as well as the possibility of dividing it into subnets, but how is this done?



For example, if you open the command prompt CMD from the Windows system and write this command Ipconfig while connected to the network, you will find the IP address of your device next to the IPv4 Address as well as the Subnet Mask value, which is often 255.255.255.0 in most home and small networks, which is called Class C Subnet, and the first three digits of this number, which contain numbers 255, indicate that the first three corresponding digits of the IP are fixed numbers in this network and will not be changed. Likewise, the fourth digit, which contains the number 0, indicates that the fourth digit of the IP is the one that will change to configure the IP of each device or host in this network.




To clarify more, the IP address in the previous case is 192.168.1.34, and according to the value of the Subnet Mask in this case, the address of that network or Network ID or constant values is 192.168.1 while the Host Address is number 34 in this network that bears the address 192.168.1. Also, this network allows allocating 256 IP numbers to different devices, which is the number of values from 0 to 255, the maximum number of the fourth digit.


By converting the Subnet Mask value to the binary system and comparing it to the IP address in this case, the router identifies the address 192.168.1.0 or the first address in the IP range as the default network address, then the following address 192.168.1.1 as the address of the router or as it is referred to as the Default Gateway. Reserve the last address, which in this case is 192.168.1.255 as the broadcast address for the network or Broadcast, which is the address that is used within the network in the event of a desire to address all connected devices on the same network. This is done by sending data to that address and it will be sent to all devices that carry an IP that starts with 192.168.1 or with the same Network ID.




And if the value of the Subnet Mask in the network is changed to 255.255.0.0 or Class B Subnet, for example, this means that up to 65,536 IP addresses can be assigned to this network, which is the product of multiplying 256 IP from the first box and also 256 from the second box, but note that the device that carries IP number 192.168.1.4 will be able to communicate with the device with IP number 192.168.1.10 because they are both on the same network and have the same Network ID which is 192.168.1.


But the same device with the address 192.168.1.4 will not be able to communicate with the device with the number 192.168.2.10 because they are both in a separate network, and this is the second function that Subnet Mask performs. The network can be divided into subnets by changing the Subnet Mask value. Through this value, each device or host on the network knows the other devices connected to the same network, where if the Subnet Mask value is the same in each device, then they are on the same network and there is the possibility of communication between them.


It is worth noting that you can change the value of your Subnet Mask via the router, and the value of the Subnet Mask is determined according to the size of the network and the number of devices on it, as we mentioned earlier that most routers for small networks are set to Class C Subnet which is 255.255.255.0 which is suitable for most Home and small business networks, while the maximum value of the Subnet Mask is 255.0.0.0, which is called Class A Subnet, and with it it is possible to obtain (256 ^ 3) or 16,777,216 IP addresses, which is the maximum number available and is used in institutions and large companies with routers or switches High efficiency to manage a network of this size.

Comments

table of contents title