-4

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 : 10.100.98.25 PC 1 IP : 192.168.1.1

Router 2 IP : 10.100.98.87 PC 2 IP : 192.168.0.101

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

So I was wondering how to ping PC2 with PC1

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

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.

Syntax

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

Example

route add -p 192.168.1.0 mask 255.255.255.0 10.100.98.25
route add -p 192.168.0.0 mask 255.255.255.0 10.100.98.87

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.

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

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 or ask your own question.