Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

TCP

Direct answer

TCP provides connection-oriented, sequenced and acknowledged byte-stream delivery with retransmission, flow control and congestion behavior.

When to use this

Use it when a service depends on a session and you must separate reachability, port listening, handshake, loss, reset and application exchange.

First 30 seconds

1. TCP is connection-oriented, reliable and ordered.

2. Three-way handshake (SYN, SYN-ACK, ACK).

3. Windowing and retransmissions.

4. RST means refused; no answer means filtered.

5. MSS/MTU issues show as stalls.

Operational verification

SYN → SYN-ACK → ACK → data with ACKs → FIN

Evidence · next step

1. Verify IP path and return path.
2. Confirm destination port is listening.
3. Inspect the three-way handshake.
4. Look for retransmissions, zero window, resets and MSS/MTU symptoms.
5. Validate application request/response.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE
Key commandshow tcp brief all
Scope / prerequisiteUse it when a service depends on a session and you must separate reachability, port listening, handshake, loss, reset a…
Show · 1
What next?3 suggested next steps
Child topics (this level)6
Catalog command links1
Evidence1
On this pageJump to a specific section
Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification and output interpretation Verify boundary

Verify that the server is listening on the expected address/port, then distinguish SYN exchange, Established state, data transfer, retransmissions and closure. A packet capture or socket table can show whether the failure is before handshake, during transport or after application data begins. Repeated retransmissions show missing acknowledgements for transmitted sequence space, but they do not by themselves identify whether loss occurs in the forward path, return path or endpoint. Check MSS/MTU when larger payloads fail while small exchanges succeed.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

command output · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points
  • SYN, SYN-ACK, ACK establish a connection
  • Sequence and acknowledgement numbers track bytes
  • Receive windows provide flow control; retransmission handles loss
  • A completed handshake proves a transport endpoint, not application correctness.
Key checks
  • show tcp brief — TCP sessions on the device
  • Client: ss -tn / Get-NetTCPConnection — sessions
  • Test-NetConnection <host> -Port <port> — handshake test
ReferenceImportant terms & boundaries5 sections · depth on demand

Key operational limits

  • SYN, SYN-ACK, ACK establish a connection
  • Sequence and acknowledgement numbers track bytes
  • Receive windows provide flow control; retransmission handles loss
  • A completed handshake shows a transport endpoint, not application correctness.

In depth

TCP

TCP gives applications a reliable connection over unreliable IP. RFC 9293 describes it as providing a reliable, in-order byte-stream service, connection-oriented and bidirectional, with port numbers to multiplex connections; reliability comes from sequence numbers, checksums and retransmission.

Connection set-up (RFC 9293)

StepSegment
1Client → server: SYN with the client's initial sequence number
2Server → client: SYN-ACK, acknowledging the client's number and carrying its own
3Client → server: ACK

Header fields (RFC 9293)

FieldPurpose
Source / destination portIdentify applications
Sequence numberPosition of the first byte in this segment
Acknowledgement numberNext byte expected (cumulative)
FlagsSYN, ACK, FIN, RST, PSH, URG, ECE, CWR
WindowReceive buffer space (flow control)
ChecksumCovers a pseudo-header, header and data
OptionsMSS, window scale, SACK, timestamps

States (RFC 9293)

LISTEN, SYN-SENT, SYN-RECEIVED, ESTABLISHED, FIN-WAIT-1/2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT (2×MSL after an active close) and CLOSED. Each direction closes separately with FIN; RST aborts a connection.

host$ ss -tn state established '( dport = :443 )'
Recv-Q Send-Q   Local Address:Port    Peer Address:Port
0      0        10.110.0.64:51522     142.250.74.46:443
host$ sudo tcpdump -ni eth0 'tcp[tcpflags] & (tcp-syn|tcp-rst) != 0' -c 3
10:41:22.100 IP 10.110.0.64.51530 > 10.30.0.15.443: Flags [S], seq 2911022, win 64240, options [mss 1460,...]
10:41:22.102 IP 10.30.0.15.443 > 10.110.0.64.51530: Flags [S.], seq 81100, ack 2911023, win 65160, options [mss 1460,...]
R1# show tcp brief

MSS (RFC 9293)

The MSS option is sent in SYN segments; without it, the default is 536 bytes for IPv4. Tunnels often need ip tcp adjust-mss so segments fit the reduced MTU.

Reading failures

ObservationLikely cause
SYN with no replyPacket dropped by a filter or routing
SYN answered by RSTPort closed on the server
Retransmissions mid-flowLoss, often congestion or MTU problems

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

TCP is the connection-oriented transport protocol used by most applications. It provides reliability (acknowledgements and retransmission), ordering (sequence numbers), flow control (receive window) and congestion control.

Common TCP portService
22SSH
25SMTP
80 / 443HTTP / HTTPS
179BGP
389 / 636LDAP / LDAPS
3389RDP

TCP's reliability means packet loss shows up as retransmissions and lower throughput rather than missing data; captures reveal it as duplicate ACKs and retransmitted segments.

State model and technical mechanics

TCP identifies each connection by endpoint addresses and ports and establishes state through the SYN, SYN-ACK and ACK exchange. Sequence numbers order bytes; cumulative acknowledgements confirm received data; receive windows provide flow control; retransmission and timers recover from loss, while congestion-control algorithms adapt sending rate to network conditions. MSS constrains the TCP payload size announced by an endpoint and is related to, but distinct from, interface MTU. FIN normally closes a stream gracefully, while RST aborts state. Because TCP is a byte stream, application message boundaries are not preserved by the transport itself. A connection can therefore be Established while the application protocol is stalled, sending unexpected content or waiting on a higher-layer transaction.

Limits and common misconceptions

A completed three-way handshake shows bidirectional transport reachability for the handshake packets, not that authentication, TLS, DNS-dependent application logic or backend processing works. Likewise, an RST is not automatically “network failure”; it is an explicit transport reset that can be generated by an endpoint or stateful device. Do not equate high latency with TCP loss without separating RTT, server think time and retransmission evidence.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Treat listening port, local/remote address selection and application timeout behavior as part of the transport contract. Avoid arbitrary TCP timer or MSS changes unless the design has evidence for them; tuning around packet loss can conceal MTU, path or application problems. Where firewalls, NAT or load balancers exist, remember they may maintain their own TCP state and timeout assumptions. Document which endpoint initiates the connection and whether long-lived idle sessions are expected, because that determines how keepalive and stateful middleboxes should be interpreted.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 9293

Authoritative/upstream documentation reviewed for bounded claims in IP Fundamentals → TCP. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc9293.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
transmission control protocolthree way handshakeTCP sequencing acknowledgement
Embedded reference data

Quick lookup tables

TCP evidence chain

Configuration, operational state, counters and downstream proof remain separate.

BoundaryQuestionEvidenceDoes not prove
DefinitionWhat is configured or intended?running configuration / controller policylive operation
Local stateIs the feature active at the expected scope?show tcp brief allremote success
CountersDid controlled traffic or an event reach this stage?scoped counters/timestampscomplete return path
Next boundaryWhat consumes or transports this state?name/address → routed path → SYN/SYN-ACK/ACK → reliable byte stream → application protocol → close/resetapplication success

TCP · technical reference

Compact mechanics, configuration and evidence boundaries for fast lookup.

TCP evidenceMeaning
SYN/SYN-ACK/ACKConnection establishment
EstablishedTransport state exists
RetransmissionsData/ACK not confirmed in time
FIN / RSTGraceful close / abort
Confirmation

Confirm action

Continue?