TechKnowSurge
Cisco CCNA 1.5 Cisco CCST Networking 5.2 Cisco CyberOps Associate 4.8 Cisco CCST Cybersecurity 2.1
VideoNetworkFree

DEMO: Wireshark, TCP Header

A practical walkthrough of TCP header fields as seen in Wireshark, using a captured HTTP request to identify and explain each component of a real packet.

Complete this video to capture a CTF flag worth 1 point.

About this video

TCP header analysis comes to life when examined against a real packet capture, and this content uses an HTTP request between two networked devices to walk through each field in Wireshark's Layer 4 detail pane. The source and destination ports appear first, followed by sequence and acknowledgment numbers, which Wireshark presents in both their raw form and as relative values to make the data easier to follow. Understanding the difference between these two representations helps clarify how TCP tracks byte streams across a connection without misreading Wireshark's display aids as part of the protocol itself. The remaining fields covered include the header length, the TCP control flags, window size, and checksum. The flags section receives particular attention, with the ACK and PSH bits both set in this packet, and their meanings explained in terms of how they signal the relevance of the acknowledgment number and the handling of buffered data. The checksum field is identified as the mechanism for verifying data integrity in transit. Minor differences in field naming between Wireshark's display and standard protocol documentation, such as header length versus data offset, are noted so that learners can reconcile what they see on screen with formal TCP specifications.

What you'll learn

What's covered

TCP Headers in Wireshark

Aligned to

Cisco CCNA
1.5 Compare TCP to UDP
Cisco CCST Networking
5.2 Perform a packet capture with Wireshark and save it to a file
Cisco CyberOps Associate
4.8 Interpret the fields in protocol headers as related to intrusion analysis
Cisco CCST Cybersecurity
2.1 Describe TCP/IP protocol vulnerabilities

Key terms

Transmission Control Protocol
TCP
A connection-oriented transport protocol that ensures reliable, ordered, and error-checked delivery of data.
Transport Layer
Layer 4 of the OSI model, responsible for end-to-end communication, flow control, and error recovery.
Packet
A unit of data formatted for transmission over a network, containing a header, payload, and sometimes a trailer.
Port
A logical endpoint for communication in a network, identified by a number that specifies a particular service or application.
Payload
The actual data content of a packet or message, excluding headers and metadata.
Sequence Number
A 32-bit field in the TCP header that identifies the byte position of the first byte of data in a segment, allowing the receiver to reorder segments that arrive out of sequence and detect missing data. The receiving side uses the sequence number to send an acknowledgment confirming which byte it expects next.
Acknowledgment Number
A 32-bit field in the TCP header that indicates the next byte the receiver expects, confirming successful receipt of prior data.
TCP Flags
Single-bit fields in the TCP header — including SYN, ACK, and FIN — that control connection establishment, maintenance, and termination.
Window Size
A TCP header field that specifies how many bytes the receiver is willing to accept at one time, enabling flow control between devices.
Checksum
A value calculated from packet header data and used to detect errors; recalculated by a router after modifying the IP header fields such as TTL.

Transcript

The Captured Packet

In one of my prior videos we did a capture of the data going between my demo laptop and my demo Pi. It was a webpage request, so I pulled that up again and let's take a look at it.

First of all, what I see here on the left hand side is it's coming from the IP address of the demo laptop, and it's a request to get an HTTP page from the demo Pi. This is the packet that we're going to take a look at and see what the TCP header looks like.

On this packet, what we're going to do is open up the layer 4 section of this, or the TCP section of this. It says this is a TCP packet here, so we're going to open up the layer 4, this TCP section.

Ports, Sequence and Acknowledgement Numbers

The first couple things that we run across are the source port and the destination port. We've already talked about that in a prior video, so I'm not going to get more in depth into that. Then we see some additional data — some of this data that is displayed is just data that Wireshark has attached to it to make it easier for us to read. So we see some of that information here.

Then we see the sequence number. We actually see the sequence number in two different forms. Here's the raw form. The raw form is the sequence number that these machines actually use, so if you go and look at the data, that is the actual data within the packet. But what we have here is Wireshark has made it a little bit easier for us to interpret the data by putting in the sequence number that's relative. What that means is that even though this is packet — oh, what is that number? — it said, well, we're just going to call this sequence number one. That makes it a lot easier to read.

We see the same thing with the acknowledgement number. We have the acknowledgement number in the raw form of the data, which is this quite large number here. But they said, okay, what we're going to include so it's easier to read is an acknowledgement number that is relative. So this acknowledgement number here is just one.

Header Length, Flags and Window Size

We have the header length, which is 20 bytes. And then we see the flags here with a drop down. The total shows you what the sum of these flags are, or we can open it up and see what the individual flags are.

This has the acknowledgement bit set. That just means that the field up here that has this acknowledgement number — this one right here, this acknowledgement — is relevant. So the one just means that, hey, pay attention to that field, pay attention to that number, it makes a difference. We've got the push flag set as well, it's one.

Then we have the window size, so this is for windowing. It specifies some data on that, with once again some brackets here telling us Wireshark has done some summaries so that we can see that information.

It shows us the checksum here, to make sure that the information here is correct and hasn't been changed. And then some information, and then finally the TCP payload here.

How the Fields Line Up

Here we see some of the fields within the TCP header, and those line up — although the terminology can be a little different — with what we talked about. For instance, one of the things that is a little different in terminology is that we see a header length here versus the data offset, which is what we covered in our lecture. So it can go by a little different names here. But for the most part, all these fields lined up with what we talked about.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →