I am new to practical aspects of networking. So what I was trying is to ping two PC which are connected to two (wireless) routers which are taking internet through LAN.

So Router 1 IP : PC 1 IP :

Router 2 IP : PC 2 IP :

Now both the PC can ping there routers, I can ping router 2 from PC 1 using ping -s

So I was wondering how to ping PC2 with PC1

  • 6
    You really really really need to go and study / read up on networking fundamentals rather than posting this here. We can't answer your question anyway since you have not included any information with regards to the routing configuration, interfaces etc.... You have a fair bit of learning to do. Aug 21, 2015 at 9:22
  • Ok I appreciate your advice.
    – Anup
    Aug 21, 2015 at 9:45

2 Answers 2


Use Route Tables

Your route table will be where this is indicated. You should be able to ping either IP on a separate ping operation, without issue, if your PC is aware of where those networks are. If the routes aren't already there, you should be able to add them yourself.


route add -p <network> mask <subnet mask> <gateway>


route add -p mask
route add -p mask

Note: The exact command may differ for your operating system, but there is a synonymous command for any networked operating system; as they all use route tables.

  • For anyone trying this after 2020, the command for Ubuntu is now: "sudo ip route add via dev ens##" <-- add you actual device here (can be determined with "ip a".
    – Tmanok
    Aug 28, 2021 at 23:23

Turn Off Windows Firewall on both PC. It rejects PING from different Networks.

Or let it be turned on but configure it to not drop PING

Not the answer you're looking for? Browse other questions tagged .