0

In the university lab, i manually added IP in two ubuntu machines. PC1 IP 10.129.2.33 255.255.0.0 and PC2 IP 10.129.2.165 255.255.255.0. I connected first both computers with direct ethernet cable and later through default lab configuration, where all computers connect to a common switch in lab. I didn't do anything with switch. However, in both cases I was able to ping both machines although having on different subnets. Any idea what could be wrong?

1
  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Commented Dec 23, 2021 at 16:39

2 Answers 2

1

Each PC determines that the other is on the same subnet, so ping succeeds, even though you have different masks.

1

They are in the overlapping subnets:

$ ipcalc -mnb 10.129.2.33/16
NETMASK=255.255.0.0
BROADCAST=10.129.255.255
NETWORK=10.129.0.0

$ ipcalc -mnb 10.129.2.165/24
NETMASK=255.255.255.0
BROADCAST=10.129.2.255
NETWORK=10.129.2.0

Why shouldn't they see each other? Each host sees the second one within it's own subnet, so the broadcast address doesn't matter (network address is not used on the wire at all) - it sends ARP request to determine it's MAC address and receives response, which is enough for L2 connectivity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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