Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 37 ยท Getting Started

What Is Wireshark?

Learn what Wireshark is, what a packet analyzer shows you, what it can and cannot see, when to use it, and the legal rules for capturing network traffic.

Wireshark is a free, open-source network protocol analyzer. It listens to a network interface, copies the packets that pass by, and then shows you what is inside them: who sent each packet, where it went, which protocol it used and what the bytes mean. It is the tool people reach for when "the network is slow", "the login fails only on Wi-Fi", or "I want to see what this app really sends".

This course teaches Wireshark from the first capture to advanced analysis. Before you open the program, this lesson explains what it is, what it is good at, and the rules you must follow to use it legally.

About the examples. A packet analyzer is a desktop program and needs access to a real network interface, so it cannot run inside a web page. In this course the Wireshark screens, filters and command-line output are shown as read-only text or described step by step. Every concept also has a small runnable Python stand-in that builds or decodes packets in memory, so you can experiment with the ideas right here. Stand-ins are clearly labelled and never touch a real network.

What a packet analyzer does

Data on a network travels in small units called packets (at the lowest level, frames). A packet analyzer does four jobs:

  1. Capture: copy packets from a network interface, or read them from a saved file.
  2. Dissect: decode each packet layer by layer (Ethernet, IP, TCP, HTTP...) using a library of dissectors, one per protocol.
  3. Display: show the packets as a list, a tree of fields and the raw bytes.
  4. Analyze: filter, search, color, follow conversations, and compute statistics.

Wireshark started in 1998 under the name Ethereal and was renamed in 2006. It runs on Windows, macOS and Linux, is licensed under the GPL, and understands several thousand protocols. The same engine powers a family of tools: tshark (command line), dumpcap (capture only), editcap, mergecap, capinfos and text2pcap. You will meet all of them later.

flowchart LR
    N["Network interface"] --> C["Capture engine<br/>(libpcap / Npcap)"]
    C --> D["Dissectors<br/>Ethernet, IP, TCP, HTTP..."]
    D --> U["Packet list, details, bytes"]
    F["Saved .pcap / .pcapng file"] --> D

Packets come from a live interface or from a file, pass through the dissectors and end up on screen.

What people use it for

  • Troubleshooting. Find out whether a slow page is caused by DNS, a lost packet, a slow server or a misconfigured proxy. You will practice this in the troubleshooting chapter.
  • Learning protocols. Seeing a real TCP handshake or DHCP exchange teaches more than any diagram.
  • Security analysis. Spot port scans, unusual DNS or credentials sent in clear text, and examine a capture after an incident.
  • Development and debugging. Check what your API client or IoT device actually puts on the wire.
  • Network engineering. Verify QoS markings, VLAN tags, routing protocol messages, and VPN behavior.

What Wireshark cannot do

Knowing the limits saves hours of confusion:

  • It sees only the traffic that reaches your interface. On a modern switched network you see your own traffic plus broadcasts and multicasts, not other people's. To see more you need a mirror (SPAN) port, a network tap or to capture on the device itself. Capture options explains this.
  • Encrypted content stays encrypted. For HTTPS you see addresses, sizes, timing and the TLS handshake, not the web page. You can decrypt your own traffic if you have the session keys (an advanced lesson later).
  • It is passive. Wireshark observes; it does not block, change or inject traffic. It is an analyzer, not a firewall or an intrusion prevention system.
  • A capture is a snapshot. If the problem happened five minutes ago and you were not capturing, the evidence is gone.

Capturing legally and ethically

Packets can contain passwords, private messages and personal data. Treat a capture like a recording of a phone call.

  • Capture only on networks you own or have written permission to analyze.
  • Do not capture other people's traffic, public Wi-Fi or a workplace network without authorization. In many countries doing so is a crime.
  • Limit what you collect (capture filters, short duration) and store capture files securely. Share them only after removing or anonymizing sensitive data.
  • Never use what you learn to attack systems. This course teaches defensive analysis only.

Always get permission first. "I was only looking" is not a defense when you capture traffic that belongs to someone else.

A first taste with a stand-in

Wireshark's main window is a table with one row per packet: number, time, source, destination, protocol, length and an info summary. The stand-in below builds a small made-up capture (a web visit) and prints it in that style, so you know what to expect. The data is invented for illustration.

Python A packet list in Wireshark style (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Reading the story

Read the table top to bottom and the story appears: the client asks DNS for the address of example.org, opens a TCP connection to the server with three packets (the handshake), then sends an HTTP request and gets a response. Every Wireshark investigation is this kind of reading. The next stand-in counts packets per protocol, which is what Wireshark's Protocol Hierarchy and Conversations windows do on a large scale.

Python Count packets and bytes per protocol (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the main job of a dissector in Wireshark?

    Each dissector knows the layout of one protocol and turns raw bytes into fields you can read and filter on.
  2. 2. You run Wireshark on a laptop connected to a switch. Which traffic will you normally see?

    A switch forwards unicast frames only to the port of the destination, so you see your own unicast traffic and the frames sent to everyone.
  3. 3. Which statement about HTTPS traffic in a capture is correct?

    Capturing works for encrypted traffic, but the payload is unreadable without the session keys.
  4. 4. When is it acceptable to capture traffic on a network?

    Authorization is required; packets can contain private data, and unauthorized capture is illegal in many places.

Summary

  • Wireshark captures packets, dissects them layer by layer and lets you filter, search and analyze them.
  • It is passive: it observes traffic but never blocks or changes it.
  • You see only what reaches your interface, and encrypted payloads stay encrypted.
  • Capture only on networks you own or are authorized to analyze, and protect capture files.
  • The same engine powers tshark, dumpcap, editcap and other command-line tools.

Next: Installing Wireshark and a Tour of the Interface