Find the answer to your Linux question:
Results 1 to 9 of 9
Hi, If I attempt to resolve an unknown domain via ping I receive a ping reply from a host of the domain which the server is a part of. For ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2004
    Location
    MI
    Posts
    5

    Possible DNS Problem


    Hi,

    If I attempt to resolve an unknown domain via ping I receive a ping reply from a host of the domain which the server is a part of. For example say I ping www.notvaliddomain.com I receive a response from server.mydomain.com where mydomain is the domain name which the server is a member of. The problem is machine specific as when I ping the same invalid domain on another machine ping returns unknown host www.notvaliddomain.com.

    Anyone have any ideas why this is happening?

    Thanks,

    Tamkio

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That's interesting... if you have the bind-tools installed, run `host www.notvaliddomain.com' on the affected machine and post what that returns. That will help filter out if it's a DNS problem or other name switch misconfiguration.

  3. #3
    Just Joined!
    Join Date
    Mar 2004
    Location
    MI
    Posts
    5
    Quote Originally Posted by Dolda2000
    That's interesting... if you have the bind-tools installed, run `host www.notvaliddomain.com' on the affected machine and post what that returns. That will help filter out if it's a DNS problem or other name switch misconfiguration.
    Dolda2000,

    Thanks for your reply. I ran host www.notvaliddomain.com and it returned:

    Host www.notvaliddomain.com not found: 3(NXDOMAIN)

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Then it must be some other weird kind of problem... Can you post your /etc/hosts and /etc/nsswitch.conf?

  5. #5
    Just Joined!
    Join Date
    Mar 2004
    Location
    MI
    Posts
    5
    Quote Originally Posted by Dolda2000
    Then it must be some other weird kind of problem... Can you post your /etc/hosts and /etc/nsswitch.conf?
    Here are the files:
    hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost localhost.localdomain


    nsswitch.conf
    #
    # /etc/nsswitch.conf
    #
    # An example Name Service Switch config file. This file should be
    # sorted with the most-used services at the beginning.
    #
    # The entry '[NOTFOUND=return]' means that the search for an
    # entry should stop if the search in the previous entry turned
    # up nothing. Note that if the search failed due to some other reason
    # (like no NIS server responding) then the search continues with the
    # next entry.
    #
    # Legal entries are:
    #
    # nisplus or nis+ Use NIS+ (NIS version 3)
    # nis or yp Use NIS (NIS version 2), also called YP
    # dns Use DNS (Domain Name Service)
    # files Use the local files
    # db Use the local database (.db) files
    # compat Use NIS on compat mode
    # hesiod Use Hesiod for user lookups
    # [NOTFOUND=return] Stop searching if not found so far
    #

    # To use db, put the "db" in front of "files" for entries you want to be
    # looked up first in the databases
    #
    # Example:
    #passwd: db files nisplus nis
    #shadow: db files nisplus nis
    #group: db files nisplus nis

    passwd: files
    shadow: files
    group: files

    #hosts: db files nisplus nis dns
    hosts: files dns

    # Example - obey only what nisplus tells us...
    #services: nisplus [NOTFOUND=return] files
    #networks: nisplus [NOTFOUND=return] files
    #protocols: nisplus [NOTFOUND=return] files
    #rpc: nisplus [NOTFOUND=return] files
    #ethers: nisplus [NOTFOUND=return] files
    #netmasks: nisplus [NOTFOUND=return] files

    bootparams: nisplus [NOTFOUND=return] files

    ethers: files
    netmasks: files
    networks: files
    protocols: files
    rpc: files
    services: files

    netgroup: files

    publickey: nisplus

    automount: files
    aliases: files nisplus

    Thanks again.

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Nothing wrong there either. Do other programs that use the nsswitch calls exhibit the same behavior (like `traceroute www.notvaliddomain.com')?

  7. #7
    Just Joined!
    Join Date
    Mar 2004
    Location
    MI
    Posts
    5
    Quote Originally Posted by Dolda2000
    Nothing wrong there either. Do other programs that use the nsswitch calls exhibit the same behavior (like `traceroute www.notvaliddomain.com')?
    Yes, same behavior. This is hard to solve. I first noticed the problem when I pointed my web browser at a site that was unreachable and our web site default page was displayed.

  8. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Of course, the great thing with Linux is that issues like this always can be solved. The more sophisticated debugging methods are very hard to use without access to the actual computer, though. I still have some tricks left up my sleeves, though. Can you run the following command, which will generate a file called `ping.strace', and mail that file to me (I'll put it up on my HTTP server so that everyone can see it)?
    Code:
    strace -o ping.strace -f ping www.notvaliddomain.com

  9. #9
    Just Joined!
    Join Date
    Mar 2004
    Location
    MI
    Posts
    5
    Dolda2000,

    Just getting back to this project...I finally solved the mistery. I changed the hostname on the test server from the fully qualified name e.g. server.mydomain.com to just the hostname of server. Now when I ping notavaliddomain ping returns: unknown host notvaliddomain.com

    Thanks again for all you help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •