Default gateway IP details in Android devices connected to Wi-Fi networks

In an ordinary way, the user of an Android device that is connected to a Wi-Fi network knows only the network name (SSID) and the access password, and has no information about IP address details concerning Gateway, DNS and DNS servers.

There are several simple ways to get these IP details

1. One simple solution is to install "ipconfig" application from Google Play  - https://play.google.com/store/apps/details?id=com.mankind.ipconfig .

After starting the application shows the following information:

Androud-ipconfing.jpg

  • Device IP-address assigned by DHCP server
  • Subnet IP address mask
  • Default gateway IP-address
  • DHCP server IP-address
  • IP addresses of the DNS servers
  • Lease duration of the assigned IP address
  • MAC address of the network interface

2. Another solution is to use Android Terminal Emulator which also can be installed from Google Play - https://play.google.com/store/apps/details?id=jackpal.androidterm .

After the application has been started, there is need to put “ip route show” command.

/Solutions/Android terminal emulator.jpg

This command displays the default route. As can be seen in the example above, the IP address of the default gateway is 192.168.4.1 and traffic goes via wlan0 interface.

Android Terminal Emulator uses many commands that are inspired by UNIX based systems.

For example netcfg command shows a list of device network interfaces and their status.

By using ip addr command it is possible to receive detailed information about network interface settings, e.g. MTU size.

If the user has root privileges, then su command makes it possible to become a terminal administrator.

Here are some useful commands:

For DNS server information:
getprop net.dns1
getprop net.dns2

For IP-address change of DNS-servers:
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4

where 8.8.8.8 and 8.8.4.4 are new IP-addresses of DNS1 and DNS2 servers.

The full list of the commands can be received by:

https://github.com/jackpal/Android-Terminal-Emulator/wiki/Android-Shell-Command-Reference

News

Of the day



Contact us.

Phone: +359 2 955 5120 ; E-mail: sales@multiplex.bg 

Follow us on

/Logo/LinkedIn-50.png /Logo/Google Plus-50.png

 


*********** Surfing Waves

Multiplex Ltd. uses courier services provided by 

/Logo/еконт-лого-1.jpg

very good counter
WebCounter PV

 

very good counter
WebCounter UV