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

Posted on 2004-11-03
Last Modified: 2013-12-27
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.
Question by:netcool
    LVL 95

    Expert Comment

    by:Lee W, MVP
    LVL 38

    Accepted Solution

    1. make sure your /etc/resolv.conf file looks like:


    replace "" 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   in the file, replace " " with your router IP

    echo "" > /etc/defaultrouter

    then reboot.
    LVL 7

    Expert Comment

    no need to reboot for those changes yuzh, at most:

    /etc/init.d/nscd stop
    /etc/init.d/nscd start
    route add 0 1

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
    About FreeBSD Jails In FreeBSD, jails are a way of doing operating system level virtualization.  The basis of FreeBSD jails is chroot (, which changes the root directory of processes.  As a…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now