Analyzing TCP Disconnects On Linux Or Unix | Linux Today

Analyzing TCP Disconnects On Linux Or Unix

Written By
Web Webster
Web Webster
Dec 4, 2008

[ Thanks to Mike
Golvach
for this link. ]

“Since we’ve never actually covered this topic on this
blog before, it makes the most sense (to me, anyway) to lay down
the basics of a graceful TCP disconnect. If there’s interest (On
your end or mine ;), we may follow up with further posts that delve
into more detail on the subject. This, of course, means that the
typical sequence of events laid out below isn’t necessarily how
things are always going to go (there are slight differences between
Active and Passive disconnects, for one of more than a few
instances). For now, we’ll stick to the nitty-gritty.

“The gracious TCP disconnect, in as much order as I could make
of it. The way it’s “supposed” to work. This information is only as
reliable as your circumstances 🙂 Note that all examples for this
post are from Solaris 10 and your explicit command names (like
netstat) may vary or have slightly different arguments you need to
pass them. Also, we’ll note some ways that the TCP disconnect can
occur that are technically correct, but “unlike” the step-by-step
process listed below and generally big pains in the arse.

“Also, and this point is so important I’m giving it its own line
;), it helps to remember that, although a proper TCP “connection”
can only be established in one way (the infamous “Three Way
Handshake”), the same is not true of a TCP “disconnect.” TCP (Over
Ethernet, to be precise) is duplexed, which means that it consists
of two flows of data; one flowing in either direction
simultaneously. Since all TCP requests have to be acknowledged
(unless you’re just pulling the plug 😉 a TCP disconnect is a 4-Way
process. Or, more correctly, a 4 “step” process.”


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.