Outline
- DNS
- TCP handshake
- TLS connection
- HTTP / HTTPS
- TCP
DNS
When we typing domain name in chrome, then …
- Chrome first checks its own DNS cache.
- If not found, the system checks the operating system’s DNS cache and the hosts file.
- If still not found, the request is sent to the configured recursive resolver
- 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. - The IP address is returned to the client, and Chrome uses it to establish the connection.
TCP handshake
- Client side will send api with [SYNC = 1], Seq = i,
- Server side will return api with [SYNC = 1, ACK = 1] , Ack = i+1, Seq = u
- Client side will send api with [ACK = 1], Ack = u+1
TLS Connection
HTTP / HTTPS
TCP disconnection
- Client send [FIN = 1, ACK = 1], seq = u,
- Server side send [ ACK = 1], Seq = j, Ack = u+1
- Server side send [FIN = 1, ACK = 1], Seq = j, Ack = u+1
- Client send [ACK = 1], Seq = x, Ack = j+1