02 / Networks / 30 min READ + PRACTICE
Packet captures and analysis.
Read traffic from your own loopback lab with Wireshark or tcpdump and understand protocol layers.
Know the layers
An IP packet identifies source and destination addresses; TCP adds ports, sequence numbers and connection state. A capture shows traffic, not the intent behind it. Learn to distinguish a SYN handshake from application data and a retransmission from a second request.
Capture a local request
Choose the loopback interface in Wireshark and filter on tcp.port == 8000 while requesting your own test server. Alternatively capture a short localhost-only trace with tcpdump. Capturing may require elevated privileges; use only the interface you control.
sudo tcpdump -i lo -c 20 'tcp port 8000'
# In another terminal: curl http://127.0.0.1:8000/ Protect your capture
Even local traces can contain cookies or form values. Keep practice captures private and delete those containing unexpected secrets. For HTTPS, the payload is encrypted; you can still observe endpoints and timing without assuming you can read the content.
Try it in your lab
Capture a single localhost request and identify source port, destination port and TCP flags. Summarize what you can and cannot infer.
Make sure it clicks
What is the difference between a capture filter and a display filter?
A prompt you can adapt
Explain this sanitized loopback pcap summary and help me write a protocol-layer diagram; do not infer credentials.How to set up OpenCode ↗