Networking 101: TCP In More Depth | Linux Today

Networking 101: TCP In More Depth

Written By
Web Webster
Web Webster
Sep 25, 2008

“Last week’s introduction to TCP promised that this article
would enlighten, entertain and obviate all other documentation.
Well the last one isn’t quite possible in this much space, but
let’s go ahead and take a look at TCP operational issues, now that
we know a little about what TCP actually is.

“We said that TCP gets ‘connected’ before any data can be sent.
To make that work, the side that initiates a TCP connection will
send a SYN (remember the Flags field) packet first. This is simply
a packet with no data, and the SYN flag turned on. If the other
side wants to talk on the port it received the SYN on, it will send
back a SYN+ACK: SYN and ACK fields set, and the ACK number set to
acknowledge the first packet. Then, to verify the receipt of the
SYN+ACK, the sender will send one final ACK. The SYN, SYN+ACK, ACK
sequence is called the three-way handshake. After that happens, the
connection is established. The connection will remain active unless
it times out or until either side sends a FIN.

“Closing a TCP connection can be done from either side, and
requires that both sides send a FIN to close their channel of
communication. One side can close before the other, or they can
both happen at the same time. So, when one side sends a FIN, the
other sends FIN+ACK, to start the close of its side, and to ACK the
first FIN. The person who sent the first FIN will then FIN+ACK the
second FIN, and the other person knows that the connection is
closed. There is no way for the person who sent the first FIN to
get an ACK back for that last ACK. You might want to reread that
now. The person that initially closed the connection enters the
TIME_WAIT state; in case the other person didn’t really get the ACK
and thinks the connection is still open. Typically, this lasts one
to two minutes.”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.