1

When a mobile phone is connected to a wifi network, it is assigned an IP address.

When it is connected to a wireless mobile network, is it also assigned an IP address? If yes, in terminal emulator, ifconfig which could tell me its IP address isn't installed on Android by default, so what command can I run instead? If not, is it assigned an address of a different kind?

Thanks.

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 14 '19 at 21:31
3

If a host, including a phone, attaches to an IP network by DHCP, then it will get an IP address from a DHCP server on the network, assuming there is a DHCP server on the network.

Typically, a Wi-Fi network will also be an IP network with a DHCP server, so, yes, your host will get an IP address.

| improve this answer | |
  • Thanks. When an android phone is connected to a wireless mobile network (such as Sprint's, Tmobile's, AT&T's Verizon's), and I run a SSH server on it, does the wireless mobile network allow any computer in the world to connect to the SSH server on the phone using the IP address (public?) of the phone? – Tim Mar 14 '19 at 17:38
  • Unfortunately, questions about host/server configurations are off-topic here. You could try to ask that on Android Enthusiasts. – Ron Maupin Mar 14 '19 at 17:42
3

Phones have a IP address. If you are connected to wifi you get the IP address from the wifi router. If not connected to wifi it get the ip from the cell provider.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.