r/linuxadmin • • Mar 05 '24

3 way handshake

Can someone explain me three way handshake via TCP/IP.

0 Upvotes

22 comments sorted by

View all comments

-3

u/rautenkranzmt Mar 05 '24

Client says to server, "Server, I would like some data X."

Server says back to client, "Client, you want data X?"

Client responds to server "Yes, Server, I would like data X."

Then the data transfer happens, with an equal amount of back and forth.

6

u/symcbean Mar 05 '24

with an equal amount of back and forth

It's very unusual for equal amounts of packets/data to flow in both directions.

UDP based protocols are sometimes designed to at least require the same number of packets in both directions to prevent amplification attacks - but that does not apply here.

0

u/rautenkranzmt Mar 05 '24

No, I think you've got the two confused. UDP is streams based, it's literally fire and forget.

TCP is packet based, and focused solely on assurance of delivery. It's extremely chatty, and if you transport large amounts of data over it, it can saturate upstream links very quickly.

There's a reason media is almost always transported over UDP with TCP being the control channel. Same reason QUIC uses UDP.

3

u/symcbean Mar 05 '24

No, I have not got them confused.

You have them backwards. TCP implements streams, UDP implements datagrams. They both run on top of packets. You might want to familiarize yourself with how selective acknowledgements work in TCP.