Domain name
IP addresses are often difficult to remember, so we generally use domain names for management
www.google.com
The domain name is divided into three parts, with "." (point) segmentation. Strict domain name finally there is a ".", but generally omitted not to write.
-type identifies the type of this domain name (com/net/org/edu/gov, etc.)
-Domain Name
-Hostname name of a host in this domain
WWW: host name
Google: Domain name
com: type
Dns
Each domain name represents an IP, and DNS is the service used to convert between IP and domain names.
www.google.com <---> 74.125.128.105
The DNS (Domain Name System) service is provided by the DNS server
DNS Client
Our daily use of support network computers are generally used as a DNS client, applications, services, processes, and so on through the operating system at the bottom of the function to initiate the DNS server query, the specific domain resolution
Linux typically uses the gethostbyname () functionality provided by the system to perform domain name resolution
Parsing can be done on several different ways:
1) Documents (/etc/hosts,/etc/networks)
The following is/etc/hosts, you can see this file localhost parsing to 127.0.0.1 and some other parsing
This file is checked before DNS, so hackers may be able to modify the file to allow users to go to some phishing sites.
Here's the/etc/networks file.