1819695 Members
4026 Online
109605 Solutions
New Discussion юеВ

Configuring resolv.conf

 
Rafael Mendon├зa Braga
Regular Advisor

Configuring resolv.conf

Hello experts...

I'm using Hp-Ux 11i...

I want to configure my /etc/resolv.conf file correctly...

Well, let me explain more or less how is our network:

We have Unix, Nt, W2k, OpenVms and Linux servers over our network all around the world.

Sometimes when i have the ip address of a server that is not here in our site (brazil) and I want to "nslookup" it to discover its name, it doesn't give me an answer, but if I "nslookup" it pasing its name, the response is the ip addres... Is it normal?

My resolv.conf file is configured like this:

nameserver 138.106.xxx.x
nameserver 138.106.xxx.xx
nameserver 138.106.xxx.xxx
search br.company.com mx.company.com pe.company.com ar.company.com cl.company.com

Where:

br = brazil
mx = mexico
pe = peru
ar = argentina
cl = chile


How can I configure it correctly?

Thanks in advance,

Rafael M. Braga
4 REPLIES 4
john kingsley
Honored Contributor

Re: Configuring resolv.conf

You will not be able to configure resolve.conf to fix this behavior. The nameservers listed in resolv.conf have to be configured to handled the reverse look up of the IP-Address you are trying to resolve. In most situations, nameservers are only configured to handle reverse look-ups for local IP addresses.
Ivajlo Yanakiev
Respected Contributor

Re: Configuring resolv.conf

hi there,

First yes resolv.conf is not the problem.
and probably it is config just fine.

This is not trye that DNS and nslookup aren't resposible for address to name query.

The real problem is that in your DNS are configure to answer name to address query.
If you want ip=> name query you need arp.addr zone into your DNS servers.





Geoff Wild
Honored Contributor

Re: Configuring resolv.conf

The problem isn't nslookup nor resolv.conf - the problem is that your DNS is not setup correctly - that is - there are no PTR records for the IP addresses - only A records.

Tell your DNS admins to add PTR records and you will be able to nslookup ip's.

Better yet - get dig instead of nslookup....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ivajlo Yanakiev
Respected Contributor

Re: Configuring resolv.conf

you need some like that:
but with real address and real domain



$TTL 86400
@ IN SOA yourdomain. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS yourdomain.

1 IN PTR host1.domain.
10 IN PRT host10.domain.