When we typing in Chrome

Outline

  1. DNS
  2. TCP handshake
  3. TLS connection
  4. HTTP / HTTPS
  5. TCP

DNS

When we typing domain name in chrome, then …

  1. Chrome first checks its own DNS cache.
  2. If not found, the system checks the operating system’s DNS cache and the hosts file.
  3. If still not found, the request is sent to the configured recursive resolver
  4. The recursive resolver performs the lookup step by step:
    • It asks a root server, which points to the relevant top-level domain (TLD) server (e.g., .com).
    • Then it queries the TLD server, which points to the authoritative server for the domain (e.g., example.com).
    • Finally, it queries the authoritative DNS server, which provides the actual IP address.
  5. The IP address is returned to the client, and Chrome uses it to establish the connection.

TCP handshake

  1. Client side will send api with [SYNC = 1], Seq = i,
  2. Server side will return api with [SYNC = 1, ACK = 1] , Ack = i+1, Seq = u
  3. Client side will send api with [ACK = 1], Ack = u+1

TCP handshake(by wireshark)

TLS Connection

HTTP / HTTPS

TCP disconnection

  1. Client send [FIN = 1, ACK = 1], seq = u,
  2. Server side send [ ACK = 1], Seq = j, Ack = u+1
  3. Server side send [FIN = 1, ACK = 1], Seq = j, Ack = u+1
  4. Client send [ACK = 1], Seq = x, Ack = j+1
    TCP handshake(by wireshark)