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 Which of the following IPv4 addresses are able to communicate with each other?


  • and



The correct answer is and, the second option.

An explanation is given below the answer. It reads:

The hosts using the IP addresses and 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 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 and 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 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
    I understand that this came from a Security+ text, but this isn't a security question. This is basic networking. – schroeder Jul 17 '15 at 15:12
  • I am a genuine beginner in all matters of security, including networking. Hence my asking for help with the question. :) – Caleb Owusu-Yianoma Jul 17 '15 at 15:16
  • I get that, you've just asked in the wrong forum. I look forward to a new colleague. – schroeder Jul 17 '15 at 15:17
  • Ah, I understand. I will post the question there, too. – Caleb Owusu-Yianoma Jul 17 '15 at 15:18
  • 1
    If you are also new to networking, as a former Network+ instructor, I would highly recommend that you study for, if not take, the Network+ material. – schroeder Jul 17 '15 at 15:18

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

| improve this answer | |
  • 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 All hosts that have the same network address can communicate with each other directly, without the use of an router (layer 3 device). – stanko Jul 17 '15 at 15:20
  • 1
    @pineappleman subnet ID for those hosts would be (or just if you don't mark it with its prefix length), not 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. – stanko Jul 17 '15 at 16:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.