1825715 Members
3135 Online
109686 Solutions
New Discussion

Configuring resolv.conf

 
SOLVED
Go to solution
Aaron MacLennan
New Member

Configuring resolv.conf

Hi, I am very green when it comes to HP networking, so.... We recently changed the IP addresses of our Windows domain controllers, and now I am having issues with my HP. I see a file, resolv.conf that looks like the place to make the appropriate changes. There are two entries in this file. One for 'domain' and one for 'nameserver'. So my questions are this 1)The entry for domain seems incorrect. Should this be the name of the HP server ie. server1.wsc.edu? This is the actual name of the server as it resides on our network. 2)To list multiple DNS servers, are they entered on multiple lines ie. nameserver 10.10.22.2 nameserver 10.10.56.2? 3)Finally, what needs to be restarted to accept these changes? Specific intstuctions would be very helpful. Anything else that I have missed?? -- Thanks Aaron.
10 REPLIES 10
Mark Grant
Honored Contributor
Solution

Re: Configuring resolv.conf

domain should be the DNS domain. In most cases this is the fully qualified domain name but without a host name.

You can list several DNS servers, as you say, on multiple lines.

You don't need to restart anything, this is unix :)
Never preceed any demonstration with anything more predictive than "watch this"
Lorenzo Facello
Valued Contributor

Re: Configuring resolv.conf

Hi,

1.pay attantion, as mark says this is your domain name!!
2. yes, you have to list multiple DNS server
3. try if the conf is correct with the command
nslookup
and check if dns resolves.
Regds
L.
Marvin Strong
Honored Contributor

Re: Configuring resolv.conf

resolv.conf sets up the resolver for DNS.
If your windows servers are your primary and secondary DNS servers, then yes you will need to change the nameserver entries to point to the new IP's

The domain line, is the actual domain you are part of, it should not be the HP server name. Everything after the hostname.

For example
dog.myhouse.com

resolv.conf might look like:

domain myhouse.com
nameserver 10.1.10.100
nameserver 10.1.10.101




Charlie Rubeor
Frequent Advisor

Re: Configuring resolv.conf

You are correct, multiple nameservers can be listed, on separate lines. If you need to search multiple domains, use "search" instead of "domain". For example:

search bedrock.com slate.construction.com

The nameservers would be listed as:

nameserver 12.34.56.78 # optional comments
nameserver 12.34.56.79 # optional comments

You can have a domain or a search line, but not both. You might consider using sam to set this up, especially if you don't like using vi.
Charlie Rubeor
Frequent Advisor

Re: Configuring resolv.conf

Based on the info in your email, I think your /etc/resolv.conf file should look like this:

domain wsc.edu
nameserver 10.10.22.2
nameserver 10.10.56.2

SS_6
Valued Contributor

Re: Configuring resolv.conf

whenever you do changes in resolve.conf you have to run command to refresh these entries
#sig_named restart
Do man on this command.
By providing solutions I am helping myself
Sanjay_6
Honored Contributor

Re: Configuring resolv.conf

Hi,

/etc/resolv.conf changes does not need a named restart. In fact you need to have named running to use resolv.conf.

Any changes to resolv.conf on hp-ux are immediate.

Hope this helps.

Regds
Gordon_3
Regular Advisor

Re: Configuring resolv.conf

Hi all,

I do try to add multiple "namesever" in the resolv.conf, but after experiment, I find out it only look the first nameserver , then if nothing found, it just return no DNS information without continue search out the next DNS nameserver ( which I add the entry already ), any idea?

Gordon
Gordon
Muthukumar_5
Honored Contributor

Re: Configuring resolv.conf

1> We have to use domainname on resolv.conf file with out server name. It has to contain only the domain name as,

domain wsc.edu

2> We have to use nameserver one by one as,
nameserver 10.10.22.2
nameserver 10.10.56.2

And we can use upto 3 name server there.

3> Did you set /etc/nsswitch.conf file hosts: entry as,

hosts: dns files
so that it will try to resolve as dns ( /etc/resolv.conf ) and /etc/hosts file.

And what is saying for,

nsquery hosts "dns"
Easy to suggest when don't know about the problem!