2

Is it possible to assign a static IP address without a DNS in Android 5.1? Is there anyway to achieve it? I can do this in iOS so I'm wondering.

Rhyuk
  • 133
  • 1
  • 1
  • 5

2 Answers2

4

First, without DNS the network connection won't be much helpful to you: you will need DNS to resolve host names to IPs – or entering something like www.google.com into the browser's address bar will just give you an error.

Which does not mean you cannot use a DNS server other than Google's.

From your homescreen:

  1. Press the Menu key, select Settings
  2. Go to your WiFi settings, where your list of known/available networks is displayed
  3. Long-Tap (tap-and-hold) the entry for your AP
  4. Select Edit
  5. Tap Advanced

Now you will see a form allowing you to override things: you can disable DHCP, then specify a fixed IP plus the related network settings – mask, default route, and – Tada! – DNS servers.

Izzy
  • 91,166
  • 73
  • 343
  • 943
  • Ding! Ding! Ding! We have a winner!.....I forgot about the advanced settings. – HasH_BrowN Apr 02 '15 at 16:46
  • @HasH_BrowN Oh! A little hidden they are, aren't they? :) Hm, winner without upvotes/acceptance currently ;) – Izzy Apr 02 '15 at 18:16
  • Maybe you've hit the design changes #D Thanks! – Izzy Apr 02 '15 at 18:18
  • Ok let me give you a more broad explanation to show you what I want to achieve. Thing is I'm using a Raspberry Pi to stream music wirelessly inside my car. The Pi has a wireless network without real a exit to the outside world. I want to connect to that 'internet-less' network and still be able to stream music with my mobile LTE connection. My device works perfectly with iPhones. I set a static IP on the iPhone without specifying DNS and works as intended. I cant achieve that with my Nexus 5. As soon as I connect to the Pi network LTE network is gone, no Pandora, nothing. – Rhyuk Apr 06 '15 at 18:40
  • Hopefully that gives you more insight of what Im trying to do. When I get to advanced settings in the nexus it defaults Googles DNS's in the advanced tab. Cant give 0.0.0.0 cant delete them. Its either Googles or another valid DNS. – Rhyuk Apr 06 '15 at 18:41
  • @Rhyuk that's a completely different thing you're describing here (seems your original question was a perfect XY problem). Please, ask a new question on that. What you want to know is: "How can I keep my mobile data connection up when establishing a non-internet capable WiFi connection". It's not the DNS being the issue here – but Android taking down the mobie connection as soon as a WiFi connection becomes available. (you could still accept the answer here, as it solves the issue as described in the question ;) – Izzy Apr 06 '15 at 19:48
  • Thank you for the clarification! (And also teaching me what an XY Problem is!) – Rhyuk Apr 06 '15 at 20:25
  • 1
    Anytime! That's one of our major issues. Knowing helps you avoiding it – and getting better help here that way :) – Izzy Apr 06 '15 at 20:59
0

Check this : http://androidforums.com/threads/set-up-static-ip.503213/

if doesnt work or you can't find it, for dns,

set Google dns. Example :

Dns1 : 8.8.4.4
Dns2 : 8.8.8.8

hope this helps.

ʍѳђઽ૯ท
  • 1,554
  • 1
  • 10
  • 20
  • Thing is that Android forces me to use Googles DNS. I would like to use none. – Rhyuk Mar 23 '15 at 16:47
  • @mohsen : The link might go down in future. Please consider posting synopsis so that the future reader becomes aware of what the link was all about in details? – Firelord Mar 23 '15 at 16:48
  • @Rhyukmy : i think it doesnt matter, anyway, if google Want to Abuse, can do it :).@FireLord : this is about set or dont set DNS, take it easy. – ʍѳђઽ૯ท Mar 23 '15 at 16:57
  • So how can I connect to a Wifi using a static IP and no DNS? iOS is perfectly capable of doing this :( – Rhyuk Mar 23 '15 at 18:20