When we understand the following rule, it will help us in the understanding of the subnetting.
Suppose that we have 1 place that we need to replace it with a binary number. What numbers can be used? The answer is ‘0’ or ‘1’, which are 2 values or (21 values), from decimal ‘0’ to decimal ‘1’.
Suppose that we have 2 places that we need to replace it with binary number. What numbers can be used? The answer is ‘00’, ‘01’, ‘10’ or 11, which are 4 values or (22 values), from decimal ‘0’ to decimal ‘3’.
Now, if you have 3 places… you will have 8 values (23 values), from decimal ‘0’ to decimal ‘7’.
Therefore, what if we have 4 or 5 or…8 places?
From the previous, we can deduce that,
Always, you will find the subnet mask information associated with any IP adderss.
The subnet mask enables you to know the network portion and host portion of any IP address.
If no subnet mask information is associated with the IP, then the default is to determine the network portion and the host portion of this IP address depending on its IP class.
The subnet mask determines the network portion and the host portion of an IP address by converting the network portion to all ones and converting the host portion to all zeros.
Therefore, for the ‘class A’ subnet mask, the first bye will be all ones and the last three bytes will be all zeros.
Class A IP subnet mask
Class B IP subnet mask
Class C IP subnet mask
To get the network IP from any IP address, we should convert the host portion to zeros.
The theoretical method to get the network IP, is to make a logical AND operation between the IP and its subnet mask.
Figure 6.1: getting the network IP
The following illustrates the AND function,
Figure 6.2: the logical AND function
Get the network IP and the broadcast IP from the following IP and subnet mask ‘193.129.2.131/25’. In addition, get the number of available host IPs, and determine the first and the last available host IP.
Therefore, the number of available host IPs =
Get the network IP and the broadcast IP from the following IP and subnet mask ‘130.5.192.68/26’. In addition, get the number of available host IPs, and determine the first and the last available host IP.
The number of available host IPs=
Suppose that we have one network IP and we have three networks. How we can use this only one network IP to be able to assign one network IP to every network of our networks?
The solution is to make ‘subnetting’.
Subnetting is to get many ‘network IPs’ from only one network IP, by changing in the network portion and the host portion in the original network IP.
You have one ‘class C’ IP address (194.5.24.0), and you have two networks, every one of them has 100 computers. You should subnet this IP to fulfill your needs.
Convert the given IP to binary formatting and determine the network portion and the host portion.
Determine how many bits you need to add to the network portion in order to have the correct number of network IPs.
Now, you can get the new subnet mask
Make sure you can cover the number of host IPs in every network.
Now, you can get the subnetted network IPs.
You have one ‘class B’ IP address (134.18.0.0), and you have three networks, every one of them has 100 computers. You should subnet this IP to fulfill your needs.
Convert the given IP to binary formatting and determine the network portion and the host portion.
Determine how many bits you need to add to the network portion in order to have the correct number of network IPs.
Now, you can get the new subnet mask.
Make sure you can cover the number of host IPs in every network.
Now, you can get the subnetted network IPs.