DNS: Domain name resolution common BIND domain name server (domain Service)
Host Name: www.magedu.com
Domain Name: magedu.com (magedu This field is saved under. com)
FQDN: Fully Qualified domain name
DNS: Name resolution (behind the query process, database)
FQDN (domain name) <--> IP (address)
Nsswitch: Provides a platform for name resolution for a variety of mechanisms that need to implement name resolution
Host local/etc/hosts holds the relationship between host name and IP address
When Ping www.magedu.com, search for/etc/hosts file by stub resolver name resolver
If it's not there, find DNS resolution.
Hosts
IPAddr FQDN Ailaese
172.16.0.1 www.magedu.com www
In the early days, the information in the hosts was updated through periodic tasks, but with more and more entries;
IANA establishes server server, client requests, server returns request
After the server is not good, the emergence of a distributed database, is to divide the authority into a slice
DNS root domain
. net. com. org <----TLD top-level domains
| | |
magedu IBM kernel
TLD: There are three common types of:
Organizational domain:. com. org. net. cc
Country domain:. CN. tw. HK. IQ. JP. ir
Reverse domain: IP-to host name (FQDN)
Forward Domain: Host name (FQDN)--IP pros and cons not a database
Recursive: a Q b b q c c Answer b b then tell a
Iteration: A ask b b answer said C understand a again ask C C again answer a
DNS root domain For security purposes, no recursion for anyone
We often play this way:
Example: IBM has a client host St1 want to find www.magedu.com (NS is a server for resolving domain names)
ST1 to NS request, NS to find root domain, Root said. com know ns to find. com; COM tells you magedu know, NS went to find magedu;magedu reply said I know to return the information to ns,ns the day to save the information.
When Sta2 again wants to access the magedu, the NS initiates the request, it can directly extract the stored address (for ST1 is recursive, for the NS is iterative, for the client is recursive, to the server side is iterative)
But the cache also has a deadline, because Mageduip is likely to change. Cache duration, relative to your IP's frequency of change
But the NS server is also money ah, in fact, a server is available for multiple top-level domain access
Example: Under the root domain, a NS is set above the top-level domain, and the database of this machine is called the authorization database. He clearly identifies the trust information for the top-level domain.
Summarize:
Inquire:
Recursive: Only one request is issued
Iteration: Making multiple requests
Analytical:
Forward: FQDN-to-IP
Reverse: IP-to-FQDN
Two-segment: client recursion, server iteration
DNS: Distributed Database
The superior only knows its direct subordinate
Subordinates need to be configured to know who the superior is.
TTL: Returns the cache length, the negative answer is also cached, you can specify the length of time
DNS server:
Accept query requests from local clients (recursive)
External client request (Request authoritative answer)
There is also the possibility of a cheap: IBM below the user to visit kernel NS, access to the non-authoritative answer
DNS only gives the user on-chip recursion, not on-chip not recursive
19--2
Global and Server 13, most in the United States
NDS server:
Primary DNS server : Data modification is done here (and prompts the secondary server, which updates AH)
Secondary DNS server : Request data Synchronization (request a pair of ledgers once every time)
The primary server is hung up, the secondary DNS will be visited on a regular basis, more than the specified time to hang up on their own
The primary DNS server has a version number, and a version number is also available from the DNS server; The master changes the version number to add 1; From the discovery of the change of the Lord, from the change;; so we want to define!!!
Serial Number: Version
Refresh: Check the time period
Retry: Check once, primary DNS does not give a response, define retry time
Expire: Expiration time, when the secondary server died
Nagative answer TTL: Otherwise the answer is cached for a length of time
Summarize
DNS Server type:
Caching DNS servers
Transponder
Primary DNS Server
Secondary DNS server
#########################################
FQDN: Host Name
###########################################
Each entry in the database is called a resource record
Format of the resource record:
Resource one:
NAME TTL (can be saved; global) in RRT (resource record Type) value
Www.magedu,com. In A 1.1.1.1
Resource two:
1.1.1.1 in PTR www.magedu.com.
RRT: Resource record type (by which to identify who is the mail server, and so on)
"SOA must appear in the first section of the zone data file, indicating how multiple DNS servers within a region are synchronized."
0. SOA: Start authorization record; Identify how data is synchronized between regions
Zone_name TTL in SOA FQDN administrator_mailbox (e-mail address) (
Serial number version
Time period for refresh check
Retry primary DNS does not give a response, define the retry time
Expire Expiration Time
Na ttl negative answer cache duration)
Time unit: M minutes h hours d days W week default unit seconds
Mailbox format: admin.magedu.com (replace @ with.)
@: His meaning represents the region name
Formal wording One:
Maged.com. In SOA ns1.magedu.com. Admin.magedu.com. (
2013040101 version number, no more than 10 bits
1H Refresh Time 1 hours
5M 5 minutes to retry
1W Expiration Time 1 weeks
1D cache for negative answers 1 days long)
"Can be written in one line, parentheses can be omitted, spaces separated, semicolon can be followed by comments"
1. Ns:name Server from domain to FQDN
Format: This film's length is this guy:
Slice Name: Cache time-long host name
Magedu.com. In NS ns.magedu.com.
Ns.magedu.com. In A 1.1.1.2
5. MX: Mail exchanger from zone to FQDN
Mail server priority 0-99, the lower the number of the higher level, once the high level is not the line, the second top;
Zone_name TTL in MX pri (priority) VALUE
Magedu.com. In MX ten mail.magedu,com.
Mail.magedu.com in A 1.1.1.3 This record is the FQDN--and host name
[If there are more than one DNS server, we will identify who is the Lord who is from] when defining the domain.
2, A:fqdn---IPv4 hostname converted to IP address
3, Aaaa:fqdn---IPV6 convert hostname to IPV6
4.PTR: IP---> FQDN
6, Cname:fqdn and FQDN alias record; WWW2 is the alias of www; www is the official name of WWW2
Www2.magedu.com. In CNAME www.magedu.com.
7. TXT
8, CHAOS
9. SRV
######################################################################
The difference between domains and regions:
1, Domain: Domain logic concept in the realm of both forward parsing, but also to implement the reverse, so to build two data files; they add up to the domain.
2, Zone: Zone physical concept area is the real data file stored in the domain
Example: We acquired a domain name and obtained an IP from ICANN
Premise: We explicitly define, authorize on. com
Magedu.com. In NS ns,magedu.com.
Ns.magedu.com in NS 192.168.0.10
Magedu.com. 192.168.0.0/24
Then in our company bought host, Cloth good network cable, which host configured to 192.168.0.10 which machine is the DNS server (responsible for our entire domain network resolution, we have two servers are:
www 192.168.0.1
Mail 192.168.0.2,mx (This is the mail server)
Create two zone files (forward reverse)
forward zone files: (abbreviated with @ Replace)
magedu.com./@ in SOA ( first must be SOA) NS
Reverse zone file : (The network segment address is written in reverse)
0.168.192.in-addr.arpa. In SOA
prt notation: FQDN-->ip
Www.magedu.com. In A 192.168.0.1
Abbreviated www in A 192.168.0.1
ptr notation: IP-to host name
192.168.0.1 in PTR www.magedu.com.
No shorthand.
1.0.168.192.in-addr.arp. In PTR www.magedu.com.
Shorthand: 1 in PTR www.magedu.com.
############################################################
MX: Defined only in the forward direction
NS: Record both positive and negative definitions
A: can only be defined in the forward
PTR: can only be defined in reverse
############################################################
Zone Transfer Type:
Full zone transfer: AXFR all over again
Incremental zone transfer L:IXFR only transfers the changed content
Zone Type:
Primary zone: Master
From zone: Slave
Hint area: Hint define where the root is
Forwarding Area: Forward
##########################################################
DNS-related concepts