10

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?

Nathan Fellman
  • 5,464
  • 19
  • 56
  • 78

2 Answers2

1

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 every time your DNS is 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.

hichris123
  • 115
  • 1
  • 7
devnul3
  • 729
  • 5
  • 13
0

On my device I got

/etc/dhcpd/dhclient.conf 

To get a new IP from DHCP you can run

dhcpcd -k wlan0
dhcpcd -n wlan0
PiTheNumber
  • 179
  • 1
  • 2
  • 8