no name resolution on local domain

Discussion in 'Linux Networking' started by Volker Jesinghaus, Nov 7, 2004.

  1. Hello,
    i have a problem with name resolution on a linux
    server. I have a propper configuration of DNS-Server
    adresses because its possible to ping for example to
    google.de. The DNS server is the root server for
    our local domain 'servenet.local' and there are
    several host entrys. If i go to a windows client
    with the same DNS Server configuration its possible to ping
    to ap001 or ap001.servenet.local.
    A ping on the linux machine gives a 'host not found'.
    With 'dig A ap001' i get the correct answer from the server,
    so i make a 'tcpdump port 53' with the effect that
    ping don't ask the DNS Server for the local domain.

    Does anybody knows why there is no DNS request for
    the local domain ?

    Thanks
    Volker Jesinghaus
     
    Volker Jesinghaus, Nov 7, 2004
    #1
    1. Advertisements

  2. Volker Jesinghaus

    AnthonyM Guest

    Volker,

    In my limited experience, I have noticed that dig doesn't use the
    /etc/resolv.conf and /etc/host.conf files, but ping does.

    Check resolv.conf and make sure you have these entries:
    --------------
    domain servenet.local
    nameserver 127.0.0.1
    ---------------

    Check host.conf and make sure you have these entries:
    -----------------
    order hosts bind
    multi on
    ------------------
    Check the man pages on these files if you have any questions on the
    syntax or what it means.

    Hope this helps

    Anthony Altemara
     
    AnthonyM, Nov 8, 2004
    #2
    1. Advertisements

  3. Volker Jesinghaus

    Moe Trin Guest

    Not meant as a slam - you are doing good.
    Close. 'dig' (and 'dnsquery' and 'host' and the deprecated 'nslookup'
    are DNS tools, and as such ONLY query the localhost name server or
    the name servers listed in the /etc/resolv.conf file by default. 'dig'
    does not look at the 'domain' or 'search' entries (dnsquery, host,
    and nslookup do).

    You are correct about dig (and the other DNS query tools) ignoring
    the /etc/host.conf file. They also ignore /etc/nsswitch.conf.
    Do read the man page for 'resolver' and see exactly what the 'domain'
    keyword does. There is also a 'search' directive that may be useful,
    but because the two directives are not compatible, the last one
    found in the /etc/resolv.conf file OVERRIDES the other.

    Also, 127.0.0.1 (or _any_ address) should only be listed as a name server
    if it is able to answer ALL queries. The resolver believes the first
    answer it receives, even if that answer is "I don't know".

    By default the resolver (and DNS query tools) look FIRST for a name
    server running on localhost even if localhost (or 127.0.0.1) is not
    listed in /etc/resolv.conf. The 'nameserver' directive is used to
    override asking localhost - meaning use this address INSTEAD OF
    localhost.

    Lastly, by default, /etc/resolv.conf can only contain up to $MAXNS
    /etc/host.conf is for the libc5 libraries. Virtually all Linux now
    use glibc2 (formally known as libc6) and that uses /etc/nsswitch.conf
    for this. You need to have a line referring to hosts, that at least
    has

    hosts: files dns

    which says to check the local hosts file first, then check DNS if the
    answer isn't in the hosts file. Your distribution probably includes
    'nis' and/or 'nisplus' keys which refer to NIS (Yellowpages) services
    not normally used at home. It's explained in the 'nsswitch.conf' man page.
    Nicely done.

    Old guy
     
    Moe Trin, Nov 8, 2004
    #3
  4. I know SuSE used to use "local" as a local domain, but that no longer
    works, because local tld (after the last dot) is now reserved for
    something else (multicast?). Just change "local" to something else bogus.
     
    David Efflandt, Nov 9, 2004
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.