DNS (Domain Name System) is a distributed database that maps domain names and IP addresses on the Internet, allowing users to access the Internet more conveniently, instead of remembering the number of IP address strings that can be directly read by machines. The process of obtaining the IP address corresponding to the host name through the host name is called domain name resolution (or host name resolution ). The DNS protocol runs on the UDP protocol and uses the port number 53. In the RFC documentation, RFC 2181 provides a standard description of DNS, RFC 2136 describes the dynamic update of DNS, and RFC 2308 describes the reverse cache of DNS queries.
We know that to send data packets, you must know the IP address of the other party. But now, we only know the website www.google.com and its IP address.
The DNS protocol can help us convert this URL to an IP address. The DNS server is known to be 8.8.8.8, so we send a DNS packet (port 53) to this address ).
650) This. width = 650; "class =" Fit-image "Height =" 124 "src =" http://s6.51cto.com/wyfs02/M00/4C/2F/wKiom1Q4hWDA27xDAABL-faHiO8190.jpg "width =" 498 "style =" border: Medium none; "/>
Then, the DNS server responds and tells us that Google's IP address is 172.194.72.105. So we know the IP address of the other party.
The DNS address is configured locally according to your region.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/1D/wKiom1RLw06xNss_AAIJRNpXrhY717.jpg "Title =" qq20151125233431.png "alt =" wkiom1rlw06xnss_aaijrnpxrhy717.jpg "/>
Query resource records on the DNS server
On Windows, run the command line tool and enter NSLookup. The returned results include the IP address (a record) and alias (cname record) of the domain name.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/1E/wKioL1RLwwvSRPqVAAC--7ZKDCs602.jpg "Title =" qq20151125233229.png "alt =" wKioL1RLwwvSRPqVAAC--7ZKDCs602.jpg "/>
What is DNS?