Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I am trying to access an ims core from the ims client in my Android device, however I need to modify the dhcp client to add the ip of the core as one of the DNS. In case of a Linux OS the following would do the job::

cd /etc/dhcp3/ ; vi dhclient.conf ; /* add the line:: prepend domain-name-servers 152.xx.xx.xx(ip of ims core) / sudo dhclient ; / to restart*/

Now the issue is how do I achieve the same in my Android?

share|improve this question
    
Which Android device do you have? Version? Rooted / Unrooted? –  Sparx Feb 26 '11 at 10:42
    
I am having Motorola A855 –  user3148 Feb 26 '11 at 18:46
    
If you want to set a DNS server for one/some access points, you can use Wifi Static. –  elmicha Nov 22 '11 at 18:47
add comment

2 Answers

This doesn't really address your DHCP question (not sure what sysprop that would be), but it will fix your DNS issues. You can make an ASE script for it if you don't want to have to do it everytime your DNS gets changed by the provider.

Also, depending on how your DNS server is setup you may want to change the INT at the end of line one to "2" or "3" and add some other DNS servers for the rest of the internet (openDNS, google DNS, etc).

Open an adb shell or Terminal Emulator and type

setprop ro.kernel.android.ndns 1

setprop net.eth0.dns1 152.xxx.xxx.xxx

Alternatively, just throw the server(s) you want to resolve into /system/etc/hosts, like you would in a normal linux system

Blog post about android hacking with some sysprop references

share|improve this answer
2  
note that not all devices have net.eth0.dns1, some use net.dns1 or net.gprs0.dns1, check this with getprop. –  onik Sep 27 '11 at 17:47
add comment

Advanced networking with android might be helpful.

share|improve this answer
    
And what might this this be? –  Ivo Flipse Feb 26 '11 at 11:29
4  
Yes, please do not simply provide answers that are little more than raw links. Please provide some context and a description of what one will find there. –  Al E. Feb 26 '11 at 17:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.