The composition of the URL
Uniform Transfer Protocol (URL) = Protocol + Domain name or IP address + port + path + Query parameters + anchor
(Note: Photo from Hungry Man Valley)
- HTTP or HTTPS;
- IP is used to locate a device. A domain name is another name for the IP address. An IP address can correspond to different domain names, and a domain name can correspond to different IP addresses.
- Port: A server can provide many services. Each service has a number. This number is called the port number.
- Path: requests different content on the same device;
- Query parameters: different content on the same page;
- Anchor point: the same content is displayed in different positions; Anchors do not support Chinese and will not be transmitted to the server
DNS function, nslookup how to use
DNS (Domain Name Server) Functions of a Domain Name Server: A Domain Name corresponds to an IP address through the DNS
Process:
- The browser will ask the DNS server provided by telecom for the IP address of the site
- Telecom will answer this IP (nslookup lookup IP)
- The browser sends a request to port 80/443 of the corresponding IP address
- The request is to view the homepage of this website
- The server sends requests on port 80/443 by default
- You can view the ports in developer tools
You can use NSLookup to view the IP address of a website
What is the function of IP? How to use the ping command
- Locating a Device
- Encapsulated data message
- IP addresses are classified into internal IP addresses and external IP addresses. The external IP address is not fixed, if the restart will change the IP address; The Intranet IP address is assigned by the router itself, and the IP address of each device is different.
- You can run the ping command to view the corresponding IP address
For example, ping Baidu.com can find the CORRESPONDING IP address of Baidu when I visit
Nslookup and ping
What are domain names and what are their categories
A domain name is another name for IP
- Com is a top-level domain name
- Xxxx.com is a level 2 domain name.
- www.xxxx.com is a level 3 domain name (commonly known as level 2 domain name). The WWW is redundant