Hi,

In openwrt system, A local DNS server runs on port 53. the resolution of Domain Name to IP is always going through local DNS server.

There are two configuration files are maintained by openwrt for resolv configuration.

one is /etc/resolv.conf and another is /tmp/resolve.conf.atuo. 

content of /etc/resolv.conf are as 

search lan
nameserver 127.0.0.1

and 

content of /tmp/resolv.conf.auto are as 

# Interface wan
nameserver <DNS Server ip 1>
nameserver <DNS Server ip 2>


Can the same configuration be achieved through RDK-B as well , where all the DNS resolution must go through local DNS server of router ?

if yes, please suggest the procedure to achieve this.

Thanks


  • No labels

1 Comment

  1. HI Nitin Patet,

    In RDK-B, we have only /etc/resolv.conf file and all the nameservers are listed in it.
    nameserver 127.0.0.1
    nameserver <DNS Server ip 1>
    nameserver <DNS Server ip 2>

    Once the WAN gets connection, the entry nameserver 127.0.0.1 is removed and resolution of Domain Name to IP is done through nameserver <DNS Server ip 1>  or  nameserver <DNS Server ip 2>

    e.g.,

    # strace -e trace=open -f nslookup google.com
    open("/lib/libc.so.0", O_RDONLY) = 3
    open("/etc/resolv.conf", O_RDONLY) = 3
    Server: nameserver <DNS Server ip 1>
    open("/etc/hosts", O_RDONLY) = 3
    Address 1: nameserver <DNS Server ip 1>   comcast

    open("/etc/hosts", O_RDONLY) = 3
    open("/etc/hosts", O_RDONLY) = 3
    Name: google.com
    open("/etc/hosts", O_RDONLY) = 3
    Address 1: 2607:f8b0:4006:818::200e lga34s18-in-x0e.1e100.net  (google ipv6 address)
    open("/etc/hosts", O_RDONLY) = 3
    Address 2: 172.217.3.110 lga34s18-in-f14.1e100.net   (google ipv4 address)
    +++ exited with 0 +++


    Thanks and Regards
    Srinivas