Skip to content

Following an exchange

Module
Your First Packet Capture
Difficulty
Easy
Updated
Tested on
Ubuntu 24.04.5 LTS, netlab 1.0, GNU Bash 5.2.21, tcpdump 4.99.4; course VM Ubuntu 24.04.4 LTS with Wireshark 4.2.2
On this page

The 12 rows in the saved hello.pcap belong together. Reading each row alone hides the request’s story. Connect the two addresses and two ports, then find the application words inside their exchange. By the end, you can say who asked, what they asked for, and what returned.

Keep the complete hello.pcap made in Reading a capture as text. That save run had no count limit and ended with Ctrl+C. Open a shell on laptop in the shared home directory. This lesson reads the existing file; it does not send another request.

Follow the IP address and port on each side of >. In this saved run, 10.77.10.10.43958 communicates with 10.77.20.80.80. The client port is 43958; your number will differ when you make another capture. The server port remains 80 in this lab request.

On a reply, web’s address and port move to the left of >. Laptop’s address and port move to the right. These rows belong to one TCP conversation. Keep both directions together when you read it. This small file contains one conversation; a busy recording can contain many.

A shared server address alone is not enough to group rows. Two client programs could ask that server at different times. Read the ports as well, and keep the capture’s order. For this lesson, the single request makes that grouping visible without needing another filter.

Predict: will every captured row contain part of the requested file? Decide before reading the following replay.

The option -A prints packet bytes as characters, leaving out the link header. Header bytes can appear as dots or other unreadable characters. Look for readable application lines within that output rather than treating every printed character as a word from curl.

Read application text from the same hello.pcap
learner@laptop:~$ tcpdump -n -A -r hello.pcapreading from file hello.pcap, link-type EN10MB (Ethernet), snapshot length 262144
11:56:39.431102 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [S], seq 2888784756, win 64240, options [mss 1460,sackOK,TS val 691671072 ecr 0,nop,wscale 10], length 0
E..<..@.@.>.
M


M.P...P./[t........3".........
):. .......

11:56:39.431256 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [S.], seq 2766705611, ack 2888784757, win 65160, options [mss 1460,sackOK,TS val 522686132 ecr 691671072,nop,wscale 10], length 0
E..<..@.?...
M.P
M

.P......./[u....3".........
.'..):. ...

11:56:39.431266 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [.], ack 1, win 63, options [nop,nop,TS val 691671073 ecr 522686132], length 0
E..4..@.@.>.
M


M.P...P./[u.......?3......
):.!.'..
11:56:39.431426 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 691671073 ecr 522686132], length 83: HTTP: GET /hello.txt HTTP/1.1
E.....@.@.>y
M


M.P...P./[u.......?3m.....
):.!.'..GET /hello.txt HTTP/1.1
Host: 10.77.20.80
User-Agent: curl/8.5.0
Accept: */*


11:56:39.431461 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [.], ack 84, win 64, options [nop,nop,TS val 522686132 ecr 691671073], length 0
E..4..@.?.`.
M.P
M

.P......./[....@3......
.'..):.!
11:56:39.435539 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [P.], seq 1:173, ack 84, win 64, options [nop,nop,TS val 522686136 ecr 691671073], length 172: HTTP: HTTP/1.0 200 OK
E.....@.?.`7
M.P
M

.P......./[....@3......
.'..):.!HTTP/1.0 200 OK
Server: netlab-web/1.0
Date: Fri, 20 Nov 2026 11:56:39 GMT
Content-type: text/plain
Content-Length: 16
Last-Modified: Thu, 19 Nov 2026 00:00:00 GMT


11:56:39.435567 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [.], ack 173, win 63, options [nop,nop,TS val 691671077 ecr 522686136], length 0
E..4..@.@.>.
M


M.P...P./[....x...?3......
):.%.'..
11:56:39.435605 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [P.], seq 173:189, ack 84, win 64, options [nop,nop,TS val 522686136 ecr 691671077], length 16: HTTP
E..D..@.?.`.
M.P
M

.P.....x./[....@3*.....
.'..):.%Hello from web.

11:56:39.435607 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [.], ack 189, win 63, options [nop,nop,TS val 691671077 ecr 522686136], length 0
E..4..@.@.>.
M


M.P...P./[........?3......
):.%.'..
11:56:39.435632 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [F.], seq 189, ack 84, win 64, options [nop,nop,TS val 522686136 ecr 691671077], length 0
E..4..@.?.`.
M.P
M

.P......./[....@3......
.'..):.%
11:56:39.435688 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [F.], seq 84, ack 190, win 63, options [nop,nop,TS val 691671077 ecr 522686136], length 0
E..4..@.@.>.
M


M.P...P./[........?3......
):.%.'..
11:56:39.435807 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [.], ack 85, win 64, options [nop,nop,TS val 522686136 ecr 691671077], length 0
E..4..@.?.`.
M.P
M

.P......./[....@3......
.'..):.%learner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Reading hello.pcap with -A reveals the request, response and frames with no application data.
Steps (3)
  1. Type tcpdump -n -A -r hello.pcap
  2. Press Enter
  3. Output: reading from file hello.pcap, link-type EN10MB (Ethernet), snapshot length 262144 11:56:39.431102 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [S], seq 2888784756, win 64240, options [mss 1460,sackOK,TS val 691671072 ecr 0,nop,wscale 10], length 0 E..<..@.@.>. M M.P...P./[t........3"......... ):. ....... 11:56:39.431256 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [S.], seq 2766705611, ack 2888784757, win 65160, options [mss 1460,sackOK,TS val 522686132 ecr 691671072,nop,wscale 10], length 0 E..<..@.?... M.P M .P......./[u....3"......... .'..):. ... 11:56:39.431266 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [.], ack 1, win 63, options [nop,nop,TS val 691671073 ecr 522686132], length 0 E..4..@.@.>. M M.P...P./[u.......?3...... ):.!.'.. 11:56:39.431426 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [P.], seq 1:84, ack 1, win 63, options [nop,nop,TS val 691671073 ecr 522686132], length 83: HTTP: GET /hello.txt HTTP/1.1 E.....@.@.>y M M.P...P./[u.......?3m..... ):.!.'..GET /hello.txt HTTP/1.1 Host: 10.77.20.80 User-Agent: curl/8.5.0 Accept: */* 11:56:39.431461 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [.], ack 84, win 64, options [nop,nop,TS val 522686132 ecr 691671073], length 0 E..4..@.?.`. M.P M .P......./[....@3...... .'..):.! 11:56:39.435539 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [P.], seq 1:173, ack 84, win 64, options [nop,nop,TS val 522686136 ecr 691671073], length 172: HTTP: HTTP/1.0 200 OK E.....@.?.`7 M.P M .P......./[....@3...... .'..):.!HTTP/1.0 200 OK Server: netlab-web/1.0 Date: Fri, 20 Nov 2026 11:56:39 GMT Content-type: text/plain Content-Length: 16 Last-Modified: Thu, 19 Nov 2026 00:00:00 GMT 11:56:39.435567 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [.], ack 173, win 63, options [nop,nop,TS val 691671077 ecr 522686136], length 0 E..4..@.@.>. M M.P...P./[....x...?3...... ):.%.'.. 11:56:39.435605 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [P.], seq 173:189, ack 84, win 64, options [nop,nop,TS val 522686136 ecr 691671077], length 16: HTTP E..D..@.?.`. M.P M .P.....x./[....@3*..... .'..):.%Hello from web. 11:56:39.435607 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [.], ack 189, win 63, options [nop,nop,TS val 691671077 ecr 522686136], length 0 E..4..@.@.>. M M.P...P./[........?3...... ):.%.'.. 11:56:39.435632 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [F.], seq 189, ack 84, win 64, options [nop,nop,TS val 522686136 ecr 691671077], length 0 E..4..@.?.`. M.P M .P......./[....@3...... .'..):.% 11:56:39.435688 IP 10.77.10.10.43958 > 10.77.20.80.80: Flags [F.], seq 84, ack 190, win 63, options [nop,nop,TS val 691671077 ecr 522686136], length 0 E..4..@.@.>. M M.P...P./[........?3...... ):.%.'.. 11:56:39.435807 IP 10.77.20.80.80 > 10.77.10.10.43958: Flags [.], ack 85, win 64, options [nop,nop,TS val 522686136 ecr 691671077], length 0 E..4..@.?.`. M.P M .P......./[....@3...... .'..):.%
Check your answer

No. The capture includes frames without application data. Find GET /hello.txt HTTP/1.1, then HTTP/1.0 200 OK, then Hello from web. in the recorded output. Those words tell the application story; the other rows also belong to the exchange.

The request appears before the response. The response’s descriptive lines and its file contents occupy separate frames here. Read the header lines first, then the returned file text. Together they answer the request even though they occupy more than one row.

Open hello.pcap in Wireshark and select the request. Right-click it and choose Follow > TCP Stream. The stream view puts the conversation’s application bytes together, so packet headers no longer interrupt the text. Read the request and response there, then compare them with the terminal output.

Follow TCP Stream in Wireshark 4.2.2 on the course VM, Ubuntu 24.04.4 LTS.
  1. The client asks for /hello.txt with GET /hello.txt HTTP/1.1.
  2. The server’s response headers begin HTTP/1.0 200 OK.
  3. Hello from web. is the returned file text.

Follow changes how the saved data is displayed. It does not send a request or give permission to read someone else’s traffic. This lab exchange carries readable text without encryption. Other applications can carry encrypted data that you cannot read this way.

Follow every row below, including the ones without application data. Frames 1–3 come before the request. Frames 4–9 contain the request, response, and TCP’s own acknowledgments. Frames 10–12 come after the application data. Opening and closing TCP connections explains the outer groups. You do not need to decode their flags yet.

Every frame of the saved exchange Each frame has its number, direction and first line of application text, or no application data. Group labels separate frames before the request, the request and response, and frames after the data. Before the request Opening and closing TCP connections 1 laptop → web no application data 2 web → laptop no application data 3 laptop → web no application data Request and response 4 laptop → web GET /hello.txt HTTP/1.1 5 web → laptop no application data 6 web → laptop HTTP/1.0 200 OK 7 laptop → web no application data 8 web → laptop Hello from web. 9 laptop → web no application data After the data Opening and closing TCP connections 10 web → laptop no application data 11 laptop → web no application data 12 web → laptop no application data
Every frame of the saved exchange Each frame has its number, direction and first line of application text, or no application data. Group labels separate frames before the request, the request and response, and frames after the data. Before the request Opening and closing TCP connections 1 laptop → web: no application data 2 web → laptop: no application data 3 laptop → web: no application data Request and response 4 laptop → web GET /hello.txt HTTP/1.1 5 web → laptop: no application data 6 web → laptop HTTP/1.0 200 OK 7 laptop → web: no application data 8 web → laptop Hello from web. 9 laptop → web: no application data After the data Opening and closing TCP connections 10 web → laptop: no application data 11 laptop → web: no application data 12 web → laptop: no application data
Every row of hello.pcap gives its frame number, direction and first application line, or no application data, grouped before, during and after the request and response.

The middle group does not mean every frame in it carries application words. Readable text occurs in frames 4, 6, and 8. The complete file has 12 frames; another lab request has 13 frames. Your lab exchange can have 12 or 13, so use your own file’s count.

“Every row is a program message.” Some frames carry no application payload. Their presence matters even though you cannot yet explain their flags.

“Readable means meant for me.” Being able to read a message does not give you permission to collect it. This experiment stays in your closed lab.

Following a stream selects that conversation with a display filter. Check the main window’s filter afterwards if you want to return to the wider recording.

Read the index.pcap from the earlier exercise. Use the same text-reading option, then Follow in Wireshark. Write three sentences: who asked, for which path, and what came back.

Solution
Read the index.html exchange
learner@laptop:~$ tcpdump -n -A -r index.pcapreading from file index.pcap, link-type EN10MB (Ethernet), snapshot length 262144
11:55:44.728361 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [S], seq 3529231220, win 64240, options [mss 1460,sackOK,TS val 463099822 ecr 0,nop,wscale 10], length 0
E..<..@.@.H.
M


M.P...P.[.t........3".........
..W........

11:55:44.728406 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [S.], seq 782732885, ack 3529231221, win 65160, options [mss 1460,sackOK,TS val 2391830854 ecr 463099822,nop,wscale 10], length 0
E..<..@.?...
M.P
M

.P.....U.[.u....3".........
..qF..W....

11:55:44.728414 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [.], ack 1, win 63, options [nop,nop,TS val 463099822 ecr 2391830854], length 0
E..4..@.@.H.
M


M.P...P.[.u...V...?3......
..W...qF
11:55:44.728469 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [P.], seq 1:85, ack 1, win 63, options [nop,nop,TS val 463099822 ecr 2391830854], length 84: HTTP: GET /index.html HTTP/1.1
E.....@.@.H.
M


M.P...P.[.u...V...?3n.....
..W...qFGET /index.html HTTP/1.1
Host: 10.77.20.80
User-Agent: curl/8.5.0
Accept: */*


11:55:44.728485 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [.], ack 85, win 64, options [nop,nop,TS val 2391830854 ecr 463099822], length 0
E..4..@.?...
M.P
M

.P.....V.[.....@3......
..qF..W.
11:55:44.730959 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [P.], seq 1:173, ack 85, win 64, options [nop,nop,TS val 2391830856 ecr 463099822], length 172: HTTP: HTTP/1.0 200 OK
E.....@.?...
M.P
M

.P.....V.[.....@3......
..qH..W.HTTP/1.0 200 OK
Server: netlab-web/1.0
Date: Fri, 20 Nov 2026 11:55:44 GMT
Content-type: text/html
Content-Length: 271
Last-Modified: Thu, 19 Nov 2026 00:00:00 GMT


11:55:44.730995 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [.], ack 173, win 63, options [nop,nop,TS val 463099824 ecr 2391830856], length 0
E..4..@.@.H.
M


M.P...P.[.........?3......
..W...qH
11:55:44.731622 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [P.], seq 173:444, ack 85, win 64, options [nop,nop,TS val 2391830857 ecr 463099824], length 271: HTTP
E..C..@.?...
M.P
M

.P.......[.....@4).....
..qI..W.<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>web.lab.test</title>
</head>
<body>
<h1>web.lab.test</h1>
<p>This page comes from the lab machine web.</p>
<p><a href="hello.txt">hello.txt</a> .. <a href="signin.html">Sign in</a></p>
</body>
</html>

11:55:44.731642 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [.], ack 444, win 63, options [nop,nop,TS val 463099825 ecr 2391830857], length 0
E..4..@.@.H.
M


M.P...P.[.........?3......
..W...qI
11:55:44.731680 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [F.], seq 444, ack 85, win 64, options [nop,nop,TS val 2391830857 ecr 463099825], length 0
E..4..@.?...
M.P
M

.P.......[.....@3......
..qI..W.
11:55:44.731778 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [F.], seq 85, ack 445, win 63, options [nop,nop,TS val 463099825 ecr 2391830857], length 0
E..4..@.@.H.
M


M.P...P.[.........?3......
..W...qI
11:55:44.731812 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [.], ack 86, win 64, options [nop,nop,TS val 2391830857 ecr 463099825], length 0
E..4..@.?...
M.P
M

.P.......[.....@3......
..qI..W.learner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. The index.html exercise file supplies another request and response to tell as a story.
Steps (3)
  1. Type tcpdump -n -A -r index.pcap
  2. Press Enter
  3. Output: reading from file index.pcap, link-type EN10MB (Ethernet), snapshot length 262144 11:55:44.728361 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [S], seq 3529231220, win 64240, options [mss 1460,sackOK,TS val 463099822 ecr 0,nop,wscale 10], length 0 E..<..@.@.H. M M.P...P.[.t........3"......... ..W........ 11:55:44.728406 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [S.], seq 782732885, ack 3529231221, win 65160, options [mss 1460,sackOK,TS val 2391830854 ecr 463099822,nop,wscale 10], length 0 E..<..@.?... M.P M .P.....U.[.u....3"......... ..qF..W.... 11:55:44.728414 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [.], ack 1, win 63, options [nop,nop,TS val 463099822 ecr 2391830854], length 0 E..4..@.@.H. M M.P...P.[.u...V...?3...... ..W...qF 11:55:44.728469 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [P.], seq 1:85, ack 1, win 63, options [nop,nop,TS val 463099822 ecr 2391830854], length 84: HTTP: GET /index.html HTTP/1.1 E.....@.@.H. M M.P...P.[.u...V...?3n..... ..W...qFGET /index.html HTTP/1.1 Host: 10.77.20.80 User-Agent: curl/8.5.0 Accept: */* 11:55:44.728485 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [.], ack 85, win 64, options [nop,nop,TS val 2391830854 ecr 463099822], length 0 E..4..@.?... M.P M .P.....V.[.....@3...... ..qF..W. 11:55:44.730959 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [P.], seq 1:173, ack 85, win 64, options [nop,nop,TS val 2391830856 ecr 463099822], length 172: HTTP: HTTP/1.0 200 OK E.....@.?... M.P M .P.....V.[.....@3...... ..qH..W.HTTP/1.0 200 OK Server: netlab-web/1.0 Date: Fri, 20 Nov 2026 11:55:44 GMT Content-type: text/html Content-Length: 271 Last-Modified: Thu, 19 Nov 2026 00:00:00 GMT 11:55:44.730995 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [.], ack 173, win 63, options [nop,nop,TS val 463099824 ecr 2391830856], length 0 E..4..@.@.H. M M.P...P.[.........?3...... ..W...qH 11:55:44.731622 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [P.], seq 173:444, ack 85, win 64, options [nop,nop,TS val 2391830857 ecr 463099824], length 271: HTTP E..C..@.?... M.P M .P.......[.....@4)..... ..qI..W.<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>web.lab.test</title> </head> <body> <h1>web.lab.test</h1> <p>This page comes from the lab machine web.</p> <p><a href="hello.txt">hello.txt</a> .. <a href="signin.html">Sign in</a></p> </body> </html> 11:55:44.731642 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [.], ack 444, win 63, options [nop,nop,TS val 463099825 ecr 2391830857], length 0 E..4..@.@.H. M M.P...P.[.........?3...... ..W...qI 11:55:44.731680 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [F.], seq 444, ack 85, win 64, options [nop,nop,TS val 2391830857 ecr 463099825], length 0 E..4..@.?... M.P M .P.......[.....@3...... ..qI..W. 11:55:44.731778 IP 10.77.10.10.55262 > 10.77.20.80.80: Flags [F.], seq 85, ack 445, win 63, options [nop,nop,TS val 463099825 ecr 2391830857], length 0 E..4..@.@.H. M M.P...P.[.........?3...... ..W...qI 11:55:44.731812 IP 10.77.20.80.80 > 10.77.10.10.55262: Flags [.], ack 86, win 64, options [nop,nop,TS val 2391830857 ecr 463099825], length 0 E..4..@.?... M.P M .P.......[.....@3...... ..qI..W.

laptop asked web. It requested /index.html. The server answered HTTP/1.0 200 OK and returned the lab page, whose title is web.lab.test.

Opening and closing TCP connections in TCP, UDP, and Ports explains the outer groups and TCP’s acknowledgments between the data frames.

  • Group both directions using addresses and ports.
  • Find the request, response, and file text within the exchange.
  • Keep unexplained frames in the story without guessing their meaning.

Next, Practice: Your First Packet Capture makes your own evidence package.