C # network programming ------------ DNS programming foundation

xiaoxiao2021-03-06  69

DNS basic question and answer

Q: What is "DNS"? Chinese?

A: DNS, simply, Domain Name System, turning Chinese is "Domain Name System".

Q: What is the use of DNS?

A: In a TCP / IP architecture network (such as an Internet) environment, DNS is a very important and common system. The main function is to convert the Domain Name of people who are easy to remember to convert the IP Address that is not easy to remember. The network host of the DNS service is performed above, it can be called DNS Server. Basically, usually we all believe that DNS is only converted to IP Address, and then use the IP Address to connect (commonly known as "forward parsing"). In fact, the feature that converts IP address into domain name is also quite commonly used. When login is went to a UNIX workstation, the workstation will go to seek a check, find out which place from which place is connected in (commonly known " Reverse analysis ").

Q: How did DNS work?

A: DNS is to operate in a layer. For example, the Domain name of Harbin Institute of Technology is bbs.hit.edu.cn, which is of course not exposed from .EDu.cn. .edu.cn is also awarded from .CN (Delegation). Where is the .cn coming from? The answer is from ".", That is, the so-called "root domain". The root field is already the top of Domain Name. And "." This layer is managed by the Internet (Internet Network Information Center, Internet Information Center). The Domain Name in the world is like this, and a layer of a layer is awarded.

Q: When I check a Domain Name, how did DNS detect its IP?

A: For example, it is assumed that today we check Domain Name (a DNS Query) is bbs.hit.edu.cn, DNS Server will handle this: (1) The computer you use (possibly PC, may also be Workstation to send a problem to DNS Server set to this computer, question: What is the IP of bbs.hit.edu.cn? (2) This DNS will first see if it is in its cache, if so, throw the answer. If not, you can check from the top. There must be settings on the DNS Server. "To ask who asked. So, at this time it goes "." The "now". "There are 13 units) Q: Who is it to ask? (3) "." The DNS of the layer will answer. C c 要 查 (at the same time you use the DNS Cache to get up this answer). (4) Next, the DNS you used will ask the DNS of the.cn this layer: .EDu.cn? (5) This layer of .CN will answer .EDu.cn wants to check (while you use the DNS to get this answer cache). (6) until bbs.hit.edu.cn Answer: bbs.hit.edu.cn's IP is 202.118.224.2 (also cache). After so much process, I finally got this IP, which will be further connected. It should be noted that every layer will ask a question and write the answer down (cache), and will also forget (see how long the setting is to cache). Q: How do you set DNS?

A: If, just use DNS, as long as it is set in the network properties of TCP / IP. Set the method of setting related to the operating system. For example: Windows 9x In Control Panel → "Network" → "TCP / IP" → "Properties", find the part of the DNS to set it. Unix sets in the /etc/resolv.conf file (if, it is not discussed here).

Q: Which DNS is the latest? A: If you know that DNS is working using the class architecture, you should know that the most recent DNS is the best.

转载请注明原文地址:https://www.9cbs.com/read-87734.html

New Post(0)