I would like to know how the below situation is possible.

I have four desktop computers and a server connected to a switch.

  • comp1 IP:
  • comp2 IP:
  • comp3 IP:
  • comp4 IP:
  • server IP:
  • server subnet mask:

Why is it that the server can ping all four computers? Aren't all the computers on a different subnet from the server (except comp4)?

Another question is, leaving everything the same, but changing the server's IP to, I can ping comp2 and comp3, but not comp1 or comp4. Why is this?


  • 4
    What are the subnet masks for the four desktops?
    – Ron Trunk
    Jul 21 '15 at 2:22
  • Welcome to NE, we hope you will both contribute to and learn from this community. It is not clear what you are asking. Please edit your question and it will automatically start a reopen vote. You may find our Question Checklist helpful to improve your question. Without knowing the subnet masks of the computers, you aren't getting real answers to the questions you are asking, rather only guesses or vague descriptions of how subnetting works (at best indirect answers to your questions). Please update your question with more detail.
    – YLearn
    Aug 21 '15 at 21:01

Question number 1- The reason the server can ping all the other computers is because with that subnet mask ( or /8) you are saying to the computer that the first octet (thats the the first section of your Ip address octet.octet.octet.octet you know like, 10 is in the first octet) is the network part of the address and the rest is just the host part of the address. So to the server they are all on the same network, network 10.

Question 2- Well it depends on what subnet mask your other computers have that will determine who they can and can't talk to.

I have a better explanation of subnets here What does it mean when we say that a single host can have multiple IP addresses

I should have just copied and paste.

  • "this proves that the subnet mask means ..." how do you know this? Not that I doubt the assertion. Just looking for more info. (that's class A?)
    – Thufir
    Feb 26 '18 at 17:09
  • @Thufir You commented on the wrong post, but you answer your question, the submask its self defines the address. Any octet with a 0 means that entire octet is for the host address. Any octet with a 255 is dedicated to network address. So with only the first octet would define the network, and the rest would define which host. the first 3 octets would be networking address and only the last octet would define the host.
    – Levi
    Mar 1 '18 at 20:07

1.) Simplified: The mask means L3 devices will only care about the first octet of the IP address when routing the message (at least when determining which network ID the IP address is using), as only the first octet of the subnet has value, and it's maxed out (255 being the largest number possible for every octet).

More in-depth: This can be calculated by binary ANDing (though it isn't necessary in this case, and there's a far easier method for calculating this known as the "Magic Number").

But with ANDing, you convert the subnet to binary, in this case it is: = 11111111.00000000.00000000.00000000

Then convert the IP address to binary, in this case, the server is: = 00001010.00000100.00000010.11111011

Next you AND the two binary numbers (meaning if there's a '1' over a '1', you carry the '1' down. If there isn't a '1' over a '1', then you write a '0'.


00001010.00000100.00000010.11111011 AND

11111111.00000000.00000000.00000000 =


Finally, you convert this binary number back to an IP address:

This proves that the subnet mask means ONLY the first octet will be taken into account in determining what network an IP address is in.

2.) That being said, I think the first thing you should do is check to make sure all of your endpoints are using the same subnet mask (, would work if you wanted all the addresses you listed to be able to communicate. would also work with the addresses you gave. You could even do or or


You will need to change the subnet mask to on your server in order to be on a different network than the other listed computers, although it also matters what networks your other listed computers are on as determined by their IP addresses and subnet masks.

When the subnet mask is your network is, which includes all of the listed computers. If your subnet mask were, you would also be on the same network as all of the other computers as the network would be Likewise, if your server subnet mask were, you would be on the same network as comp1 and comp4, which is

As to your second question, you must have a different subnet mask on comp1 and comp4 than you have on your server.

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