Operating System - HP-UX
1754304 Members
2764 Online
108813 Solutions
New Discussion юеВ

nslookup issue after upgrading

 
Dario_1
Trusted Contributor

nslookup issue after upgrading

Hi All!

While I was out last week, my partner upgraded one of the boxes from 10.20 to 11.0. He was not able to get the machine on the network because of the NIC card drivers. After the installation of the drivers, we were able to connect to the machine via network.

As I mentioned, we can connect to other machines and from other machines without a problem. We can also ping, telnet, rlogin from and to but the nslookup command does not work unless I modify the nsswitch.conf file to look at the host file first. When I came back I verified all the network information (ip, dns server info, domain, etc)which we are using the same as before. I also executed the the set_parms initial command and re-entered all the information but I am still having the same problem.

I noticed that when I go to the System Property screen on sam (Network) I have 0.0.0.0 as my internet address and also in the System's DNS Server I have the name of the DNS server insted of the DNS IP address.

Would that be the cause of the problem? If that is the case, can I resolve the issue without having to re-boot the box?

Server: k360
OS: HP-UX 11.0

Gateway info. is correct and /etc/resolv.conf file has the correct info.

As always, thank you for your help.

Regards,

DR
10 REPLIES 10
Christopher Caldwell
Honored Contributor

Re: nslookup issue after upgrading

In /etc/resolv.conf, DNS should always be referred to by number, not name [if we're in resolv.conf, we don't know where to get names from yet].

YMMV with nsswitch.conf; I imagine you can seed with /etc/hosts, but I wouldn't recommend it.

If the system has no base IP other than 0.0.0.0 [i.e. #netstat -ian
doesn't show something other than the loopback address], I'd imagine that network connectivity in general wouldn't work.

You can set the network address, deal with routing, and deal with DNS all without rebooting.

Sachin Patel
Honored Contributor

Re: nslookup issue after upgrading

Hi Dario,
Sure you can do all this without rebooting system. As previous post says use ip address rather then name in /etc/resolv.conf. how is your host file looks like.
As you can ping other system so your gatway is working fine. Are you able to ping by name?

Check nslookup binary?
Is photography a hobby or another way to spend $
Dario_1
Trusted Contributor

Re: nslookup issue after upgrading

Christopher:

Thank you for your reply. That was another detail that I forgot to mention. The netstat command shows the correct information. My NIC card has the correct info too. As far as the resolv.conf file, I have IP addresses not names. Here is an example of how it looks:

domain domain-name.com
nameserver 111.111.111.1
nameserver 222.222.222.2

Regards,

DR
Dario_1
Trusted Contributor

Re: nslookup issue after upgrading

Sachin:

/etc/hosts file is fine. As a matter of fact, I copied the file from another machine that is working thinking that that was the problem. But it did not do the magic.

I can ping, ftp and/or rlogin using IP's, server names and/or aliases. No problem doing that.

Thx,

DR
Steven E. Protter
Exalted Contributor

Re: nslookup issue after upgrading

HP-UX upgrades and cold installs typically do not configuer a /etc/nsswitch.conf file

The 11.11 upgrade leaves you with several candidates and nothing installed.

ls /etc/nsswitch.*

look at the one that most meets your needs concerning host resolution.

cp it to name /etc/nsswitch.conf

This can be done without a boot.

RE-do the nslookup tests.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dario_1
Trusted Contributor

Re: nslookup issue after upgrading

Steven:

Thank you. He confirmed that in fact it was a cold installation. I also looked at every nsswitch.* files under /etc. I am usning nsswitch.hp_defaults but I modified the dns line to look for file first and then it worked but with the file not the dns server.

Regards,

DR
Mark Greene_1
Honored Contributor

Re: nslookup issue after upgrading

Check out the /sbin/set_parms script. It will allow you to configure the host name and ip address for your system, and make all the necessary changes in all the right places. The script is extensively documented.

HTH
mark
the future will be a lot like now, only later
Sachin Patel
Honored Contributor

Re: nslookup issue after upgrading

Dr,
You have to change file name

#cp /etc/nsswitch.hp_defaults /etc/nsswitch.conf

and hosts line should read
hosts: dns file

Sachin
Is photography a hobby or another way to spend $
Bill Hassell
Honored Contributor

Re: nslookup issue after upgrading

nslookup will provide a clue as to the reason for the failure. The default behavior without an nsswitch.conf file is to use /etc/hosts only unless there is a resolv.conf file, then it will be DNS *only*. One of the most common problems with DNS server setups is that the server itself fails to find it's own name. You can verfiy this with:

nslookup IP_addr_of_DNS_server IP_addr_of_DNS_server

Notice that the IP address is listed twice? The first is the address we want to resolve to a name and the second is the server we want to do the work. nslookup tries to be a bit secure by trying to resolve an IP to a name for the DNS server, and if it fails, skip that server and follow the nsswitch.conf rules for a failed request.

There are two ways to fix this:

1. Fix the DNS server so it returns it's own name given an IP address (preferred), or

2. Put the name of your DNS server into /etc/hosts along with the IP address and then tell nsswitch.conf to look at files, then dns.

The second choice is actually a good solution. /etc/hosts should be quite small, consisting of local production servers and DNS servers. There is a major savings in network traffic (DNS lookups) using /etc/hosts for network backup software such as Omniback. For whatever reason, OB (and most other commercial network backup programs) call gethostbyname() for *every* file that is saved. By using /etc/hosts, no DNS load is presented to the DNS server. /etc/hosts is a good way for temporary IP+hostname entries to be used before they propagate into a local DNS server.


Bill Hassell, sysadmin