Networking
Showing results for 
Search instead for 
Do you mean 

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

SOLVED
Go to Solution
Frequent Advisor

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.
6 REPLIES
Honored Contributor Honored Contributor

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 ?
Honored Contributor Honored Contributor

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
Honored Contributor Honored Contributor

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.
Frequent Advisor

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.
Honored Contributor Honored Contributor

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
Honored Contributor Honored Contributor

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!