Solved

DNS search path in linux

Posted on 2006-06-09
2
4,826 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
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…
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.
Suggested Courses

739 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