URL

URL = Protocol + domain name or IP address + port number (omitted by default) + path + query string + anchor point

Ex. : Translate.google.com/?sl=en&tl=z…

  • Protocol: HTTPS: HyperText Transfer Protocol (HTTP) is a HyperText Transfer Protocol based on TCP and IP.
  • Domain name: Google.com – A domain name can correspond to different IP addresses, preventing one server from being overwhelmed (load balancing). An IP address can correspond to different domain names (host sharing)
  • The default port number is port 443 — a machine can provide different services with a number for each service, and this number is called port. Port 80 is best used to provide HTTP services (browser default); The best way to provide HTTPS service is to use port 443 (the browser default); Port 21 is the best port to provide FTP service. There are a total of 65535 ports
  • The path/s
  • Query string L =en&tl= zh-cn&text =% e7%bf %BB%E8%AF%91&op=translate — Chinese will be encoded
  • Anchor points start with the “#” character. Cannot be passed to the server

DNS

DNS is short for Domain Name System. It is composed of a parser and a Domain Name server, also known as a Domain Name resolution server.

Domain names correspond to IP addresses through DNS.

Process:

  • The browser asks the DNS server what IP address corresponds to the domain name
  • The DNS server answers the browser with an IP
  • The browser then sends the request to the server

bslookup

You can use nsLookup to query DNS records

IP

IP is short for Internet Protocol. It is an Internet layer Protocol in the TCP/IP system. IP is classified into Intranet and extranet

Several special IP addresses:

  • 127.0.0.1 indicates itself
  • Localhost is specified as itself through hosts
  • 0.0.0.0 does not indicate any device

ping

Ping is a command used to check whether the local host is reachable to another host on the network. If the ping between the two hosts fails, the two hosts cannot be connected. Ping is an important method to locate network connectivity. You can also ping to obtain the IP address of the domain name.

The domain name

A domain name is an alternate name for IP

What IP address does baidu.com correspond to

knowledge

  • Load balancing: A domain name can correspond to different IP addresses, preventing one server from being overwhelmed
  • Host sharing: An IP address can correspond to different domain names

Www. xxx.com and xxx.com are not the same domain name

  • .com is a top-level domain name
  • Xxx.com is a level 2 domain name (commonly known as level 1 domain name, commonly known as regardless of the top level)
  • Www. xxx.com is a level 3 domain name (commonly known as level 2 domain name)
  • They are father and son
  • Github. IO, for example, gives away the subdomain xxx.github