4

Here I have one Android phone, the provider, a device, usb, connecting to it through USB tethering, and a device wlan connecting through WLAN hotspot.

So once usb connected, it got assigned an IP in the 192.168.42.0/24 block. provider, acting as router, had an IP in there, of course. When I connected wlan, it got an IP in the 192.168.43.0/24 block, and provider had one IP in there too.

Now, I can't see the other from either device, either by scanning both blocks, or by directly pinging or sshing into the other device. All I can see is the device I'm operating on, and the two gateways, which are essentialy the same provider.

I suspected it's a limitation of the ROM I used at first, but after flashing a custom ROM the problem persists. Is this a native limitation of the Android OS? As far as I remember iOS didnt't have this problem, and a USB tethered device can communicate with a WLAN connected one. Thank you.

5
  • It's because hosts on different subnets cannot communicate with each other. 192.168.42.0/24 and 192.168.43.0/24 are two different subnets. iOS might be using same subnet for both USB tethering and hotspot, I'm not aware of. Or you can add a static route to setup Routing Between Multiple Subnets. Your question is more about networking than Android. Jul 6, 2020 at 6:14
  • @IrfanLatif Thanks for pointing out! You're right about subnet communications. However, after adding a route on one of the devices, with the gateway being either address of provider, it can still not ping the other. I'll go further to figure out. It also seems true that iOS uses the same subnet (172.20.10.0/28) for both USB tethering and hotspot. Jul 6, 2020 at 7:13
  • Here is a solution, and the question is largely the same. Jul 6, 2020 at 13:27
  • Adding some routes or setting up proxy ARP is better than using third party tools to divert the traffic in userspace. Jul 6, 2020 at 16:07
  • Agreed. I'll try and find a way. Jul 8, 2020 at 14:01

0

You must log in to answer this question.

Browse other questions tagged .