Explain a Network Protocol in Depth Under Follow-ups, Using TCP

Quick Overview

A networking fundamentals question where the candidate explains a protocol of their choice, practiced here with TCP, while the interviewer keeps drilling deeper. It tests connection setup and teardown, reliability, flow and congestion control, byte-stream behavior, and attacks such as SYN floods.

Explain a Network Protocol in Depth Under Follow-ups, Using TCP

Company: ByteDance

Role: Site Reliability Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

The interviewer asks you to pick a computer network protocol you know well and explain it, then keeps drilling into the details of whatever you say. The role is a security-focused site reliability engineering internship. The protocol is the candidate's choice; this practice version uses TCP, and the same preparation applies to any protocol you would pick. Explain what TCP gives to applications and how it works, and be ready to go deeper on every mechanism you mention. ```hint Start from the guarantees Begin with what an application gets from TCP that IP alone does not give it, then explain the mechanism that delivers each guarantee. ``` ```hint One level deeper For every mechanism you name, be ready to say which header fields carry it and what happens when a segment is lost, duplicated, reordered or forged. ``` ### Clarifying Questions - Should I start from the behavior an application sees, or from the header format? - How deep should I go into congestion control algorithms compared with the basic mechanisms? - Are you more interested in TCP's design, in how it behaves on real networks with loss and delay, or in attacks against it? ### What a Strong Answer Covers - Where TCP sits (transport layer over IP) and what it provides: a reliable, ordered, connection-oriented byte stream between two ports - Connection setup and teardown: the three-way handshake, initial sequence numbers, FIN and RST, and TIME_WAIT - Reliability: sequence and acknowledgement numbers, retransmission timeouts, fast retransmit, reordering and duplicates - Flow control through the receive window, kept distinct from congestion control (slow start, congestion avoidance, the reaction to loss) - Byte-stream consequences: no message boundaries, the interplay of Nagle's algorithm and delayed ACKs, head-of-line blocking - Weaknesses relevant to a security team: SYN floods and SYN cookies, reset injection, sequence prediction, and why TLS runs on top - A comparison with UDP or QUIC that shows when TCP is the wrong choice ### Follow-up Questions - Why does the handshake take three steps rather than two, and why are initial sequence numbers random? - A server shows tens of thousands of connections in TIME_WAIT. Why, and is it a problem? - How does a SYN flood exhaust a server, and how do SYN cookies defend against it without keeping state? - Why did HTTP/3 move from TCP to QUIC over UDP?

Overview: A networking fundamentals question where the candidate explains a protocol of their choice, practiced here with TCP, while the interviewer keeps drilling deeper. It tests connection setup and teardown, reliability, flow and congestion control, byte-stream behavior, and attacks such as SYN floods.

ByteDance logo
ByteDance
Apr 9, 2026
easySite Reliability EngineerTechnical ScreenSoftware Engineering Fundamentals
0
0

The interviewer asks you to pick a computer network protocol you know well and explain it, then keeps drilling into the details of whatever you say. The role is a security-focused site reliability engineering internship. The protocol is the candidate's choice; this practice version uses TCP, and the same preparation applies to any protocol you would pick.

Explain what TCP gives to applications and how it works, and be ready to go deeper on every mechanism you mention.

Clarifying Questions Guidance

  • Should I start from the behavior an application sees, or from the header format?
  • How deep should I go into congestion control algorithms compared with the basic mechanisms?
  • Are you more interested in TCP's design, in how it behaves on real networks with loss and delay, or in attacks against it?

What a Strong Answer Covers Guidance

  • Where TCP sits (transport layer over IP) and what it provides: a reliable, ordered, connection-oriented byte stream between two ports
  • Connection setup and teardown: the three-way handshake, initial sequence numbers, FIN and RST, and TIME_WAIT
  • Reliability: sequence and acknowledgement numbers, retransmission timeouts, fast retransmit, reordering and duplicates
  • Flow control through the receive window, kept distinct from congestion control (slow start, congestion avoidance, the reaction to loss)
  • Byte-stream consequences: no message boundaries, the interplay of Nagle's algorithm and delayed ACKs, head-of-line blocking
  • Weaknesses relevant to a security team: SYN floods and SYN cookies, reset injection, sequence prediction, and why TLS runs on top
  • A comparison with UDP or QUIC that shows when TCP is the wrong choice

Follow-up Questions Guidance

  • Why does the handshake take three steps rather than two, and why are initial sequence numbers random?
  • A server shows tens of thousands of connections in TIME_WAIT. Why, and is it a problem?
  • How does a SYN flood exhaust a server, and how do SYN cookies defend against it without keeping state?
  • Why did HTTP/3 move from TCP to QUIC over UDP?