14. Using the example of the IP addresses between 10.23.2.1 and 10.23.2.254, explain how the network prefix and subnet mask work together to define a subnet.
All the hosts in the given range i.e. from 10.23.2.1 to 10.23.2.254 comprise a subnet where the prefix is 10.23.2 and all the addresses ranging from 10.23.2.1 and 10.23.2.254 will fall under the same subnet i.e. 10.23.2 . A subnet is a group of hosts with IP addresses in a particular range. Network prefix is the part that is common to all the hosts i.e. 10.23.2 is the network prefix whereas the remainder of the subnet is the subnet mask, this is unique to each host. The address of the subnet is compared with the address 255.255.255.0 and all the 1s in the address are checked. suppose we have 10.23.2.0 as the IP address , its binary representation would be:-
00001010 00010111 00000010 00000000
whereas that for 255.255.255.0 would be 11111111 11111111 11111111 00000000
using bold face marking , we'll mark all the 1's in the adress 10.23.2 range and all the addressess having prefix as 10.23.2 will belong to one subnet.
Think of the subnet like a group of friends with phone numbers from 10.23.2.1 to 10.23.2.254. Now, the subnet mask is like a rule telling us which part of the number we should pay attention to. If we take an example, like the number 10.23.2.0, we can check it against the rule, which is 255.255.255.0.
In computer language, the number 10.23.2.0 looks like 00001010 00010111 00000010 00000000. The rule, 255.255.255.0, looks like 11111111 11111111 11111111 00000000 in binary. Now, where we see the bold 1s in 255.255.255.0, we'll mark those in the number 10.23.2.0.
So, all the bold 1s in the rule cover the 10.23.2 range in our friend's phone numbers. This marking helps us to see who belongs to our subnet group. It ensures that everyone with the same 10.23.2 part in their numbers is in the same subnet.