2

Laptop:
Windows 7
Connected to Wifi - "Hydra"
IP: 10.73.112.35
Gateway: 10.73.112.1

Galaxy Nexus
Android 4.2
Connected to Wifi - "Hydra"
IP: 10.73.52.67
Gateway: 10.73.52.1

I am not able to discover or ping my laptop from any android app (I used Fing/network discovery). I see that the Gateways are different in both devices and so is the IP range. This is my office network, so I cannot control IPs and Gateways assigned to my devices. Is there anyway to connect these two devices using wifi in this case?

My goal is to run a client app in android and a server in laptop and make them communicate. For that I need them to ping each other first.

Punit Soni
  • 923
  • 1
  • 8
  • 9

2 Answers2

0

It's unlikely they're on the same Subnet.

A Subnet is separated from another Subnet by a router. The fact that they have different default gateways would indicate they're possibly on different Subnets. You could confirm this by looking at the Subnet mask each device has.

If both devices have their Subnet mask set to 255.255.0.0 then they will be on the same subnet (there are other masks that would also put them in the same Subnet).

Looking at the IP information you have provided, there's a good chance that both devices will have the following Subnet mask: 255.255.255.0. This Subnet mask means that they would be on different Subnets.

Being on different Subnets means that they will only be able to communicate with each other providing that each router has learnt or been manually given a route to the other network.

Even with routes to each other, there can still be various reasons why a ping will not work. As an example, the ICMP echo (ping) could be blocked on a network switches' ACL (Access Control List). This means that your devices could communicate with each other in all other aspects, just cannot ping each other.

If your phone has the feature, then a way you could do this is to create a hotspot on your phone. Connect the laptop to the hotspot and they will then be on the same network and you should find they will be able to ping each other.

Jamie Cole
  • 44
  • 2
  • 2
    No, by definition a local area network is a network that spans a local area. It has nothing to do with routers. – qasdfdsaq Nov 04 '15 at 13:40
  • Ok, I've re-phrased the comment. However it has everything to do with routers. The two devices have different ROUTERS set as their Gateways. This would make it very likely that the two devices are on different networks and unable to ping unless the ROUTERS had known routes for each other. – Jamie Cole Nov 04 '15 at 13:49
  • Router != network. – qasdfdsaq Nov 04 '15 at 13:50
  • `unless the ROUTERS had known routes ` is the key part here. I can ping many servers on the Internet just fine and they are certainly connected to different routers. Might want to stress the routing and default gateway part. And maybe add that sometimes all ICMP is erroniously blocked for legacy reasons. ([link](http://superuser.com/questions/572172/what-are-reasons-to-disallow-icmp-on-my-server) to the ICMP part). – Hennes Nov 04 '15 at 13:55
  • @qasdfdsaq *Assuming* the IP addresses are assigned by DHCP, would it not seem interesting that both devices are being assigned different Gateways? The most obvious answer to this is that they are on different networks, networks that do not have routes to each other. – Jamie Cole Nov 04 '15 at 13:57
  • Aye. Quite possible. But please mention that explicitly in the answer. As well as 'verifying the subnet mask for each device.'. (How, why. When is all fine? When should they differ) etc etc. – Hennes Nov 04 '15 at 13:58
  • @JamieCole: Nope. Perfectly normal on large networks. – qasdfdsaq Nov 04 '15 at 14:01
  • @Hennes Good point. Have updated. – Jamie Cole Nov 04 '15 at 14:08
-4

In wireless Networks settings- check the following:

  • Make Sure "Guest Policy" is disabled or Unchecked and
  • In Advanced Option: WPA Mode is selected "WPA2 Only and Encryption is selected "AES/CCMP" only

enter image description here

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
  • 2
    Re-read the question: "This is my office network, so I cannot control IPs and Gateways assigned to my devices." – qasdfdsaq Nov 04 '15 at 13:42