I'm learning IP addressing and routing basics, but I'm facing a problem which I cannot understand, so i have the following structure:

enter image description here

Well in this situation, a ping from to works, which is obvious, but in the following structure:

enter image description here

I cannot ping from to! I know that the masking is not coherent, but normally (based on the course I'm studying), the PC ( makes a logical AND between and, it finds, so it concludes that is in the same network, so it sends an ARP request, searchig for the MAC@ to which belongs, the second PC responds, so the ICMP echo request will arrive to successfully, then the latter will use the router to send the ICMP response to, so why it does not ping? PS: the default Gateway for the 2 PCs is Thanks.

  • You should amend your question rather than changing it completely around so the answer doesn't make too much sense any more.
    – Zac67
    Jan 1, 2018 at 15:59

4 Answers 4


You didn't mention the mask on the left PC-PT, I'm assuming /16.

Ping works by sending ICMP echo requests and expecting echo replies in return. Now, when you ping from to the echo request will get there fine but when the reply is about to be sent, the local routing table indicates that it needs to be routed to the destination. In the absence of a viable router the reply packet can't be sent and is dropped.

After edit: as it is, the router is of no use. It's not located within, so it's out of reach from If you change its IP address to it'll work since it'll be located within reach from both PCs' perspectives. Alternatively and more conventionally, the router would have two IP addresses, one in each subnet. Since they overlap in this case, an IP address inside the overlap would work fine.

  • Yeah right, but I'v added a router and still! it does not ping! I edited the post please review Jan 1, 2018 at 15:29
  • The router needs to be within reach. As it's also (only) located in it can't be used.
    – Zac67
    Jan 1, 2018 at 15:44
  • The router needs to have one interface on each subnet.
    – Ron Trunk
    Jan 1, 2018 at 15:48
  • @Zac67 What do you mean by the 'the router isn't within reach' ? Jan 1, 2018 at 15:59
  • @Ron Ah okey, would you please explain what really happens? Jan 1, 2018 at 16:00

The results are weird because your addressing is not correct. You have two hosts with overlapping address ranges. One host has a /16 mask. The other has a /24 mask, but it falls within the range of the /16: is an address within the subnet.

This is an incorrect configuration. Your hosts need to be on two separate subnets (i.e. without overlapping addresses), or they need to be on the same subnet with the same mask.

Two hosts on the same subnet should agree on the mask. For example, you can change the PC on the right to have a /16 mask. Then your PCs can ping each other.

If you want two hosts on different subnets (ex., change the right pc to, then you need a router to route between the two subnets. The router needs to have an interface in each subnet. You also need to set your default gateway on each PC to the address of the router interface on that subnet.

  • Yes, I'm convinced that the addressing is not coherent, but i wondered what is really happening to prevent this ping from happening. I understand from @Zac67 answer that the ping request arrives without problems to it's destination, but the reply is not even routed through the router because the latter is not in the same sub-net even if it is present in the right PC-PT's routing table. Jan 1, 2018 at 17:38
  • Left PCs address is not in right PCs routing table, so it doesn't know where to send it.
    – Ron Trunk
    Jan 1, 2018 at 18:35

As per Newbie perspective: This IP uses CIDR /16, 16 bits represent Network ID Available hosts are 65534 This IP uses CIDR /24, 24 bits represent Network ID Available hosts are 254

Both can be considered to be in a different networks. To make this work, do static configuration in router for /24.

Regards, Raghavendra.

  • Well a machine that has an IP of is considered to belong also the the sub-net, because overlaps Jan 2, 2018 at 10:30

Look at it from the perspective of It thinks it's on the network 130.90.4.XXX. If it wants to send something to (or to ANY other address not on, it needs to have a gateway on it's network, i.e. using the standard of .1 for gateway.

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.