We think of the Internet as a post office:
When you want to write to your friend, first write the contents on the stationery, then write the address on the envelope, and then put the stationery in the envelope.
When you send the letter to the Post office, the mail sorting opportunity is based on the ZIP code and address to determine where your friend lives. If he lives in an apartment building with many rooms, the Post office will post the letter to the front desk of the building, and the building's staff will pick it up again according to the room number.
The internet works very much like the above process. The difference is that the real world is a building and apartment connected by streets, replaced by computers connected by routers and network cables in the Internet world. Each computer has a unique address that allows the network to navigate to it.
Multiple apartment rooms share a street address, similarly, multiple computers can share a network or router. For example, when using free WiFi provided by Starbucks, multiple computers share a public IP address. Still, your computer can still be accessed separately through the router's assigned intranet IP address, which is like the staff of the apartment building, and the intranet IP is like the room number.
IP is an abbreviation for Internet Protocol (Internet Protocol). An IP address is a numeric identifier assigned to each device that is connected to the network. Computers, printers, and even mobile phones all have their own IP addresses.
There are currently two major IP address types for IPv4 and IPv6, commonly used are IPV4 addresses, such as 192.168.1.1, and IPV6 addresses are 2001:0db8:0000:0000:ff00:0042:8329 in this form.
When you open a browser and enter http//google.com in the address bar, the browser will "ask" the network (more accurately, "Ask" the DNS server) goole.com the corresponding IP address is what? If the DNS server knows the IP address you are looking for, it returns the result, and if you do not know it, forwards the request to the other DNS server until a corresponding IP address record is found on a DNS server. Enter the following command at the terminal to observe the response content of the DNS server:
$dig goole.com
If you are using a Mac operating system, you can use the terminal Terminal program, which is usually stored in the/Applications/Utilities directory. If you are using a Windows operating system, open the Start menu and enter CMD in the run to open the terminal.
After the DNS server returns the IP address of the computer you want (for example, the IP address of the goole.com), it requests the page you want to access to the computer that corresponds to the IP address.
Each path corresponds to a page that consists of a different HTML document (with some exceptions). For example, the HTML document that is obtained when the browser requests http//google.com or http//google.com/images is not the same.
Now that the computer knows which IP address to access to http//google.com it will request HTML from Google's server to display the page.
When the remote server's HTML document is sent back, the browser renders the document. Rendering is done through a series of actions, so that the HTML page is displayed in the intended way at the beginning of the design.
Excerpt-How the browser gets the page