We have a list of dns server IPs in /etc/resolv.conf. When doing nslookup for a particular scenario we would like to ingore the second entry below, so that naming resolution occurs via other 3 DNS server IPs.$ cat /etc/resolv.confdomain example.comnameserver 192.168.1.1nameserver 10.10.10.1nameserver 192.168.1.2nameserver 192.168.1.3Anyone has ideas? Thanks.
any option to ignore a dns server ip from /etc/resolv.conf when doing nslookup?
linux;dns;hostname;nslookup
One solution might be to temporarily change the order of the nameservers in /etc/resolv.confAnother approach is to iterate through the nameservers and use them seperately:while read IPdo    echo Testing nameserver ${IP}    nslookup google.com ${IP}done < <(grep nameserver /etc/resolv.conf| awk '(FNR != 2) {print $2;}')