Describe the TCP three-way handshake.
BeginnerConceptNetwork Models, TCP, UDP & Ports
Answer
Client sends SYN with its initial sequence number, server replies SYN-ACK with its own sequence number and acknowledges the client's, client sends ACK. After that the connection is ESTABLISHED on both sides and data can flow.
Client -> Server : SYN, seq=x
Server -> Client : SYN, ACK, seq=y, ack=x+1
Client -> Server : ACK, ack=y+1
It costs one full round trip before the first byte of data (two with TLS 1.2 on top), which is why connection reuse matters.
More on Network Models, TCP, UDP & Ports
What are the layers of the OSI model, and why does a DevOps engineer care?BeginnerHow does the TCP/IP model map to the OSI model?BeginnerWhat is the difference between TCP and UDP?BeginnerHow does TCP close a connection, and what is TIME_WAIT?IntermediateWhat is a port, and what are well-known, registered and ephemeral ranges?BeginnerWhich ports should you know by heart for DevOps work?Beginner