Solved

DNS search path in linux

Posted on 2006-06-09
2
4,732 Views
Last Modified: 2013-12-06
What is the DNS search path in linux and what does it do? (On fedora core 4)
0
Comment
Question by:burnsj2
2 Comments
 
LVL 23

Expert Comment

by:brettmjohnson
Comment Utility
DNS (Domain Name Service) is the service that looks up a computers Internet Protocol Address (IP address) based upon the machine's network name.  For instance, given the host name "www.apple.com", I can resolve its IP address (17.254.0.91).  This is necessary for computer-to-computer communications, as IP traffic uses addresses, not names, to identify the source and destination computers for data packets.

There are very many machines running domain name services on the internet, so the DNS search path is basically a short list of Domain Name Servers that a computer will communicate with when attempting to resolve names.  For instance, businesses will usually have a corporate DNS server that knows the names and address of all the machines on the corporate network.  If the computer name you lookup is not one of the corporation's machines, then the lookup is handed off to a DNS of the broader internet (typically belonging to the business's ISP).  The list of DNS servers a computer uses (and the order in which to use them) is usually specified in a file called /etc/resolv.conf .

If I can make an crude analogy to looking up someone's phone number, name resolution would look something like this:

1) Look up host name address in local known hosts file /etc/hosts - equivalent to look up in a phone book or Rolodex in your possession.
2) Look up host name in corporate DNS server - equivalent to calling the company switchboard operator and asking for a colleague's extension.
3) Look up host name in ISP's DNS server - equivalent to calling local region directory assistance.
4) Look up host name in wider DNS server - equivalent to getting the area code of a remote city, then calling that directory assistance.

DNS service tends to be hierarchical, so your corporate DNS service typically knows to hand off unsatisfied requests to the ISP server, and the ISP server hands off unsatisfied requests to Tier-1 servers, and the Tier-1 servers know the "area codes" of all the remote regions to direct requests.

For more information about DNS see:
http://en.wikipedia.org/wiki/Domain_name_system
0
 
LVL 14

Accepted Solution

by:
canali earned 250 total points
Comment Utility
ex.
if your search path in resolv.conf is  microsoft.com mit.edu
add the following line in your resolv.conf
serarch  microsoft.com mit.edu

then try this command
ping star
[root@mail root]# ping star
PING star.mit.edu (18.58.1.222) 56(84) bytes of data.
--- star.mit.edu ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 7011ms
the queries will be attempted using each component  of the search path in turn  until  a  match  is  found...

man resolv.conf
http://www.minix3.org/manpages/man5/resolver.5.html

GAS
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

12 Experts available now in Live!

Get 1:1 Help Now