I'm using a static IP configuration for accessing college WiFi on my Windows laptop. For that, I'm using the following batch file (.bat) to configure the settings with one click. The file contains the following information:

netsh interface ip set address name="Wireless Network Connection" source=static addr= mask= gateway= gwmetric=1
netsh interface ip set DNS     name="Wireless Network Connection" source=static addr= primary
netsh interface ip add DNS     name="Wireless Network Connection" addr= index=2

The problem in configuring this in Android is that the above file contains two static addresses ( and whereas in Android, there is only one option to enter static IP address and there are two fields for DNS, but here in the file only one DNS is given.

So, which IP should I enter in the IP address field of my phone. And what about 2nd DNS address?

1 Answer 1


It would be best to choose your static IP address from the main gateway. In this case . So IP address is anything from 10.2.19.xx where xx is any number from 1 to 255 (depends on network prefix) apart from 27.

It is also okay to put the gateway address as the first DNS entry and as for the second either put a public DNS like Google DNS e.g or Open DNS like configured in your settings

After that ping and see if the address is reachable


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .