1

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: 10.4.2.8
  • comp2 IP: 10.4.11.4
  • comp3 IP: 10.4.24.4
  • comp4 IP: 10.4.2.102
  • server IP: 10.4.2.251
  • server subnet mask: 255.0.0.0

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 10.4.24.251, I can ping comp2 and comp3, but not comp1 or comp4. Why is this?

Thanks!

2
  • 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
1

Question number 1- The reason the server can ping all the other computers is because with that subnet mask (255.0.0.0 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.4.11.4, 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.

2
  • "this proves that the subnet mask 255.0.0.0 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 255.0.0.0 only the first octet would define the network, and the rest would define which host. 255.255.255.0 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

1.) Simplified: The mask 255.0.0.0 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:
255.0.0.0 = 11111111.00000000.00000000.00000000

Then convert the IP address to binary, in this case, the server is:
10.4.2.251 = 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'.

So:

00001010.00000100.00000010.11111011 AND

11111111.00000000.00000000.00000000 =

00001010.00000000.00000000.00000000

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

This proves that the subnet mask 255.0.0.0 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 (255.0.0.0, would work if you wanted all the addresses you listed to be able to communicate. 255.255.0.0 would also work with the addresses you gave. You could even do 255.255.128.0 or 255.255.192.0 or 255.255.224.0).

0

You will need to change the subnet mask to 255.255.255.128 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 255.0.0.0 your network is 10.0.0.0/8, which includes all of the listed computers. If your subnet mask were 255.255.0.0, you would also be on the same network as all of the other computers as the network would be 10.4.0.0. Likewise, if your server subnet mask were 255.255.255.0, you would be on the same network as comp1 and comp4, which is 10.4.2.0.

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.