OpenWrt Forum Archive

Topic: how to get DNS servers' adresses obtained via DHCP

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

White Russian 0.9

Hi,

My WAN vlan is setup via my ISP's DHCP.
I get an IP, netmask, DNS servers etc. from my ISP, that's OK.

I would like to setup dnsmasq on my WRT so that it provides it's DHCP LAN clients with my ISP DNS servers adresses.
I know, I have to add something like 'dhcp-option=vlan2,6,1.2.3.4' for each vlan (thanks to openWrt docs).

My question is how to dynamicly get the DNS IPs I was given by my ISP ?

I found a way to get my WAN IP and netmask greping and cuting 'ifconfig wan' output, but have no idea for DNS servers...

How to display thoses IPs (appart 'ifup wan') ?

Regards

(Last edited by ch4mp on 11 May 2007, 13:12)

The DNS server IP will be found in /tmp/resolv.conf.auto.

The discussion might have continued from here.