Solved

DNS search path in linux

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

932 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

15 Experts available now in Live!

Get 1:1 Help Now