How to ping a server with DNS name in Sun environment.

What are things to do, when we try to ping server using DNS from a Sun Solaris Server. Currently  using ipaddress server are able to ping but how to use DNS to ping. Is there any Setup to enalbe DNS ping?  Please help.
LVL 5
netcoolAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
0
yuzhCommented:
1. make sure your /etc/resolv.conf file looks like:

nameserver 123.123.20.5

replace "123.123.20.5" with your DNS server IP

2. check  your /etc/nsswitch.conf  file, and make sure that it has:

hosts:     files dns [NOTFOUND=continue]

# you can just modify the record to make it use files and DNS

3. If you had done step 1 & step 2 and it still not working, try:
to specify the defaulterouter:

vi /etc/defaultrouter
and put 123.123.10.1   in the file, replace "123.123.10.1 " with your router IP

or
echo "123.123.10.1" > /etc/defaultrouter

then reboot.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rugdogCommented:
no need to reboot for those changes yuzh, at most:

/etc/init.d/nscd stop
/etc/init.d/nscd start
   and
route add 0 123.123.10.1 1
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.