Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Configure DNS IP Address on HP-UX Server

SOLVED
Go to solution
Suriya Prakash
Regular Advisor

Configure DNS IP Address on HP-UX Server

We are using HP-UX v11.31.
I want to access internet from this server. for that i need to configure DNS IP address on this server.
We dont have any DNS server.
Normally we use internet in windows PC by configuring DNS IP address given by sify(ISP) on preffered and alternate dns column on tcp/ip protocol.
I have a DNS IP address provide by sify.
I want to configure it on unix server to access the internet.
Pls help me in this regard.
Thanks in advance.
18 REPLIES
Michal Kapalka (mikap)
Honored Contributor
Solution

Re: Configure DNS IP Address on HP-UX Server

hi,

create a /etc/resolv.conf file and add this entries :

nameserver IP_adress_of_your_ISP_DNS_server

mikap
Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

I add the entry in /etc/resolv.conf
but i'm not able to even ping the address.
and i also want to know how to configure the proxy server address on unix box.
Aneesh Mohan
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server


>> Not able to ping
Not sure , may be ICMP packets are disabled.

Check it using traceroute
#traceroute DNS IP

Check You can access the default DNS port of your DNS server from you HPUX system
#telnet DNSIP 53

Aneesh
Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

I got the below error msgs while try the commands.

# traceroute 208.67.222.222
traceroute to 208.67.222.222 (208.67.222.222), 30 hops max, 40 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * *


# telnet 208.67.222.222 53
Trying...
telnet: Unable to connect to remote host: Connection refused
Michal Kapalka (mikap)
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server

hi,

check if you have defined the /etc/nsswitch.conf

and if you have default route defined, on your servers.

netstat -nr


mikap
Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

Hi,

Thanks for response

Pls check the below results

# cat /etc/nsswitch.conf
cat: Cannot open /etc/nsswitch.conf: No such file or directory

# netstat -nr
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
100.100.100.2 100.100.100.2 UH 0 lan1 32808
172.23.9.12 172.23.9.12 UH 0 lan0:1 32808
172.23.9.2 172.23.9.2 UH 0 lan0 32808
172.23.9.0 172.23.9.2 U 3 lan0 1500
172.23.9.0 172.23.9.12 U 3 lan0:1 1500
100.100.100.0 100.100.100.2 U 2 lan1 1500
127.0.0.0 127.0.0.1 U 0 lo0 32808
default 172.23.9.10 UG 0 lan0 1500
#

After configure the dns address on resolv.conf, my telnet session opens very slowly. it takes around 2 mins to open the session. if i delete the entry it opens at the second.
Michal Kapalka (mikap)
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server

hi,

thats normal, because your server try to resolve your, remote computer.

add the client from that you are telneting to the /etc/hosts ( for testing )

IP_client name alias1 alias2 FDQN

for example.

mikap
Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

Hi,

I'm not getting you.

What to add in etc/hosts file.

Suriya
Aneesh Mohan
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server

Hi ,

You dont have network access to your DNS server 208.67.222.222.

Check with you Network Administrator.

You can remove nameserver entries in /etc/resolv.conf now or /etc/resolv.conf file itself, since you cannot use your nameserver

Aneesh
rick jones
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server

Can you even ping the IP of your default router? Can you ping anything else in the same IP subnet as your HP-UX system? Does lanadmin/nwmgr show the physical link status as being up?
there is no rest for the wicked yet the virtuous have no pillows
Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

Hi,

I have edited the /etc/resolv.conf and /etc/nsswitch.conf file.

Pls check the below edited files.


# cat /etc/resolv.conf
domain easyserver.easyaccess.com
nameserver 208.67.222.222
nameserver 208.67.220.220

#
passwd: files
group: files
hosts: files
ipnodes: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
#

I don't know wheather its correct or not.

I'm new to unix.

Pls guide me to correct my mistakes.

Thanks,
Suriya

Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

Sorry, /etc/nsswitch.conf file was wrongly pasted. find the below result.

#
passwd: files
group: files
hosts: files dns
ipnodes: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
#
Viktor Balogh
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server


Hi Prakash,

The above files are correct, but it seems that first you need to troubleshoot internet connectivity. Maybe you're behind a firewall and only access to the local network is allowed.

try this:

# ping 172.23.9.10

Regards,
Viktor
****
Unix operates with beer.
Steven Schweda
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server

I'm lost. What works? What doesn't work?

> # traceroute 208.67.222.222
> traceroute to 208.67.222.222 (208.67.222.222), 30 hops max, 40 byte packets
> 1 * * *
> [...]

Many possible reasons for that.

> # telnet 208.67.222.222 53
> Trying...
> telnet: Unable to connect to remote host: Connection refused

"Connection refused" normally means that
there is no server listening (or registered)
at that port. Some clever firewalls may be
able to simulate this, however.

I can get to 208.67.222.222 from my system:

ALP $ nslookup www.hp.com 208.67.222.222
Server: resolver1.opendns.com
Address: 208.67.222.222

Non-authoritative answer:
Name: www.hpgtm.nsatc.net
Addresses: 15.217.120.22, 15.193.112.22
Aliases: www.hp.com

So, if you can't do that well, then I'd agree
with this:

> [...] it seems that first you need to
> troubleshoot internet connectivity.

Can you get to anything in the outside world
in any way? ("telnet 15.217.120.22 80", or
anything?)
Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

Hi Guys,

Thanks for your response.

The problem was sorted out.

The issue is with the firewall settings.

But i didn,t configure the /etc/resolv.conf and /etc/nsswitch.conf.

Without configuring this i'm able to access the internet.

Can anyone pls explain me about the above files.

Whats the purpose of configuring these files.

Thanks,
Suriya.
Steven Schweda
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server

> Can anyone pls explain me about the above
> files.

Is "man" broken on your system?

man resolv.conf
man nsswitch.conf

> What[']s the purpose of configuring these
> files.

To get behavior other than the default
behavior?
Viktor Balogh
Honored Contributor

Re: Configure DNS IP Address on HP-UX Server

>Whats the purpose of configuring these files.

/etc/nsswitch.conf
Basically in this file you can set up which methods to use for name service resolution. Name services are e.g. user-databases (like /etc/passwd) or the database for storing host ip and name mappings like /etc/hosts or DNS.

/etc/resolv.conf
Among other things this file tells the system which name server to use for name resolution, if the use of name server is configured in nsswitch.conf


This was just a quick introduction to these files and its purposes, for more info read the man pages.
****
Unix operates with beer.
Suriya Prakash
Regular Advisor

Re: Configure DNS IP Address on HP-UX Server

Hi,

Thank u all for ur replies and solution.

Regards,
Suriya.