Sponsored Content
Special Forums IP Networking overriding /etc/resolv.conf with .nslookuprc file Post 302101302 by smanu on Sunday 31st of December 2006 06:45:38 AM
Old 12-31-2006
Hi Perderabo,

Thanks for the reply. I asked the question exactly in the context of using nslookup, not in the general resolver sense.

The answer I'm looking out for is: how can I override the domain name & name servers listed in /etc/resolv.conf with nslookuprc. I assue we can somehow override them but do not exactly know how? It would be great if you can provide me a sample .nslookuprc!

Also how do we specify timeouts(for individual name servers) in /etc/resolv.conf? I'm looking out for the exact format.

/smanu
 

10 More Discussions You Might Find Interesting

1. IP Networking

/etc/resolv.conf

I am new to unix. I have edited the /etc/resolv.conf. It shows domain name ip address ip address These are the same ips of the dns I use for windows. Still I get no name resolution on the internet. I can ping external ip's is there anything else I need to check? (1 Reply)
Discussion started by: rpnhavoc
1 Replies

2. SuSE

Suse 10 resolv.conf

I want to have 7 search domains in my resolv.conf, but it seems to like only the first six. I read somewhere that the OS will only recognize the first 6 (or the first 154 characters). Is that the case with SUSE 10? thx -Kevin (2 Replies)
Discussion started by: kjbaumann
2 Replies

3. Shell Programming and Scripting

resolv.conf

HI ALL I am making a script,That will does the following,I am in search of ideas 1.Script will comment all existing the entries in resolve.conf 2.Add new entries like this abc.example.com 192.168.1.x I can use sed to add comment. (8 Replies)
Discussion started by: aliahsan81
8 Replies

4. UNIX for Dummies Questions & Answers

resolv.conf

Hi everyone A quick question during a audit this was determined to be a security issue In the resolv.conf there is a “.” At the end of the domain name Like this domain mydomain.com. I which to understand the function or significance of the . thk (3 Replies)
Discussion started by: Ex-Capsa
3 Replies

5. Ubuntu

resolv.conf

Hi, My resolv.conf keeps overwritten. I want to have it to just keep the setting that I put in there. I tried a few solutions I found using google. like supersede domain-name "xxx", prepend domain-name-servers xxx.xxx.xxx.xxx; This does'nt work. I also tried to just chmod the file to... (4 Replies)
Discussion started by: jld
4 Replies

6. Shell Programming and Scripting

Loop through hosts file - cat /etc/resolv.conf

Hello... I am trying to loop through my hosts file that contains 100+ servers to check or update the nameservers on them... My while loop is breaking after the first server responds... #!/bin/bash while read line; do a=( $(echo $line | tr " " "\n") ) if }" != "" ] && }" != "#" ] &&... (1 Reply)
Discussion started by: CompSCI
1 Replies

7. Red Hat

Issue on resolv.conf

Hi all, :( I am facing issue while I have updated in resolv.conf, after nework service restart, it was automatically deleted IP from resolv.conf file. Could you please let me know what is the reason resolv.conf deleted any IP which I have manually updated, but it store only my router IP... (3 Replies)
Discussion started by: Pradipta Kumar
3 Replies

8. Ubuntu

Adding Domain name n resolv.conf file without vi editor

Hi Guys, I want to add the domain name entry to resolv.conf file. when i use the vi editor to do it the changes are gone after DNS client is being restarted. In Solairs 11 I figured out svccfg command will help to retain the cinfguration. but in linux how do we do that. Also for Solaris are there... (2 Replies)
Discussion started by: karthikk0508
2 Replies

9. UNIX for Dummies Questions & Answers

DNS server - /etc/resolv.conf file issue

Hi, Am trying to configure DNS server and trying to keep the information in /etc/resolv.conf file as: search server nameserver 192.168.0.10 when i restart the network service with #service network restart, resolv.conf file is changing as: nameserver 192.168.0.10 search server -... (5 Replies)
Discussion started by: raosr020
5 Replies

10. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies
RESOLV.CONF(5)						      BSD File Formats Manual						    RESOLV.CONF(5)

NAME
resolv.conf -- resolver configuration file DESCRIPTION
The resolv.conf file specifies how the resolver(3) routines in the C library (which provide access to the Internet Domain Name System) should operate. The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver infor- mation. On a normally configured system this file should not be necessary. The only name server to be queried will be on the local machine, the domain name is determined from the host name, and the domain search path is constructed from the domain name. The different configuration options are: nameserver IPv4 address (in dot notation) or IPv6 address (in hex-and-colon notation) of a name server that the resolver should query. Scoped IPv6 address notation is accepted as well (see inet6(4) for details). Up to MAXNS (currently 3) name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. If no nameserver entries are present, the default is to use the name server on the local machine. (The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum num- ber of retries are made). domain Local domain name. Most queries for names within this domain can use short names relative to the local domain. If no domain entry is present, the domain is determined from the local host name returned by gethostname(3); the domain part is taken to be everything after the first '.'. Finally, if the host name does not contain a domain part, the root domain is assumed. lookup This keyword is now ignored: its function has been superseded by features of nsswitch.conf(5). search Search list for host-name lookup. The search list is normally determined from the local domain name; by default, it begins with the local domain name, then successive parent domains that have at least two components in their names. This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names. Most resolver queries will be attempted using each component of the search path in turn until a match is found. Note that this process may be slow and will generate a lot of network traffic if the servers for the listed domains are not local, and that queries will time out if no server is available for one of the domains. The search list is currently limited to six domains with a total of 1024 characters. sortlist Sortlist allows addresses returned by gethostbyname to be sorted. A sortlist is specified by IP address netmask pairs. The net- mask is optional and defaults to the natural netmask of the net. The IP address and optional network pairs are separated by slashes. Up to 10 pairs may be specified, ie. sortlist 130.155.160.0/255.255.240.0 130.155.0.0 options Options allows certain internal resolver variables to be modified. The syntax is: options option ... where option is one of the following: debug enable debugging information, by setting RES_DEBUG in _res.options (see resolver(3)). edns0 attach OPT pseudo-RR for ENDS0 extension specified in RFC 2671, to inform DNS server of our receive buffer size. The option will allow DNS servers to take advantage of non-default receive buffer size, and to send larger replies. DNS query packets with EDNS0 extension is not compatible with non-EDNS0 DNS servers. The option must be used only when all the DNS servers listed in nameserver lines are able to handle EDNS0 extension. inet6 enable support for IPv6-only applications, by setting RES_USE_INET6 in _res.options (see resolver(3)). The option is meaningful with certain kernel configuration only and use of this option is discouraged. insecure1 Do not require IP source address on the reply packet to be equal to the servers' address. insecure2 Do not check if the query section of the reply packet is equal to that of the query packet. For testing purposes only. ndots:n sets a threshold for the number of dots which must appear in a name given to res_query (see resolver(3)) before an initial absolute query will be made. The default for n is 1, meaning that if there are any dots in a name, the name will be tried first as an absolute name before any search list elements are appended to it. The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance will over- ride. The search keyword of a system's resolv.conf file can be overridden on a per-process basis by setting the environment variable LOCALDOMAIN to a space-separated list of search domains. The options keyword of a system's resolv.conf file can be amended on a per-process basis by setting the environment variable RES_OPTIONS to a space-separated list of resolver options as explained above. The keyword and value must appear on a single line, and the keyword (e.g. nameserver) must start the line. The value follows the keyword, separated by white space. FILES
/etc/resolv.conf The file resolv.conf resides in /etc. SEE ALSO
gethostbyname(3), resolver(3), nsswitch.conf(5), hostname(7), named(8), resolvconf(8) Paul Vixie, Kevin J. Dunlap, and Michael J. Karels, Name Server Operations Guide for BIND, CSRG, Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, Release 4.9.4, http://www.dns.net/dnsrd/docs/bog/bog.html, July 16, 1996. HISTORY
The resolv.conf file format appeared in 4.3BSD. BSD
August 21, 2010 BSD
All times are GMT -4. The time now is 07:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy