1831207 Members
3265 Online
110021 Solutions
New Discussion

DNS client configuration

 
Md. Alamgir Khan
Occasional Advisor

DNS client configuration

Hi there,

I have a DNS server. I need to configure client HP-UX machine. How can I configure DNS in HP-UX machine? Machine rp7420, OS HP-UX 11i.

Pls help me asap.

Thanks
Alamgir
Systems Engineer
FLORA TELECOM

7 REPLIES 7
Ninad_1
Honored Contributor

Re: DNS client configuration

If you already have DNS server, then it is pretty simple to configure your other boxes as DNS client.

On the server which you want as DNS client
1. Edit /etc/nsswitch.conf and modify the hosts entry to look like
hosts: dns [TRYAGAIN=continue NOTFOUND=continue] files
and modify aliases entry to look like
aliases: dns files

2. In the file /etc/resolv.conf add the entries for your DNS server as below e.g.
nameserver 10.220.1.5

Thats all.

Regards,
Ninad
nanan
Trusted Contributor

Re: DNS client configuration

Hi

It may be easy to use SAM like beloow step

sam > select Network and Communication > DNS (Bind) > DNS Resolver

In the mune, you can define the name server IP and hostname.
Once you finish inpuuting, the DNS information is reflected your system automatically.

Regards
Md. Alamgir Khan
Occasional Advisor

Re: DNS client configuration

hi,

In fact I need to ping hostname of the system. I can ping using ip_address of the system but can not ping using the hostname. In the /etc/hosts file I have enter the ip_address and hostname in the second line and loopback address is in the first line. There is no alias entry in the /etc/hosts file.

So to resolve the hostname what else I need to do. Say, if I don't have a DNS server in my LAN.
Md. Alamgir Khan
Occasional Advisor

Re: DNS client configuration

hi,

In fact I need to ping hostname of the system. I can ping using ip_address of the system but can not ping using the hostname. In the /etc/hosts file I have enter the ip_address and hostname in the second line and loopback address is in the first line. There is no alias entry in the /etc/hosts file.

So to resolve the hostname what else I need to do. Say, if I don't have a DNS server in my LAN.
Ninad_1
Honored Contributor

Re: DNS client configuration

Hi,


Contrary to your earlier question - which you said you have a DNS server and you want to configure a DNS client, it seems you wish to use /etc/hosts file instead.

If you dont have DNS server, then you can use the /etc/hosts file to map server names to ip addresses. e.g. /etc/hosts file
127.0.0.1 localhost loopback
10.140.2.79 server1
10.141.2.74 server2
10.140.84.71 server3


Also you can set the /etc/nsswitch file hosts entry as -
hosts files

And you should be able to ping the servers mentioned in the /etc/hosts file using server name.

Can you paste your /etc/hosts and /etc/nsswitch.conf files here if you still have any problems.


Regards,
Ninad
nanan
Trusted Contributor

Re: DNS client configuration

As stated you have DNS, I provided you with just procedure of configuring DNS client, but your problem wasn't that.

You really should consider two files /etc/hosts and /etc/nsswitch.conf
as Ninaid said..

regards
nanan
IT_2007
Honored Contributor

Re: DNS client configuration

You need to change lookup sequence in nsswitch.conf looking from

files [NOTFOUND=continue] dns

also put alias for your hostname in /etc/hosts file like

alias name