Solved

DNS search path in linux

Posted on 2006-06-09
2
4,761 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
capture pcap with filtered traffic 1 61
Centos 6 User Can't Assign Password 2 42
Need BIOS update Linux for MSI X99A motherboard. 4 41
Run Secure WMI query from CentOS 5 29
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

776 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