OpenWrt Forum Archive

Topic: DHCP settings workaround?

The content of this topic has been archived on 2 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have an ASUS running 2.4-kernel 7.06. It is getting bad (slow/unusable) DNS servers from the ISP. I can't use static settings for the router either. Is there any way to work around this?

I've tried adding dns settings to the /etc/config/network file but no luck - they are ignored. I also tried rewriting the /etc/resolv.conf on boot in the /etc/init.d/custom-user-startup script but as soon as the DHCP lease is renewed it is over-written again. I currently have a cron job that is rewriting the /etc/resolv.conf file periodically but that isn't a long term solution.

Is there any way to trigger a script when the dhcp lease is renewed (possibly using hotplug)?

TIA

I update my DNS Servers from /etc/udhcpc.user.  The file I modify is /tmp/resolv.conf.auto.

Nate

I found the udhcpc docs here: http://udhcp.busybox.net/README.udhcpc. This indicates that the /usr/share/udhcpc/default.script file should be called anytime a lease is obtained or renewed. I can either tap into this file or figure out how to tap into hotplug since it looks like that file raises hotplug events.

(Last edited by pric0112 on 15 Aug 2007, 18:42)

The discussion might have continued from here.