host, resolv.conf, nsswitch.conf - Argh! (24 Views)
Reply
Frequent Advisor
Tim Krego_2
Posts: 58
Registered: ‎10-10-2001
Message 1 of 7 (24 Views)
Accepted Solution

host, resolv.conf, nsswitch.conf - Argh!

OK. I've read many posts here about various name resolution issues, but I'm still having problems.

This machine is an internal development box. The machine is a K460 running HP/UX 11.0.

Here are the relevant lines from the various files

hostname : verbie
ip : 192.168.1.34

resolv.conf

domain esdiconsulting.com
nameserver 208.16.180.5

nsswitch.conf

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

hosts

127.0.0.1 localhost loopback
192.168.1.34 hnsdev.esdiconsulting.com verbie

The machine is not listed in a DNS server and not accessed from the Internet.

Does this all look correct?

Thanks.
Please use plain text.
Honored Contributor
Michael Tully
Posts: 7,905
Registered: ‎04-15-1999
Message 2 of 7 (24 Views)

Re: host, resolv.conf, nsswitch.conf - Argh!

Hi Tim,

/etc/nsswitch,conf

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

WIth the hosts file, why have a fully qualified name listed, why not just the host?

Michael
Anyone for a Mutiny ?
Please use plain text.
Honored Contributor
Jon Finley
Posts: 3,155
Registered: ‎01-18-1999
Message 3 of 7 (24 Views)

Re: host, resolv.conf, nsswitch.conf - Argh!

I didn't see the entry for the router i.e.:

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="192.168.1.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

Resolv.conf looks fine (bare minimum.. but works).


What dies (swagent?), or what can't you get out to?

Jon
"Do or do not. There is no try!" - Yoda
Please use plain text.
Honored Contributor
John Dvorchak
Posts: 682
Registered: ‎02-19-2001
Message 4 of 7 (24 Views)

Re: host, resolv.conf, nsswitch.conf - Argh!

It all looks fine to me, but you failed to mention or describe the problem. What can't you do?
If it has wheels or a skirt, you can't afford it.
Please use plain text.
Frequent Advisor
Tim Krego_2
Posts: 58
Registered: ‎10-10-2001
Message 5 of 7 (24 Views)

Re: host, resolv.conf, nsswitch.conf - Argh!

Thanks for all the responses.

Michael
-------
I wasn't sure I needed a fully qualified hostname in hosts. Just one of the things I tried when things "weren't" working.

Jon
---
Where do the route entries go?
My resolv.conf file has more info (nis, etc). I was just posting the part I assume were important to my problem.

I have Oracle 8.1.6/WebDB on the machine and they have been running for several weeks without a problem. The problem I was having involved running a Coldfusion MX server on the same machine. I was having problems that appeared to be name resolution.

I think I needed to reboot when I made one of the changes.
Please use plain text.
Honored Contributor
John Bolene
Posts: 1,835
Registered: ‎01-08-1998
Message 6 of 7 (24 Views)

Re: host, resolv.conf, nsswitch.conf - Argh!

The route stuff goes in
/etc/rc.config.d/netconf
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Please use plain text.
Honored Contributor
Jeff Schussele
Posts: 6,795
Registered: ‎02-18-2002
Message 7 of 7 (24 Views)

Re: host, resolv.conf, nsswitch.conf - Argh!

Hi Tim,

Putting the entries in /etc/rc.config.d/netconf covers you for the next reboot. To get the route setup NOW - you either have to bounce the net daemon after editing the netconf file

/sbin/init.d/net stop
/sbin/init.d/net start

or issue the route add command

route add default 192.168.1.1 1

The last value is hop count to the router - usually 1.

Check the routing tables with

netstat -rn

You should now see your default route - test the actual route by trying to ping something on another subnet.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation