1

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

  1. 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)?
  2. How could I have known that the other answer choices' IP addresses are on different subnets?
  3. How could I have known that 10.36.36.224 is the first IP address of one of the subnets?
  4. 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.

1 Answers1

0

You have take each address, and calculate it's subnet ID (network address) using the subnet mask. If two hosts have the same subnet ID (network address), they can communicate between each other without the use of an router.

You can do this using a subnet calculator like this one: http://www.subnet-calculator.com/subnet.php?net_class=A

Or you can do it manually as explained in this post: https://stackoverflow.com/questions/12918644/calculating-range-of-ips-from-subnet-mask

pineappleman
  • 2,279
  • 11
  • 21
  • What exactly is a subnet ID (network address)? – Caleb Owusu-Yianoma Jul 17 '15 at 15:17
  • 1
    It's basically the address of the network on which a host is located. You calculate it using the IP address of the host and the subnet mask. For the two hosts you mentioned, the subnet ID (network address) is 10.36.32.0. All hosts that have the same network address can communicate with each other directly, without the use of an router (layer 3 device). – pineappleman Jul 17 '15 at 15:20
  • 1
    @pineappleman subnet ID for those hosts would be 10.36.36.160/27 (or just 10.36.36.160 if you don't mark it with its prefix length), not 10.26.32.0. The "subnet ID 5" given in the question is just bogus, it's an ancient relic from classful networking. – Celada Jul 17 '15 at 15:53
  • Yes, you are right. It seems I used the wrong subnet mask when calculating. – pineappleman Jul 17 '15 at 16:00