Solved

DNS search path in linux

Posted on 2006-06-09
2
4,798 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
ID: 16873991
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
ID: 16874014
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
error log using ftp 7 56
SUSE Linux Enterprise 11.x Ensure tftp server is not enabled 1 45
CLI command keep running after close 7 37
Check for Linux process in script 7 49
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

820 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