Configure the parser and create BIND-Linux Enterprise Application-Linux server application information. For more information, see. 1. Configure the parser
The parser is configured in the file/etc/resolv. conf.
The default parser configuration uses the following values:
Nameserver IP Address
Used for name servers that can be used. Up to three nameservers can be defined.
Domain
Defines the default domain. The default domain is used to create a domain search list, which contains only one domain.
For example:
Domain gogo.com
If you look for the IP address of the first host, the parser first looks for first.gogo.com. If the IP address cannot be resolved, the parser will make a final attempt to request the name server to resolve the first to the IP address.
Search
Define the search list.
Search can accept multiple parameters (up to six), while domain can carry only one parameter.
Example:
Serarch first.gogo.com second.gogo.com
If you search for the mail host, search mail.first.myhome.com first, and then mail.second.gogo.com. If no result is found, the parser will directly search for mail without any domain extension name. The example shows that the search command is more flexible than the domain command.
In the resolv. conf file, you can use either the serarch command or the domain command, but not both. Otherwise, unexpected results may occur. The key depends on which command is last executed.
If there is no search command, there is no domain command. The parser derives the domain name from the host name.
Other commands are not very important. Use the default value.
Host. conf file
The host. conf file is a configuration file used to set the priority of various name services.
Order bind hosts
Bind indicates the DNS service, and hosts indicates the/etc/hosts file.
Multi on
The multi option is used to determine whether multiple addresses can be allocated to the same host name in the/etc/hosts file. On
This option is available.
The first step to create BIND data is to convert the data in the host table to the corresponding DNS zone data.
One file maps all host names to addresses, while other files map addresses back to host names.
The lookup from name to address is called forward ing.
The lookup from the address to the name is called reverse ing.
Each network has a file containing its own ing data.
2. partition data files
Most of the entries in the zone data file are called DNS resource records ). DNS lookup is case-insensitive.
The order of resource records in data files is as follows:
SOA record
Indicates the region's authority
NS records
Name Server in the region
Other records
Data about hosts in the Zone
A name-to-address ing
PTR address-to-name ing
CNAME specification name
Note:
End at the end of the row starting with a semicolon.
Default TTL value of the Set area:
The name server provides this TTL value in the query response, allowing other servers to store data in the cache at the time specified by TTL.
Possible values:
W = week
D = Day
H = hour
M = minute
S = seconds
Example: $ TTL 3 h 3 hours
$ TTL 2w3d4h 2 weeks 3 days 4 hours
$ TTL 3 h
Myhome.com SOA jh.myhome.com. root.jh.myhome.com .(
; ^
Root is the user of the host jh.myhome.com.
2000020501; serial number
3 h; Refresh after 3 hours
1 h; 1 hour later.
1 w; 1 week late full
1 h) No cache TTL is 1 hour
$ TTL 3 h
@ SOA jh.myhome.com. root.jh.myhome.com .(
; ^
Root is the user of the host jh.myhome.com.
2000020501; serial number
3 h; Refresh after 3 hours
1 h; 1 hour later.
1 w; 1 week late full
1 h) No cache TTL is 1 hour
There is a difference between them. @ indicates the current source in the SOA type Record Name field, which is myhome.com.
NS jh.myhome.com.
; Name Server
MX 10 jh.myhome.com.
; Email server
One A 192.168.1.1
A 192.168.1.2
; Repeat the last name. The above name has two address records
When A 192.168.1.1
Three CNAME jh.myhome.com.
The alias points to jh.myhome.com.
Yj11 A 192.168.1.2
Yj22 A 192.168.1.2
All of the above are abbreviations, but the following is not a standard writing method. Let's make a comparison:
Ns in jh.myhome.com.
; Name Server
Mx in 10 jh.myhome.com.
; Email server
One.myhome.com. in a 192.168.1.1
Jh.myhome.com. in a 192.168.1.1
Three.myhome.com. in cname jh.myhome.com.
The alias points to jh.myhome.com.
Yj11.myhome.com. in a 192.168.1.2
Yj22.myhome.com. in a 192.168.1.2
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.