I am studying CompTIA Security+ material and am struggling to understand the link(s) between a subnet mask, an IPv4 address and a subnet ID.
The question that I'm working on is as follows:
Your network uses the subnet mask 255.255.255.224. Which of the following IPv4 addresses are able to communicate with each other?
10.36.36.158
10.36.36.166 and 10.36.36.184
10.36.36.224
10.36.36.126
The correct answer is 10.36.36.166 and 10.36.36.184, the second option.
An explanation is given below the answer. It reads:
The hosts using the IP addresses 10.36.36.166 and 10.36.36.184 would be able to communicate with each other because they are on the same subnet (known as subnet ID 5).
All of the other answer choices’ IP addresses are on different subnets, so they would not be able to communicate with each other (or with the IP addresses of the correct answers), by default.
Following this is a table (I have not included it because I am not sure how to format it properly) which provides the complete list of subnets and their ranges for this particular subnetted network.
The explanation also includes the following statement:
It is noteworthy that the answer 10.36.36.224 is not even usable because it is the first IP of one of the subnets.
My struggles/questions
- How could I have known that the IP addresses 10.36.36.166 and 10.36.36.184 are on the same subnet (known as subnet ID 5)?
- How could I have known that the other answer choices' IP addresses are on different subnets?
- How could I have known that 10.36.36.224 is the first IP address of one of the subnets?
- I think this question summarises the three above. How can I determine the various subnet IDs and their corresponding IP ranges, given the subnet mask?
NB: I have done some research, to try and help answer my questions. In particular, I came across this; however, I didn't see how (if at all) it could help to answer my questions.
I would greatly appreciate help with this.