/etc/resolv.conf Document Detailed

Source: Internet
Author: User
Tags domain name server nameserver

Go from: http://www.cnblogs.com/Alight/p/4351155.html

/etc/resolv.conf It is a DNS client configuration file that sets the IP address and DNS domain name of the DNS server, and also contains the domain name search order for the host. The file is a configuration file that is used by the domain name Parser (resolver, a library that resolves IP addresses based on the host name). Its format is simple, each line starts with a keyword, followed by one or more arguments separated by a space. There are four key words in the resolv.conf: nameserver   //define the IP address of the DNS server domain       Define a local domain name search        //A search list that defines a domain name sortlist         //to sort the returned domain name below we give a/etc/resolv.conf example: domain  51osos.com search  www.51osos.com   51osos.com nameserver 202.102.192.68 nameserver 202.102.192.69 is the most important nameserver keyword, If you do not specify NameServer, the DNS server cannot be found, and other keywords are optional. NameServer indicates that the host specified by this address is a domain name server when resolving a domain name. The domain name servers are queried in the order in which they appear in the file, and only if the first nameserver does not respond to the query below nameserver. Domain declares the name of the host. Many programs use it, such as the messaging system, when DNS queries are made for hosts that do not have domain names. If no domain name, host name is used, delete all at the first point (.) The previous content. Search its multiple parameters indicate the order of the domain name query. When you want to query a host that does not have a domain name, the host is found separately in the domain declared by search. Domain and search cannot coexist; if present, the following will be used. Sortlist allows the result of the domain name to be given a specific sort. Its parameters are network/mask pairs, allowing arbitrary order of arrangement.     "Search domainname.com" means that when a host name is provided that does not include a full domain name, theAdd domainname.com suffix after host name; "NameServer" indicates that the host specified by this address when resolving a domain name is a domain name server. The domain name servers are queried in the order in which they appear in the file. where domainname and search can exist at the same time, but only one; nameserver can specify multiple     valid parameters and their meanings are as follows:

NameServer indicates the IP address of the DNS server. There can be many rows of nameserver, each with an IP address. In the query, press nameserver in the order in this file, and only if the first nameserver does not respond to query the following nameserver.

Domain declares the name of the host. Many programs use it, such as the messaging system, when DNS queries are made for hosts that do not have domain names. If no domain name, host name is used, delete all at the first point (.) The previous content.

Search its multiple parameters indicate the order of the domain name query. When you want to query a host that does not have a domain name, the host is found separately in the domain declared by search. Domain and search cannot coexist; if present, the following will be used.

Sortlist allows the result of the domain name to be given a specific sort. Its parameters are network/mask pairs, allowing arbitrary order of arrangement.

The default/etc/resolv.conf file is not provided in Red hat, and its contents are dynamically created based on the options given at installation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.