Tcpip (12) DNS

Source: Internet
Author: User
Tags fully qualified domain name

1. DNS is a type of application for TCP/IPProgramIs a distributed database that provides conversion between host names and IP addresses, as well as information about email routing. From the application perspective, there are actually two library functions: gethostbyname () and gethostbyaddr ().

2. DNS is a distributed database that uses a tree-like directory structure to allocate the management right of host names to DNS servers at all levels, so that management and modification can be done locally at each layer, this reduces the amount of data on each server, making it easier to manage data.

The complete domain name is a string separated by ".", and each part represents a domain or host name. For example, www.tsinghua.edu.cn. and www.zju.edu.cn. these are two complete domain names, but although they are not the same machine, they have the same host name www, while there are many hosts with the same name on the Internet, how to accurately locate a host? This requires determining the domain to which they belong, so that even if there are more hosts named WWW, we can find it accurately in different domains.

3. FQDN: full domain name (FQDN, fully qualified domain name) indicates the host name and full path. All domain members (including root) in the sequence are listed in the full path ). A full domain name can logically and accurately indicate where the host is located. It can also be said that a full domain name is a full representation of the host name.

4. pointer query (reverse query): queries the corresponding domain name based on the IP address. DNS uses another tree for this reverse query, its root node is the in-addr.arpa, the next level is the first byte of the IP, and the next level is the next byte of the IP, and so on.

Example:
# Host 140.252.13.34
34.13.252.140.in-ADDR. Arpa Domain Name Pointer pipen14.tuc.noao.edu.
# Host tuc.noao.edu
Tuc.noao.edu is an alias for noao.tuc.noao.edu.
Noao.tuc.noao.edu has address 140.252.1.28
Noao.tuc.noao.edu mail is handled by 10 barracuda-1.tuc.noao.edu.

5. Resource Record (RR)

A record: Used to Query IP addresses
PTR record: used for pointer Query
Cname: indicates the "canonical name", which is used to represent a domain name, also known as an alias.
HINFO: indicates the host information, including the host CPU and operating system strings.
MX: email exchange Record
NS: Name Server record, indicating an authorized name server for a domain

6. High-speed cache

To Reduce DNS traffic, all name servers use high-speed cache. In standard UNIX, the cache is maintained by the name server rather than the name interpreter.

7. Use UDP or TCP

The DNS server supports both TCP and UDP protocols, and the port number is 53. Most of the queries are UDP queries. Generally, TCP queries are required in two cases:
1. When the queried data is so large that data truncation is generated (TC indicates 1), you need to use the TCP sharding capability for data transmission (see the relevant chapter of TCP ).
2. When the master Server communicates with the slave server, the slave server obtains the zone information of the master server.

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.