The named query uses the UDP protocol and port 53. Responses are returned through UDP unless they are greater than 512K, which uses TCP. TCP is used for "zone transfer" between servers.
Delegate: All name servers know the root server. and root server also know gTLD, follow this chain further down, Edu know fudan.edu,com know china.com ... by analogy. Example: Suppose I want to query machine cs.military.china.com from Machine marco.comp.fudan.edu, where I assume that before querying, there is no caching for any information that is needed in addition to the name and IP address of the root server. The order is this (host Marco asks for its local name server ns.comp.fudan.edu, and ns.comp.fudan.edu is a recursive name server, so it will be queried instead of the host Marco.) Since it does not know the address, and does not know anything about military.china.com or china.com that does not even know. com. But it knows some servers in the root domain, The root domain knows about. com data, so send a reference to ns.comp.fudan.edu, the local name server will then send the query to. com, return a china.com recommendation, same repeatedly send query to china.com, return military.china.com server push Recommended, so military.china.com for this query information is authoritative, and return the address of CS. This completes the whole process, oh, no, another point, ns.comp.fudan.edu in this process will tell the cache host CS address, while caching the server list of the. com,china.com,military.china.com.
Caching and efficiency: The caching mechanism has only been used in the past for affirmative answers, and if the host name is not found, then the actual situation is stored. RFC1034 and RFC2308, in turn, defined and upgraded the scenarios used to negate the telling cache. is an optional feature in BIND8.2, and has become a required feature in 9. It will hold the answer to the negative type (of which the first two negative data types are cached for 1-3 hours and other types are cached for 5 minutes):
There is no host or domain that matches the name you want to query
There is no data type to query for this host
The queried server is not responding
Server unreachable due to network problems
Extended DNS protocol: In the late 90, EDNS0 (extended DNS, version 0) addresses some of the drawbacks of today's Internet DNS protocol. It allows the speaker to declare its assembly buffer laughing, and can support options and communication protocol versions. If the receiver's name server responds with an error message, the sender returns to use the original DNS protocol. BIND9 is implemented in both the server and the parser EDNS0