1837958 Members
3568 Online
110124 Solutions
New Discussion

Re: dns

 
SOLVED
Go to solution
Chang_6
Regular Advisor

dns

Hello,

Could sommebody tell how to configure dns configuration so that it will resolve external addresses like @yahoo.com?
35 REPLIES 35
Fred Ruffet
Honored Contributor
Solution

Re: dns

All you have to do is to add lines in /etc/resolv.conf.
For each DNS server your ISP gave you, add a line like this :
nameserver IP
(replace IP by the IP of your DNS server)

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Michael Schulte zur Sur
Honored Contributor

Re: dns

Hi,

you can do it by sam. You can configure a resolver.

greetings,

Michael
Fred Ruffet
Honored Contributor

Re: dns

Don't forget to configure /etc/nsswitch.conf (can also be done by sam) in order to look in the correct place first. For example, /etc/hosts first, then DNS.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Sanjay_6
Honored Contributor

Re: dns

Hi Chang,

You need to configure the resolver using the file /etc/resolv.conf

Check this link from the hp docs to see how to configure the resolver,

http://docs.hp.com/en/B2355-90685/ch03s08.html

Hope this helps.

Regds
Jose Mosquera
Honored Contributor

Re: dns

Hi,

If you need this for a specific HP-UX sendmail service pls follow this tip:
1.- Identify a resolvable name for your smtp server, i.e: smtpserver
Also assume 8.10.22.100 like IP address for smtpserver.
2.- You must have been set DS macro in your /etc/mail/sendmail.cf:
DSsmtpserver
Pls note that no blanks was leaved.
3.- In your local /etc/hosts file add the following entry:
8.10.22.100 yahoo.com

You can repeat this third step to any domain requested.

Rgds.
Stf
Esteemed Contributor

Re: dns

The easyest way to configure dns is:

# set_parms addl_netwrk

after you can adjust by modifying if you want /etc/nsswitch.conf and /etc/resolv.conf...

Stf ;-)
Chang_6
Regular Advisor

Re: dns

Hi,

Thank you for the replies. I am still confused. Right now the /etc/resolv.conf has

domain xxxx
nameserver ipaddress1
nameserver ipaddress2

How to add yahoo.com here? Please explain.
Chang_6
Regular Advisor

Re: dns

Hi,

Any idea?
Fred Ruffet
Honored Contributor

Re: dns

You do not add yahoo.com in /etc/resolv.com. The two servers referenced by "nameserver" lines in your file are DNS servers. When you want to find a host (like yahoo.com), you ask them to give the corresponding IP. If they don't know, they ask to another DNS they refer as a master. This master gives reply to yours, so they are able to answer.

Now, if the 2 DNS you have aren't able to answer, following problem may occur :
. Your system isn't configured to use this resolv.conf file. This you can troubleshoot by posting here your /etc/nsswitch.conf file. We will tell you wether it's good or not.
. Your nameservers are not able to resolve yahoo.com. There master DNS can also not resolve. Verify those DNS by configuring them on your worstation and trying to resolve yahoo.com (nslookup command)
. Your server can't reach those DNS servers. Can you ping those nameservers ? Can you issue a DNS query to them ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Sanjay_6
Honored Contributor

Re: dns

Hi chang,

This link might help you understand how the DNS resolution happens.

http://docs.hp.com/en/B2355-90685/ch03s01.html

The whole chapter is useful. Also pay special notice to the section "How BIND Resolves Host Names".

Hope this helps.

Regds
Chang_6
Regular Advisor

Re: dns

Fred,

/etc/nsswitch.conf doesn't exist

The following exist

/etc/nsswitch.compat /etc/nsswitch.files /etc/nsswitch.hp_defaults /etc/nsswitch.nis /etc/nsswitch.nisplus

Is this what you meant by a dns query?

nslookup www.yahoo.com
Name Server: autoproxy.xxx.com
Address: xxx.yyy.xx.d

Trying DNS
Trying NIS
looking up FILES
*** No address information is available for "www.yahoo.com"
Chang_6
Regular Advisor

Re: dns

And I was able to ping to nameservers
Chang_6
Regular Advisor

Re: dns

Hi, also /etc/named.conf doesn't exist.
I think I have to specify soemthing there.
Can anybody tell whats happening here
Sanjay_6
Honored Contributor

Re: dns

Hi,

Create a file /etc/nsswitch.conf and try this entry in that file,

hosts : dns files

save this file and exit and then do a nslookup for www.yahoo.com

Hope this helps.

Regds

Stf
Esteemed Contributor

Re: dns

did you use a local dns or a public dns?

if you use only local dns try to add an public dns entry in your /etc/resolv.conf file

Stf ;-)
Chang_6
Regular Advisor

Re: dns

Hi Sanjay

This is the result:

nslookup www.yahoo.com
Using /etc/hosts on:

looking up FILES
*** No address information is available for "www.yahoo.com"
Sanjay_6
Honored Contributor

Re: dns

Hi,

Try this

vi /etc/nsswitch.conf

hosts: files [NOTFOUND=continue] dns

Save this file, exist and now do a nslookup for www.yahoo.com

I'm hoping your /etc/resolv.conf is configured like this

search your_local_domain.com
nameserver 1st_dns_server_ip_address
nameserver 2nd_dns_server_ip_address

you can also use the domain variable in the resolv.conf in place of search.

Hope this helps.

Regds
Stf
Esteemed Contributor

Re: dns

ok edit your /etc/nsswitch.conf file and put these line :

hosts: dns [NOTFOUND=continue] files

in your result of nslookup command it seems like that for your request it don't search in the dns...

Stf ;-)
Chang_6
Regular Advisor

Re: dns

Hi,

I got this

nslookup www.yahoo.com
Using /etc/hosts on:

looking up FILES
Trying DNS
*** autoproxy.xxx.com can't find www.yahoo.com: Non-existent domain
Sanjay_6
Honored Contributor

Re: dns

Hi,

It looks like you the DNS server that you are using is not resolving the external domain addresses.

type nslookup. It sill give you ">" prompt. then type "server ip_add_of_your_dns_server". It should give some output saying default name server, its name and ip address. then type www.yahoo.com and the ">"prompt

nslookup
> server ip_address_of_your_dns_server
Default name server: your dns server name
Address: ip_address_of_your_dns_server

>www.yahoo.com

If it resolved www.yahoo.com, you should get something like this,

Default name server: your dns server name
Address: ip_address_of_your_dns_server

Trying DNS
Non-authoritative answer:
Name: www.yahoo.akadns.net
Addresses: 68.142.226.40, 68.142.226.49, 68.142.226.39, 68.142.226.53
68.142.226.37, 68.142.226.54, 68.142.226.45, 68.142.226.35
Aliases: www.yahoo.com

Hope this helps.

regds
TwoProc
Honored Contributor

Re: dns

For your "domain" error -
I believe that you need the line
"domain [yourdomain].com/net/org/gov etc"

For instance if you're company's domain is "myverycoolcompany.com"

You'd need to add
domain myverycoolcompany.com
to the top of /etc/resolv.conf file.
We are the people our parents warned us about --Jimmy Buffett
Chang_6
Regular Advisor

Re: dns

Hi Both,

The domain exists on first line in /etc/resolv.conf

I tried this:

> server xxx.yyy.zz.p
Specifying a server has overridden the switch policy order.
The reset command will reinstate the order specified by the switch policy.
Default Name Server: autoproxy.xxx.com
Address: xxx.yyy.zz.p

> www.yahoo.com
Name Server: autoproxy.xxx.com
Address: xxx.yyy.zz.p

Trying DNS
*** autoproxy.xxx.com can't find www.yahoo.com: Non-existent domain
Sanjay_6
Honored Contributor

Re: dns

Hi Chang,

Looks like your dns server autoproxy.xxx.com is not resolving external domains. It is not passing the domain lookup query to a root domain that could resolve the external domains.

check with your DNS admins or with the primary admin of the server on which your DNS is housed.

Hope this helps.

regds
Chang_6
Regular Advisor

Re: dns

Hi,

My /etc/resolv.conf is actually:

domain xxxx
nameserver ipaddress1
nameserver ipaddress2
nameserver ipaddress3

should i try all nameservers

like

> server ipaddress1 ?

Right now I tried only ipaddress1.

I got:

server ipaddress1

Specifying a server has overridden the switch policy order.
The reset command will reinstate the order specified by the switch policy.


I donot know what the switch policy is and hence notr mess with it