. A record
A record represents the corresponding relationship between host name and IP address, which is to convert the name to an IP address
DNS uses a record to answer "What is the IP address of a host name?" "
The host name must be translated into an IP address using a record, and the network layer knows how to select the route and send the packet to the destination
CNAME Records
Some names do not have a corresponding IP address, but are aliases for a host name.
CNAME record represents the correspondence between the alias and the canonical host name (canonical name)
If the administrator may announce the host name of their website is www.a.com, but in fact www.a.com is only a CNAME record pointing to server1.a.com. During server1.a.com maintenance, the www.a.com can be temporarily pointed to server2.a.com
MX record
MX records provide message routing information
Provides the host name and corresponding priority value of the mail exchanger (mail exchanger) for the network domain
When the MTA wants to send a message to a domain, it gives priority to sending the message to the MX host of that network domain
The same domain may have more than one mail exchanger, so each MX record has a priority value that the MTA can use as the basis for selecting the MX host
PTR records
The PTR record represents the corresponding relationship between "IP address" and "host name", which is exactly the opposite of a record
The DNS system uses a PTR record to answer "what is the host name of an IP address?"
RFC 882 conceives that a record and PTR records should be reciprocal, i.e.
From a record can be traced to the domain name to IP, from PTR can be traced from IP to domain name
However, when multiple domain names correspond to the same IP, the PTR record should point to the canonical host name of the IP address
Some networks use PTR records to verify that the client's host name is trustworthy
=============================================
DNS Resource record Syntax:
{Name} {TTL} addr-class record-type Record-specific-data
Name
Name of the domain record
Usually only the first DNS resource record is set to the name bar
For other resource records in the zone file, name may also be blank, in which case other resource records accept the name of the previous resource record
Ttl
The time that the live bar can choose
It specifies how long the data is kept in the database
This column is null to indicate that the default lifetime is specified at the beginning of the authorization resource record
Addr-class
Address class
A large range of address classes for Internet addresses and other information is in
Record-type
Record type
Often a NS MX CNAME
Record-specific-data
Data for record types
=============================================
. For each Internet domain or zone, two profiles are required
1 conversion settings domain for host name to IP
; Primary Domain
If you want the name server to be the authoritative name server for a specific domain, set the primary zone
Where the name server is configured as the primary name server for the abc.com domain
File is used to specify the profile name of a zone or domain, and if the file name specified here is related to the server's working directory, it must be in the working directory
Zone "ABC.com" {
Type master;
File "Abc.db";
};
; from the domain
;
If you set multiple name servers for a particular domain, you can use the Type Master option to set only one of the primary or authorized name servers
; Other name servers (unlimited) must be set to from the name server
;
; Here the current name server is set to abc.com domain from name server
The primary name server list specifies one or more IP addresses
; From the name server can be used to contact these IP addresses to update their zone copy
If the file option is specified, a copy of the zone configuration is written in this file, and file is recommended to speed up server startup
Zone "ABC.com" {
Type slave;
Masters {206.171.50.10; 206.171.50.12;};
File path_name;
};
; used to specify a set of root name servers
When the name server starts, it uses this list (implied) to discover a root name server, getting the most recent list of root name servers
Zone "." {
Type hint;
File path_name;
};
;
To set the domain name server as the primary domain name server for the 206.171.50.0 network
All IP to host name conversions to this 206.171.50.0 network (that is, reverse DNS) are handled by this domain name server
Zone "50.171.206.in-addr.arpa" {
Type master;
File "db.206.171.50";
};
======================================
; The beginning of SOA authorization
;
; An SOA or authorization start record is used to represent the start of a zone
; Each zone must have only one SOA record
; From the first name server, the 12-hour DNS service will be provided to stop providing DNS services for that zone after a specified time, without communicating with the primary server; still trying to communicate with the primary server
;
@ in SOA nameserver. Contact-email-address (
Serial_number;
Refresh_number; In seconds, a comparison between the name server and the primary name server determines whether to update
Retry_number; In seconds, how long to wait before a failed zone is retransmitted from the server for external reasons
Expire_number; In seconds, is the upper bound value of the validity period of the zone data used from the name server
Minimum_number; In seconds, is the limit of the lifetime TTL on resource records that do not have a specified lifetime in a zone file, and if there is a TTL value on a resource record in some zones, the minimum_number here is also minimal
)
@
is the name
And is always set to @
No other resource records in the same file can be duplicated
NameServer
Specifies the host name of the current domain name server
Contact-email-address
Specify the system administrator's email
;
; Name server host name is ns.abc.com
The e-mail address is kabir@abc.com (the @ of the message in the SOA record is replaced.)
@ in SOA ns.abc.com. Kdent.abc.com. (
1049310513; serial.
10800 Refresh;
3600; retry.
604800; expire.
900; TTL
)
==========================================
Ns
Name server
Used to specify a name server for the domain
In NS Name-server-hostname
Note: The name and TTL are not specified because names need only be specified in the SOA record using the @ character; TTL uses minimum in an SOA record
In NS ns.abc.com. Description ns.abc.com. Is the name of the current zone file server, you can specify multiple NS records
;
; Nameservers
;
ABC.com. In NS ns.abc.com.
===================================
A record
Address record
Used to specify an IP address for a specific host
Syntax: hostname in A ip-address
A record specifies the host name as the IP address
There should be a point after the full host name.
There should be at least one a record per host
Abbreviations can be used, at which point the abbreviation is added to the short name www. A 206.171.50.51; will specify www.abc.com
;
; Host Addresses
;
ABC.com. In A 192.168.100.50
www in A 192.168.100.50
Server1.abc.com. In A 192.168.100.200
Ns.abc.com. In A 192.168.100.5
Mail1.abc.com. In A 192.168.100.6
Mail2.abc.com. In A 192.168.100.50
Mail3.abc.com. In A 192.168.100.123
===================================
PTR records
Domain pointer
The PTR record represents the corresponding relationship between "IP address" and "host name", which is exactly the opposite of a record
The DNS system uses a PTR record to answer "what is the host name of an IP address?"
RFC 882 conceives that a record and PTR records should be reciprocal, i.e.
From a record can be traced to the domain name to IP, from PTR can be traced from IP to domain name
However, when multiple domain names correspond to the same IP, the PTR record should point to the canonical host name of the IP address
Some networks use PTR records to verify that the client's host name is trustworthy
Format
IP in PTR hostname.
206.171.50.51 in PTR www.abc.com.
can also be used for abbreviations
206.171.50.51 in PTR www//is also specified www.abc.com.
===================================
CNAME
Canonical naming
Specifies the alias of the canonical (official) hostname
Format:
Alias in CNAME canonical-hostname
;
; CNAME Records
;
Pop.abc.com. In CNAME mail1.abc.com.
Www.abc.com. In CNAME server1.abc.com.
You can also use abbreviations as follows
Pop in CNAME mail1.abc.com.
www in CNAME server1.abc.com.
===================================
Mx
Mail exchange
Used to specify the host name of the SMTP server that is set to the domain
Format:
In MX preference-value mail-server-hostname.
;
; MAIL Exchanger
;
In MX 0 mail.abc.com.
In MX ten mail1.abc.com.
In MX mail2.abc.com.
In MX mail3.abc.com.
===================================
Comments
In indicates that these resources are on the Internet