"TCP/IP Detailed Volume 1: Protocol" 14th DNS: Domain Name System---reading notes

Source: Internet
Author: User

"TCP/IP Detailed Volume 1: Protocol" 14th DNS: Domain Name System---reading notes

1. Introduction


5. Pointer query

A part of DNS that has been hard to understand is the pointer query, which is given an IP address that returns the domain name corresponding to that address.

When an organization joins the Internet and obtains authorization for the DNS domain name space, such as noao.edu, they also obtain authorization for the IN-ADDR.ARPA domain name space corresponding to the IP address. In the case of noao.edu, its network number is a Class B network of 140.252. The next level of the node in-addr.arpa in the DNS tree must be the first byte of the IP address (140 in the example), the next level of the IP address (252), and so on. it should be borne in mind, however, that the DNS name is written incrementally from the bottom of the DNS tree. This means that for a sun host with an IP address of 140.252.13.33 , its DNS name is 33.13.252.140.in-addr.arpa.

The 4-byte IP address must be written out because the authorized representative is based on the network number: the Class A address is the first byte, the Class B address is the first to second byte, and the Class C address is tertiary bytes. The first byte of the IP address must be at the next level of in-addr, but the FQDN is written from the bottom of the tree.

The IN-ADDR domain and the anti-write IP address affect us only if you are dealing directly with DNS using the host program or the TCPDUMP program. From an application perspective, the normal name parser function (GETHOSTBYADDR) receives an IP address and returns information about the corresponding host. Reversing these bytes and adding IN-ADDR.ARPA fields are automatically implemented by the function.

6. Resource records

We have seen a number of different types of resource records (Rr,resouce record): IP address query is type A, pointer query is type PTR. You have also seen resource records returned by the server: Answer RR, authorized RR, and additional information RR. There are about 20 different types of resource records available, some of which are commonly used below.

A An A record defines an IP address that stores a binary number of 32bit.
Ptr Pointer records are used for pointer queries. The IP address is considered to be the next domain name in the In-addr.arpa domain (identity string)
CNAME
This means "canonical name (canonical name)". It is used to represent a domain name (identity string), whereas a domain name with canonical name is often called Alias. Some FTP servers use it to provide an easy-to-remember alias to other systems.
HINFO
Represents host information: includes two strings that describe the host CPU and operating system. Not all sites provide hinfo records of their systems, and the information provided may not be up-to-date.
mx

mail interaction record. For some occasions:

  1. MX Records provide a way to transfer messages that cannot reach their destination host to an alternate host.

  2. MX records allow the agency to provide a virtual host for other people to have messages.

Ns
Name server record. It describes the authoritative name server for a domain. It is represented by a domain name (symbol string).
7. Cache

To reduce the amount of DNS traffic on the Internet, all name servers use caching. In a standard UNIX implementation, the cache is maintained by a name server rather than by a name parser.

8. UDP or TCP

The DNS name server uses the well-known port 53. DNS supports both UDP and TCP access.

When the name resolver issues a query request, and the TC (subtract flag) bit in the return response is set to 1 o'clock, it means that the response is longer than 512 bytes and only the first 512 bytes are returned. In this case, the name resolver typically uses TCP to re-send the original query request, which will allow the returned response to exceed 512 bytes.

Additionally, when a domain's secondary name server is started, it will point to the zone transfer from the domain's primary name server.

Since DNS uses UDP primarily, both the name resolver and the name server must handle timeouts and retransmissions on their own. DNS queries and responses are typically over a wide area network. The uncertainty of packet loss and round-trip time is larger on the WAN than on the LAN. This makes it more important for a DNS client to have a good retransmission and timeout program.


This article is from the "Do Your best" blog, so be sure to keep this source http://qiaopeng688.blog.51cto.com/3572484/1889808

"TCP/IP Detailed Volume 1: Protocol" 14th DNS: Domain Name System---reading notes

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.