Operating System - HP-UX
1833538 Members
2979 Online
110061 Solutions
New Discussion

Re: Configuring with DHCP seems not to resolve the hostname

 
SOLVED
Go to solution
Murthy  Bhavaraju
Occasional Advisor

Configuring with DHCP seems not to resolve the hostname

I have configured the system after a fresh install using DHCP. But the problem is that instead of looking up the localhosts the system tries to resolve the hostname via the ISP DNS which would defenitely fail. How can i force the system to look at the hosts file before using DHCP?

thanks
4 REPLIES 4
G. Vrijhoeven
Honored Contributor
Solution

Re: Configuring with DHCP seems not to resolve the hostname

Hi,

Check the /etc/nsswitch.conf alter the hosts line to:
hosts: files [NOTFOUND=continue] dns

HTH,

Gideon
A. Clay Stephenson
Acclaimed Contributor

Re: Configuring with DHCP seems not to resolve the hostname

Edit the file, /etc/nsswitch.conf. The hosts entry should look very much like this:

hosts: files [NOTFOUND=continue UNAVAIL=continue] dns

Man nsswitch.conf for details.

DNS and DHCP can be made to co-exist by using dynamic DNS; the DHCP server can be configured to update DNS "on the fly" as it hands out IP addresses.
If it ain't broke, I can fix that.
Murthy  Bhavaraju
Occasional Advisor

Re: Configuring with DHCP seems not to resolve the hostname

I have been able to ping sites like google and stuff. But any command on the local machine seem to fail ( and ofcourse X would not start - gives an error "desktop messaging is not working")
Murthy  Bhavaraju
Occasional Advisor

Re: Configuring with DHCP seems not to resolve the hostname

Thanks. It does not seems to have the /etc/nsswitch file. Just by adding the line "hosts: files [NOTFOUND=continue UNAVAIL continue] dns" seems to have solved the problem.

Just by seeing the amount of confusion that prevails regarding the DNS/DHCP client issues on HP-UX, i am amazed that HP does nothing to even addess this issues.

Thanks guys! you were right on target!