Discussion:
How to configure DNS settings in Android x86?
(too old to reply)
Igor Forca
2014-10-24 11:37:22 UTC
Permalink
Hi,
I have downloaded android-x86-4.4-RC2.iso from
http://sourceforge.net/projects/android-x86/files/Release%204.4/android-x86-4.4-RC2.iso/download
and installed it as virtual machine on VMware ESX. Now I am having trouble
to configure network settings on Android. I would like to configure wired
network settings. In our company we use static IP addresses (so no dhcp)
and also DNS settings has to be configured manually.

I opened a new empty file in Vim editor and typed in the following commands:
ifconfig eth0 <Android_IP_address> netmask 255.255.255.0
route add default gw <gateway_IP_address> dev eth0
setprop net.dns1 <DNS_server_IP_address>

I made file executable and executed the file and I tried the following:
1. Inside Android: ping <Android_IP_address> Works fine.
2. Inside Android: ping <gateway_IP_address> Works fine.
3. Inside Android: ping <DNS_server_IP_address> Works fine.
4. Inside Android: ping <my_PC_IP_address> Works fine.
5. Inside Android: ping <my_www_server_IP address> Works fine.
6. Inside Android: ping <my_www_server_domain_name> and I get error:
ping: unknown host <my_www_server_domain_name>
7. Inside Android web browser Browser application typed in <my_www_server_IP
address> Works fine.
8. Inside Android web browser Browser application typed in
<my_www_server_domain_name> and I am getting error:
Webpage not available. The web page at <my_www_server_domain_name> might be
temporarily down or it may have moved permanently to new web address.

Note: From my PC I can do all of the above tests successfully (including
pinging Android virtual machine) successfully. So I assume problem is on
Android virtual machine.

It looks like the setting: setprop net.dns1 <DNS_server_IP_address>
does not work or something. Beside above command I also tried:
setprop net.eth0.dns1 <DNS_server_IP_address>
and
setprop net.dns1 8.8.8.8
and
setprop net.eth0.dns1 8.8.8.8

Note: On adding 8.8.8.8 Googles DNS server I have used: ping www.google.com
and get the same unknown host error.

I have searched the web for this problem, but I just can't find any
solution for this problem. Any help is appreciated.

It looks to me that DNS settings are not recognized.

I also added above commands to /etc/init.sh file to get settings
automatically set after reboot, but checking the settings with command: ip
a and none of the settings is excepted.

So having two problems:
1. How to configure DNS settings in Android x86?
2. How to store them in away when Android x86 is booted settings are
automatically applied?

Thanks
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Igor Forca
2014-10-27 11:08:41 UTC
Permalink
I now installed Android 4.4 r1 released on august 2014 from
http://sourceforge.net/projects/android-x86/files/Release%204.4/android-x86-4.4-r1.iso/download
and the problem is exactly the same.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Antony Stone
2014-10-27 12:18:51 UTC
Permalink
Post by Igor Forca
I now installed Android 4.4 r1 released on august 2014 from
http://sourceforge.net/projects/android-x86/files/Release%204.4/android-x
86-4.4-r1.iso/download and the problem is exactly the same.
If you are using vm, just configure the network of your vm
to be NAT. Then dhcp will work.
The original question stated:

"I would like to configure wired network settings. In our company we use static
IP addresses (so no dhcp) and also DNS settings has to be configured manually."

It does not seem as though the VM settings are the problem (because IP
communications are working) - it's DNS resolution on Android-x86 which isn't
working.

Hope that helps to clarify.


Antony.
--
In Heaven, the beer is Belgian, the chefs are Italian, the supermarkets are
British, the mechanics are German, the lovers are French, the entertainment is
American, and everything is organised by the Swiss.

In Hell, the beer is American, the chefs are British, the supermarkets are
German, the mechanics are French, the lovers are Swiss, the entertainment is
Belgian, and everything is organised by the Italians.

Please reply to the list;
please *don't* CC me.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Igor Forca
2014-10-27 17:52:43 UTC
Permalink
This post might be inappropriate. Click to display it.
Nilesh Akhade
2015-03-10 14:03:07 UTC
Permalink
Hi,
I have downloaded android-x86-4.4-RC2.iso from http://sourceforge.net/projects/android-x86/files/Release%204.4/android-x86-4.4-RC2.iso/download and installed it as virtual machine on VMware ESX. Now I am having trouble to configure network settings on Android. I would like to configure wired network settings. In our company we use static IP addresses (so no dhcp) and also DNS settings has to be configured manually.
ifconfig eth0 <Android_IP_address> netmask 255.255.255.0
route add default gw <gateway_IP_address> dev eth0
setprop net.dns1 <DNS_server_IP_address>
1. Inside Android: ping <Android_IP_address> Works fine.
2. Inside Android: ping <gateway_IP_address> Works fine.
3. Inside Android: ping <DNS_server_IP_address> Works fine.
4. Inside Android: ping <my_PC_IP_address> Works fine.
5. Inside Android: ping <my_www_server_IP address> Works fine.
ping: unknown host <my_www_server_domain_name>
7. Inside Android web browser Browser application typed in <my_www_server_IP address> Works fine.
Webpage not available. The web page at <my_www_server_domain_name> might be temporarily down or it may have moved permanently to new web address.
Note: From my PC I can do all of the above tests successfully (including pinging Android virtual machine) successfully. So I assume problem is on Android virtual machine.
It looks like the setting: setprop net.dns1 <DNS_server_IP_address>
setprop net.eth0.dns1 <DNS_server_IP_address>
and
setprop net.dns1 8.8.8.8
and
setprop net.eth0.dns1 8.8.8.8
Note: On adding 8.8.8.8 Googles DNS server I have used: ping www.google.com and get the same unknown host error.
I have searched the web for this problem, but I just can't find any solution for this problem. Any help is appreciated.
It looks to me that DNS settings are not recognized.
I also added above commands to /etc/init.sh file to get settings automatically set after reboot, but checking the settings with command: ip a  and none of the settings is excepted.
1. How to configure DNS settings in Android x86?
2. How to store them in away when Android x86 is booted settings are automatically applied?
Thanks
I too facing same problem. Moreover I tested typing IP address of google.com into Android browser. Its fine. But after I click search.. Webpage Not Available. Its clear that its problem in dns.
Somebody please help. # setprop net.eth0.dns1 8.8.8.8
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Ivan Ignatyev
2015-04-20 16:06:51 UTC
Permalink
I also have that broken. Android 4.4 r2 just downloaded. I'm running it from live-usb on the real hardware in the real network with working dhcp.
so outputs:
#ping 8.8.8.8
Ping 8.8.8.8 (8.8.8.8) 56(84) bytes of data:
64 bytes from 8.8.8.8 : icmp seq=1 ttl=56 time=62.9ms
....
#getprop |grep dns
[dhcp.eth0.dns1] : 192.168.220.7
[dhcp.eth0.dns2] : 192.168.220.5
[dhcp.eth0.dns3] : 192.168.220.53
[dhcp.eth0.dns4] : []
[net.change] :[net.dns1]
[net.dns1] : 8.8.8.8
[net.eth0.dns1] : 192.168.220.7
#nslookup google.com 8.8.8.8
Server : 8.8.8.8
Address 1: 8.8.8.8
nslookup: can't resolve 'google.com'

As you see, I tried setprop net.dns1 8.8.8.8 and setprop net.eth0.dns1 8.8.8.8 Also my dhcp dnses seem working. Still I cannot resolve any name.
Any other info needed?
Any ideas how to fix it?
Post by Nilesh Akhade
I too facing same problem. Moreover I tested typing IP address of google.com into Android browser. Its fine. But after I click search.. Webpage Not Available. Its clear that its problem in dns.
Somebody please help. # setprop net.eth0.dns1 8.8.8.8
Should be
setprop net.dns1 8.8.8.8
Could you ping 8.8.8.8 successfully?
Have you tried other dns server provided by your ISP?
Generally speaking you don't need to set the dns.
It should be configured automatically unless
your DHCP is broken.
--
Chih-Wei
Android-x86 project
http://www.android-x86.org
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Mexus
2015-04-21 09:51:27 UTC
Permalink
Hello,

this worked for me

ndc resolver flushif \\this was not required but you can try if it wont work
ndc resolver flushdefaultif \\this was not required but you can try if it
wont work
ndc resolver setifdns eth0 "" 8.8.8.8 8.8.8.4
ndc resolver setdefaultif eth0

cheers
Post by Ivan Ignatyev
I also have that broken. Android 4.4 r2 just downloaded. I'm running it
from live-usb on the real hardware in the real network with working dhcp.
#ping 8.8.8.8
64 bytes from 8.8.8.8 : icmp seq=1 ttl=56 time=62.9ms
....
#getprop |grep dns
[dhcp.eth0.dns1] : 192.168.220.7
[dhcp.eth0.dns2] : 192.168.220.5
[dhcp.eth0.dns3] : 192.168.220.53
[dhcp.eth0.dns4] : []
[net.change] :[net.dns1]
[net.dns1] : 8.8.8.8
[net.eth0.dns1] : 192.168.220.7
#nslookup google.com 8.8.8.8
Server : 8.8.8.8
Address 1: 8.8.8.8
nslookup: can't resolve 'google.com'
As you see, I tried setprop net.dns1 8.8.8.8 and setprop net.eth0.dns1
8.8.8.8 Also my dhcp dnses seem working. Still I cannot resolve any name.
Any other info needed?
Any ideas how to fix it?
Post by Nilesh Akhade
I too facing same problem. Moreover I tested typing IP address of
google.com into Android browser. Its fine. But after I click search..
Webpage Not Available. Its clear that its problem in dns.
Post by Nilesh Akhade
Somebody please help. # setprop net.eth0.dns1 8.8.8.8
Should be
setprop net.dns1 8.8.8.8
Could you ping 8.8.8.8 successfully?
Have you tried other dns server provided by your ISP?
Generally speaking you don't need to set the dns.
It should be configured automatically unless
your DHCP is broken.
--
Chih-Wei
Android-x86 project
http://www.android-x86.org
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Jim Campanell
2015-04-27 23:14:10 UTC
Permalink
Also having these issues on an Intel NUC device. Funny thing, the
pre-compiled iso for this version seems to work for me. It's when I do my
own build that I have issues. Ultimately, I HAVE to use my own build as
I'm going to be making customizations to SystemUI. I don't suppose there
are any tricks used to produce these released builds (he said hopefully,
not really expecting that to be the case)?

The ndc commands don't work for me. All of them return:

Error connecting (no such file or directory)

Further searches online led me here:

http://android.stackexchange.com/questions/62081/how-to-change-mobile-connectionss-dns-on-android-kitkat

Basically, they're saying 4.3+ doesn't use the setprop method of setting
dns anymore. We're supposed to be using these ndc calls. (One answer
specified an iptables solution, but that didn't work for me either.) But
my issue appears to be that I don't have the requisite /dev/socket/netd
device file. Which implies something else isn't running, maybe?

Thanks for any clues...
Post by Mexus
Hello,
this worked for me
ndc resolver flushif \\this was not required but you can try if it wont work
ndc resolver flushdefaultif \\this was not required but you can try if
it wont work
ndc resolver setifdns eth0 "" 8.8.8.8 8.8.8.4
ndc resolver setdefaultif eth0
cheers
Post by Ivan Ignatyev
I also have that broken. Android 4.4 r2 just downloaded. I'm running it
from live-usb on the real hardware in the real network with working dhcp.
#ping 8.8.8.8
64 bytes from 8.8.8.8 : icmp seq=1 ttl=56 time=62.9ms
....
#getprop |grep dns
[dhcp.eth0.dns1] : 192.168.220.7
[dhcp.eth0.dns2] : 192.168.220.5
[dhcp.eth0.dns3] : 192.168.220.53
[dhcp.eth0.dns4] : []
[net.change] :[net.dns1]
[net.dns1] : 8.8.8.8
[net.eth0.dns1] : 192.168.220.7
#nslookup google.com 8.8.8.8
Server : 8.8.8.8
Address 1: 8.8.8.8
nslookup: can't resolve 'google.com'
As you see, I tried setprop net.dns1 8.8.8.8 and setprop net.eth0.dns1
8.8.8.8 Also my dhcp dnses seem working. Still I cannot resolve any name.
Any other info needed?
Any ideas how to fix it?
Post by Nilesh Akhade
I too facing same problem. Moreover I tested typing IP address of
google.com into Android browser. Its fine. But after I click search..
Webpage Not Available. Its clear that its problem in dns.
Post by Nilesh Akhade
Somebody please help. # setprop net.eth0.dns1 8.8.8.8
Should be
setprop net.dns1 8.8.8.8
Could you ping 8.8.8.8 successfully?
Have you tried other dns server provided by your ISP?
Generally speaking you don't need to set the dns.
It should be configured automatically unless
your DHCP is broken.
--
Chih-Wei
Android-x86 project
http://www.android-x86.org
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Jim Campanell
2015-05-02 00:24:04 UTC
Permalink
I think I may have found something significant.

When I drop into the command line,

# getprop | grep hardware
[ro.hardware]: []

Given this, none of the networking services in init.x86.rc start, right?

So how do I get ro.hardware set up properly? I saw a reference to a
"kernel command line" elsewhere - does that imply I include it in the grub
boot command?

Thanks for any clues...
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...