How DNS and proxy servers work

Source: Internet
Author: User

The Chinese DNS Name is Domain Name Server (Domain Name Server ). Before you describe DNS, let's briefly introduce the domain name.

Generally, each computer connected to the Internet has a unique IP address, so that it can communicate with each other. The IP address is composed of 32-bit binary numbers. It has no association meaning and is inconvenient for users to remember and understand. However, computer communication relies on IP addresses. In order to facilitate human memory and computer communication, people give computers a name similar to a person's name, which is called a domain name. A domain name is a user-level address, which must be translated into an IP address during communication. DNS acts as a translation role, which is mainly used to film Internet IP addresses into characters with certain meanings, that is, the computer name. After knowing the DNS, let's talk about how it actually works.

For example, for the People's Daily website, most users enter www.peopledaily.com.cn in the address box of the browser when visiting the website. However, the Internet cannot directly use this address to communicate with each other. This is equivalent to the fact that when you call someone, you cannot directly use your name to communicate with each other, the telephone number book must be used to find the number corresponding to the person's name. Similarly, after we enter the www.peopledaily.com.cn URL, the browser will automatically send the URL to a dedicated computer with the function similar to the telephone address book. This computer is called a DNS server. The DNS server mainly stores the database associated with the computer's domain name and IP address. After receiving the sent URL, the DNS server first queries the local database to see if there are any records corresponding to the URL, it translates the website into a corresponding IP address (the IP address of the website of the People's Daily is 202.99.23.20.) and returns it to the specific communication software. The communication software can find the corresponding site through the IP address, upload the content of the site to the user's computer, and the user can see the corresponding information through the browser. If no query is found, the DNS server completes the query on the next DNS server, which is called recursive query. If the DNS server specifies the IP address of the next DNS server in the response message, the DNS workstation automatically queries the next DNS server, which is called forwarding query. If it is not found, the browser will tell the user "DNS not found", that is, the IP address of the desired website cannot be found, so we cannot access the website.

When a local customer sends a question to the Domain Name Server about the host's domain name address, the domain name server returns the host's IP address as a response. The normal domain name resolution speed is so fast that we cannot feel its existence. However, if you pay close attention to the browser status bar, you will find such a statement "looking ............", "...... Already found, connecting ......", This is the process of domain name resolution and the server returns the IP address. However, it may take a long time for the browser to return an error message. However, the task of returning IP addresses from DNS requests can be handed over to Windows. Specifically, each time you try to connect to a computer on the INTERNET. file to find the corresponding IP address of the domain name to be connected. Imagine whether reading and searching data from a local hard disk is much faster than searching data from a server on the network. This is the acceleration principle of some network acceleration software, that is, the process of domain name resolution can be accelerated! However, if you change the IP address of the website corresponding to this file, the domain name will be used to access this website from this machine and other places will be accessed.

The rapid development of INTERENT in Early 1990s has rapidly changed people's lives and work. More and more companies have connected their local networks to INTERENT. Of course, there are various ways to access the Internet. Generally, individual users can connect to the Internet by buying a modem over a telephone line. Because of the large number of computers and the large demand for communications, the company generally uses leased line access methods. However, leased lines are too expensive. Is there a way to use one telephone line to allow multiple computers to access the Internet at the same time? This requires the proxy server, which is actually a huge cache zone. Let's talk about how the proxy server works.

First, I want to declare that the routers used in proxy servers and leased line access are two different concepts. The proxy server is a service software built on the TCP/IP protocol application layer, while the router is a hardware device connected to the network, it works on the IP layer of the TCP/IP protocol and is mainly used for path search. Agent server software is generally installed on a computer with outstanding performance and a modem and nic. Each client in the internal lan must have an independent IP address, and must be configured on the client software in advance to use the proxy server and point to the Proxy Server IP address and service port number. When a server is started, a dynamic connection program named WINSOCK is used to open up a specified port and wait for the user's access request. Assume that we want to access a site. First, the proxy server is connected to the ISP by dialing the modem, and then an information request is sent to the client. This request is automatically sent to the proxy server through the WINSOCK program. After the proxy server receives a request from the client on the specified port, it analyzes what services the client needs. If it is an FTP service, it first checks whether there is any relevant information on the local computer, if yes, it returns the information required by the client to the client from the local hard disk. If no, it sends the client request to the ISP through the modem, after receiving the response from the ISP, the server forwards the response directly to the client on the internal network. In the future, when other clients access the same information, they do not need to contact the ISP to obtain the information directly from the proxy server. The proxy server enables secure connection between the company's internal network and INTERENT.

 

 

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.