14  Traffic Analysis Fundamentals

14.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Explain the importance of network traffic analysis in IoT system development and operation
  • Identify strategic capture points for effective traffic monitoring
  • Distinguish between capture filters and display filters
  • Configure promiscuous mode for comprehensive packet capture
  • Apply best practices for capture point selection in IoT networks
In 60 Seconds

Traffic analysis examines network packet captures to understand protocol behavior, diagnose communication failures, and validate IoT system correctness. By capturing actual packets exchanged between IoT devices and cloud backends, engineers can verify: correct protocol message formatting, expected timing and retransmission behavior, security handshake correctness, and the presence of unexpected or suspicious traffic. Wireshark and tshark are the primary tools for IoT traffic analysis.

14.2 Prerequisites

Before diving into this chapter, you should be familiar with:

  • Networking Basics: Understanding network protocols, the OSI model, IP addressing, and TCP/UDP is essential for interpreting packet captures and diagnosing network issues
  • Application-Layer Protocols: Knowledge of IoT protocols like MQTT, CoAP, and HTTP provides context for analyzing protocol-specific traffic patterns

“Network traffic analysis is like putting a stethoscope on the network!” said Max the Microcontroller. “You capture every packet flowing between devices and inspect them to understand what is happening, find problems, and catch security threats.”

Sammy the Sensor asked why it matters. “Imagine my temperature readings are not arriving at the cloud. Is the problem me, the Wi-Fi, the MQTT broker, or the cloud? By capturing traffic at different points, you can pinpoint exactly where the chain breaks. It is like following a letter through the postal system to find where it gets lost.”

Lila the LED described the tools. “Wireshark is the Swiss Army knife of traffic analysis. It captures packets and shows you every byte in a friendly graphical interface. You can filter by protocol, source, destination, or content. For example, filtering for just MQTT traffic shows you every publish and subscribe message.” Bella the Battery added a practical tip. “Capture at the right point! If you capture at the sensor, you see what it sends. If you capture at the gateway, you see what arrives. If they do not match, you know the problem is in between. Strategic capture placement is the key to efficient debugging.”

14.3 Video Resources

Comprehensive tutorial on using Wireshark to capture and analyze network traffic, identify bottlenecks, and troubleshoot IoT connectivity issues.

Essential Skills:

  • Capturing packets on Wi-Fi, Ethernet, and USB interfaces
  • Display filters for IoT protocols: mqtt, coap, zigbee
  • Following TCP/MQTT streams to see complete conversations
  • Identifying connection issues and protocol errors
  • Analyzing timing with IO graphs

Recommended Tutorials:

Common IoT Use Cases:

  • Debug MQTT connection refused errors (QoS levels, clean session)
  • Verify CoAP observe relationships and block transfers
  • Analyze Zigbee mesh routing and link quality
  • Detect Wi-Fi deauth attacks on IoT devices

14.4 Introduction

This chapter connects to multiple learning resources across the curriculum:

Explore Interactively:

  • Simulations Hub - Network topology visualizer, protocol comparison tools, and interactive packet analysis demos
  • Videos Hub - Wireshark tutorials, tcpdump command references, and protocol deep-dives

Test Your Knowledge:

  • Quizzes Hub - Network analysis quizzes covering filter syntax, protocol identification, and troubleshooting scenarios
  • Knowledge Gaps Hub - Common traffic analysis misconceptions and debugging pitfalls

Visual Learning:

  • Knowledge Map - See how traffic analysis connects to network design, security monitoring, and performance optimization

Network traffic analysis is like being able to read all the messages passing through your home’s mail system. Every time an IoT device talks to the internet or to other devices, it sends little packets of data. Traffic analysis tools let you capture and read these packets to understand what’s happening.

Think of it like this: Your smart thermostat says it’s working, but your heating bill is crazy high. By analyzing network traffic, you might discover it’s sending temperature readings every second instead of every minute–a bug that’s wasting bandwidth and battery.

Real-world analogy: Imagine you could see every conversation in a busy office. You’d notice: who talks to whom, what they discuss, if anyone’s shouting (errors), if messages are getting lost, and if conversations happen in the right order. That’s what network analysis reveals about your IoT devices.

Term Simple Explanation
Packet A small chunk of data traveling across the network (like a single envelope in the mail)
Protocol The “language” devices use to communicate (MQTT, HTTP, etc.)–like speaking English vs. Spanish
Capture Recording all packets flowing through a network connection for later analysis
Filter Showing only specific types of packets (like only showing emails from your boss)
Latency How long messages take to arrive (like mail delivery time–faster is better)

Why this matters for IoT: IoT devices often fail silently. Your sensor says “I’m sending data” but the cloud receives nothing. Traffic analysis shows you exactly what’s being sent (or not sent), helping you find bugs, security issues, and performance problems that are invisible otherwise.

Myth: “If I capture with Wireshark, I’ll see all network traffic and immediately understand what’s wrong.”

Reality: Network traffic analysis has significant blind spots and requires careful setup:

Quantified Reality:

  • Switched Networks: On modern switched Ethernet, you only see ~2-5% of total network traffic (just your device’s traffic + broadcasts). Without port mirroring or a network TAP, you miss 95-98% of other devices’ communications.
  • Encrypted Traffic: ~75-85% of IoT cloud traffic now uses TLS/DTLS. Wireshark shows encrypted payloads as hex garbage unless you provide decryption keys. You see connection metadata (IPs, ports, timing) but not message contents.
  • Wireless Protocols: Standard Wi-Fi adapters capture only 20-30% of wireless frames without monitor mode. Zigbee and BLE require specialized hardware sniffers ($50-$200) that 90% of developers don’t have.
  • Capture Overhead: High-throughput captures (>100 Mbps) can drop 5-15% of packets on standard hardware. You think you’re seeing everything, but subtle packet loss goes unnoticed.

Packet Capture Coverage Gap Calculation: 100-device IoT network on switched Ethernet sending 10 packets/second each:

Total network traffic: \[R_{\text{total}} = 100 \text{ devices} \times 10 \text{ pkt/s} = 1,000 \text{ pkt/s}\]

Visible from single switch port (no mirroring): \[R_{\text{visible}} = 1 \text{ your device} \times 10 + 0.05 \times 1,000 \text{ (broadcasts)} = 10 + 50 = 60 \text{ pkt/s}\]

Coverage: \[\text{Coverage} = \frac{60}{1,000} = 0.06 = 6\%\]

With SPAN port mirroring (copies all traffic to monitor port): \[\text{Coverage} = 100\%\]

Interactive: Capture Coverage Calculator

Key Insight: With devices and \({packetsPerSec} packets/second each, you're only seeing **\){coveragePercent}%** of network traffic without port mirroring. That’s a % blind spot that could hide critical debugging information.

Equipment needed:

  • Basic capture: \(\$0\) (built-in NIC, sees ~%)
  • Managed switch with SPAN: \(\$120\) (sees 100%)
  • Network TAP (physical splitter): \(\$200-600\) (sees 100%, no switch dependency)

For debugging multi-device interactions, that \(\$120\) switch eliminates ~% of blind spots. Without it, you’re troubleshooting with one eye closed.

Example from the Field: A developer spent 2 weeks debugging “missing MQTT messages” using Wireshark on their laptop. The issue? Their laptop was connected to port 5 on a switch, seeing only broadcast traffic. The actual MQTT broker conversation happened on port 8 (different subnet). They needed switch port mirroring to see the real traffic. Lesson: Capture point location determines what you can observe–plan your capture strategy carefully.

Correct Approach:

  1. Strategic Capture Points: Place captures at network boundaries (gateway, broker) not client devices
  2. Enable Promiscuous/Monitor Mode: For Wi-Fi analysis, use monitor mode and proper channels
  3. Hardware Sniffers: Budget $100-300 for Zigbee/BLE/LoRa sniffers if analyzing those protocols
  4. Key Management: For encrypted traffic, configure pre-shared keys or private keys in Wireshark preferences
  5. Validate Completeness: Cross-check packet counts from multiple capture points (sender logs, receiver logs, wire capture) to detect dropped packets

Rule of Thumb: Assume your first capture is incomplete. Validate by correlating with device logs, broker metrics, and multiple capture points before drawing conclusions.

Network traffic analysis is the process of capturing, examining, and interpreting data packets flowing through a network. For IoT systems, traffic analysis serves multiple critical purposes: validating protocol implementations, diagnosing connectivity issues, measuring performance, detecting security threats, and understanding device behavior.

Definition

Network Traffic Analysis is the systematic capture and examination of network packets to understand communication patterns, diagnose issues, validate protocol compliance, measure performance, and detect security anomalies. In IoT contexts, this includes analyzing resource-constrained protocols, intermittent connections, and diverse communication patterns.

14.4.1 Why Traffic Analysis Matters for IoT

Protocol Validation: Verify that devices correctly implement protocols like MQTT, CoAP, or Zigbee. Misimplementation can cause interoperability issues.

Performance Troubleshooting: Identify sources of latency, packet loss, or bandwidth bottlenecks that affect system responsiveness.

Security Monitoring: Detect unauthorized access, data exfiltration, DDoS attacks, or compromised devices through anomalous traffic patterns.

Debugging Device Behavior: Understand why devices fail to connect, disconnect unexpectedly, or exhibit erratic behavior.

Capacity Planning: Measure actual traffic volumes to inform infrastructure scaling decisions.

Compliance Verification: Ensure data transmission meets regulatory requirements (encryption, data retention, etc.).

Optimization: Identify inefficient communication patterns (excessive retransmissions, chatty protocols) for optimization.

14.5 Traffic Capture Fundamentals

~20 min | Intermediate | P13.C06.U01

Flowchart showing network traffic analysis workflow with three main phases: Network Traffic Analysis starts with Capture Traffic phase branching into three parallel capture methods (Wireshark for full packet capture, tcpdump for command-line capture, Hardware sniffer for Wi-Fi/Zigbee/BLE), all converging to Apply Filters. Filter phase splits into three parallel filter types (Protocol filter for MQTT/CoAP/HTTP, Device filter for MAC/IP address, Time filter for specific timerange) merging into Analyze Packets. Analysis phase branches into three parallel analysis types (Decode protocols to extract payload, Timing analysis for latency and intervals, Security audit for encryption and authentication) that all feed into Generate Report for final output. Workflow progresses from raw packet capture through focused filtering to multi-dimensional analysis producing actionable insights for protocol validation, troubleshooting, security monitoring, and performance optimization.

Flowchart showing network traffic analysis workflow with three main phases: Network Traffic Analysis starts with Capture Traffic phase branching into three parallel capture methods (Wireshark for full packet capture, tcpdump for command-line capture, Hardware sniffer for Wi-Fi/Zigbee/BLE), all converging to Apply Filters. Filter phase splits into three parallel filter types (Protocol filter for MQTT/CoAP/HTTP, Device filter for MAC/IP address, Time filter for specific timerange) merging into Analyze Packets. Analysis phase branches into three parallel analysis types (Decode protocols to extract payload, Timing analysis for latency and intervals, Security audit for encryption and authentication) that all feed into Generate Report for final output. Workflow progresses from raw packet capture through focused filtering to multi-dimensional analysis producing actionable insights for protocol validation, troubleshooting, security monitoring, and performance optimization.
Figure 14.1: Complete workflow for network traffic capture and analysis, from selecting capture points through applying filters to extracting actionable insights for protocol validation, troubleshooting, security monitoring, and performance optimization.
Architecture diagram showing traffic analysis layered components and layers
Figure 14.2: Alternative view: Layered stack showing network traffic analysis as ascending layers of abstraction. Raw data captured at Layer 1 flows upward through tools, filtering, and analysis to produce actionable insights at Layer 5. This view emphasizes that higher-level insights depend on proper configuration at each lower layer.

This decision tree guides engineers to select the right capture approach and analysis techniques based on the IoT protocol being investigated.

Decision tree diagram for protocol capture decision
Figure 14.3: Protocol-specific capture decision tree: TCP-based protocols (MQTT, HTTP, AMQP) use standard Wireshark with port-based filters. UDP-based protocols (CoAP, DNS, DTLS) require understanding connectionless patterns. Wireless protocols require specialized hardware: Wi-Fi needs monitor mode, Zigbee needs CC2531 sniffer, BLE needs nRF sniffer, LoRa needs SDR or gateway-level capture. This complements the workflow diagram by showing HOW to capture each protocol type rather than the general process.

14.5.1 Capture Points

Gateway/Router: Capture traffic at the network gateway to see all devices’ communications with cloud or external services.

Access Point: For Wi-Fi networks, capture at the AP to monitor all wireless device traffic.

Switch Port Mirroring (SPAN): Configure network switches to mirror traffic to a monitoring port for analysis.

Inline Capture: Place capture device between communicating endpoints (e.g., between gateway and internet).

Device-Level Capture: On devices that support it (Raspberry Pi, Linux gateways), capture traffic locally using tcpdump.

Wireless Sniffing: Use dedicated hardware to capture Wi-Fi, Zigbee, or LoRa radio transmissions.

14.5.2 Promiscuous Mode

Network interfaces normally filter packets not addressed to them. Promiscuous mode captures all packets visible to the interface, essential for network analysis.

Enable on Linux:

sudo ip link set eth0 promisc on

Enable on macOS:

sudo ifconfig en0 promisc

Note: Wi-Fi promiscuous mode often requires monitor mode and specialized drivers.

14.5.3 Capture Filters vs. Display Filters

Capture Filters: Applied during capture to reduce captured data volume. More efficient but requires knowing what to look for in advance.

Examples (BPF syntax):

host 192.168.1.100              # Only traffic to/from specific host
port 1883                       # Only MQTT traffic
tcp and port 8883               # Only MQTT over TLS
not broadcast and not multicast # Exclude broadcast/multicast

Display Filters: Applied after capture to focus on specific packets for analysis. More flexible but requires capturing more data.

Examples (Wireshark syntax):

mqtt                            # Only MQTT packets
coap                            # Only CoAP packets
ip.addr == 192.168.1.100       # Specific IP address
tcp.analysis.retransmission    # Only retransmissions
frame.time_delta > 1           # Packets with >1s gap

14.6 Worked Example: Debugging Missing MQTT Messages with tcpdump

Problem: A smart greenhouse system publishes soil moisture readings every 60 seconds to greenhouse/zone3/moisture. The cloud dashboard shows gaps – roughly 1 in 10 readings never arrives. The sensor firmware confirms successful publish() calls (QoS 0).

Step 1: Capture at the gateway

# On the Raspberry Pi gateway running the Mosquitto broker
sudo tcpdump -i wlan0 port 1883 -w mqtt_debug.pcap -c 500
# Wait 10 minutes (expect ~10 PUBLISH packets)

Step 2: Analyze in Wireshark

Display filter: mqtt.msgtype == 3    # MQTT PUBLISH only
Sort by: Time column (ascending)

Findings:

Packet # Time Source Dest Info
12 10:00:00 192.168.1.50 192.168.1.1 PUBLISH greenhouse/zone3/moisture
47 10:01:01 192.168.1.50 192.168.1.1 PUBLISH greenhouse/zone3/moisture
10:02:00 MISSING
89 10:03:02 192.168.1.50 192.168.1.1 PUBLISH greenhouse/zone3/moisture

Step 3: Check TCP around the gap

Display filter: ip.addr == 192.168.1.50 && frame.time >= "10:01:30" && frame.time <= "10:02:30"

Result: A TCP RST (reset) packet at 10:01:45, followed by a new TCP SYN at 10:02:50. The MQTT connection dropped and the sensor reconnected, but the reading at 10:02:00 was lost because QoS 0 provides no retry.

Root cause: The Wi-Fi AP dropped the sensor’s connection due to a DHCP lease renewal timeout. The sensor’s MQTT library reconnected automatically, but the one reading during the disconnection was silently lost.

Fix: Change MQTT QoS from 0 to 1 (at-least-once delivery). The broker will store unacknowledged messages and the sensor will retry on reconnect. After the fix, repeat the capture to verify zero gaps.

Lesson: Traffic analysis in 10 minutes found a bug that application-level logging could not detect. The sensor reported “publish succeeded” because the TCP send buffer accepted the data – but the network never delivered it.

14.7 Knowledge Check

14.8 How It Works: Network Traffic Capture and Analysis

Network traffic analysis operates by intercepting and examining data packets as they traverse network interfaces. Here’s the step-by-step process:

Step 1: Packet Capture

  • Network interface card (NIC) operates in promiscuous mode, accepting all packets it can see, not just those addressed to it
  • On switched networks, packets are normally only sent to intended destinations; port mirroring (SPAN) or network TAPs copy all traffic to a monitoring port
  • Captured packets are buffered in kernel memory, then copied to user-space application (Wireshark/tcpdump)

Step 2: Filtering

  • Capture filters (BPF syntax) apply at kernel level during capture to reduce stored data: port 1883 captures only MQTT traffic before writing to disk
  • Display filters (Wireshark syntax) apply after capture for analysis: mqtt.msgtype == 3 shows only PUBLISH messages from a saved file
  • Filters use protocol dissectors that understand packet structure (MQTT header at offset X, payload at offset Y)

Step 3: Protocol Dissection

  • Each packet traverses the protocol stack: Ethernet frame → IP packet → TCP segment → MQTT message
  • Dissectors parse each layer: IP dissector extracts source/dest addresses, TCP dissector extracts port numbers, MQTT dissector extracts topic/payload
  • Wireshark’s protocol tree view shows this hierarchy, allowing drill-down from layer 2 (MAC) to layer 7 (application)

Step 4: Analysis and Visualization

  • Statistics aggregate data: protocol distribution (70% MQTT, 20% DNS), top talkers (which device sends most traffic)
  • Flow graphs show message sequences: Client → CONNECT → Broker, Broker → CONNACK → Client
  • Time series reveal patterns: message rate spikes at 8 AM correlate with device wakeup

Why This Approach Works: Unlike application-level logging (which shows “connection failed”), packet capture reveals the actual bytes sent/received and timing, exposing issues invisible to applications (wrong password length, TCP retransmissions, DNS lookup delays).


14.9 The Business Case for Traffic Analysis: ROI in Real Deployments

Many teams treat traffic analysis as an optional debugging luxury rather than an engineering necessity. The data suggests otherwise.

Cost of NOT analyzing traffic – three industry cases:

Deployment Issue Found Via Traffic Analysis Discovery Delay Cost of Delay
Smart building (2,200 sensors) MQTT keep-alive set to 15 sec instead of 300 sec, generating 40x unnecessary traffic Found in week 2 of pilot Would have consumed $14,000/year in excess cloud bandwidth at scale
Fleet tracking (800 vehicles) GPS module sending 12 duplicate positions per fix due to UART buffer overflow Found after 4 weeks of customer complaints 3 months of excess cellular data ($28/vehicle/month) = $67,200 wasted
Agricultural sensors (3,000 nodes) LoRaWAN ADR not converging, every node transmitting at SF12 (maximum range, minimum throughput) Found during pre-deployment validation Would have reduced network capacity by 80%, requiring $150,000 in additional gateways

Traffic analysis tooling costs vs. savings:

Investment Cost Typical Annual Savings
Wireshark (free) + training (2 days) $2,000 (engineer time) $10,000-50,000 in avoided debugging time
Network TAP for Ethernet monitoring $200-800 per location Prevents invisible packet loss that costs weeks of debugging
Zigbee/BLE sniffer (nRF52840 dongle) $50-100 Required for wireless protocol debugging – no alternative
Protocol-specific analyzer (MQTT Explorer, CoAP tools) $0 (open source) Catches QoS, topic, and payload issues in minutes vs. hours
10-hour training program for team $5,000-8,000 Reduces mean-time-to-resolution from 3 days to 4 hours across team

When to invest in traffic analysis capability:

  • Before deployment: Validate protocol implementations during integration testing. Finding a MQTT QoS misconfiguration in the lab takes 20 minutes. Finding it in a 500-device field deployment takes 2 weeks.
  • During pilot: Capture baseline traffic patterns for 7 days. This baseline becomes the reference for anomaly detection in production.
  • In production: Periodic captures (monthly) catch configuration drift, firmware regression, and emerging security threats before they become outages.

Rule of thumb: For deployments over 50 devices, traffic analysis during pre-deployment testing pays for itself within the first month. The fleet tracking case above shows that a $50 sniffer and 4 hours of analysis would have saved $67,200.

Interactive: Traffic Analysis ROI Calculator

Your Scenario: With \({deployment_size} devices, catching a **\){issue_type.toLowerCase()}** issue during pre-deployment analysis (\({analysis_hours} hours) would save **\)\({monthly_savings.toLocaleString()}/month**. The investment of **\)\({total_investment.toLocaleString()}** pays for itself in just **\){roi_months} months, yielding $** net benefit in the first year.

14.10 Concept Check


14.11 Concept Relationships

Prerequisites (What You Need First):

  • Networking Basics: Understanding TCP/IP, ports, and the OSI model is essential for interpreting packet structure
  • Application-Layer Protocols: Knowing MQTT, CoAP, HTTP protocols provides context for what you’re analyzing

Related Concepts (Explore in Parallel):

Build On This (Next Steps):

Real-World Application:

  • Testing Fundamentals: Traffic analysis validates network layer behavior in integration tests
  • Security Testing: Packet inspection detects security vulnerabilities and attack patterns

14.12 See Also

Documentation & References:

Related Chapters in This Module:

Cross-Module Connections:

Hands-On Resources:


14.13 Try It Yourself: Capture and Analyze MQTT Traffic

Objective: Capture live MQTT traffic and analyze connection patterns, QoS levels, and message timing.

What You’ll Need:

  • Laptop with Wireshark installed
  • MQTT client (mosquitto_pub/mosquitto_sub or MQTT Explorer)
  • Access to local or test MQTT broker (test.mosquitto.org works)

Step 1: Set Up Capture (5 min)

# Start Wireshark capture on loopback interface (if broker is localhost)
# OR your Wi-Fi interface (if broker is remote)

# Capture filter: port 1883

Step 2: Generate MQTT Traffic (10 min)

# Terminal 1: Subscribe to topic
mosquitto_sub -h test.mosquitto.org -t "sensors/temp" -v

# Terminal 2: Publish 10 messages with QoS 0
for i in {1..10}; do
  mosquitto_pub -h test.mosquitto.org -t "sensors/temp" -m "temp: $i" -q 0
  sleep 1
done

# Terminal 3: Publish 10 messages with QoS 1
for i in {1..10}; do
  mosquitto_pub -h test.mosquitto.org -t "sensors/temp" -m "temp: $i" -q 1
  sleep 1
done

Step 3: Analyze Capture (15 min)

Stop Wireshark capture and apply filters:

  1. View all MQTT packets: Filter mqtt
  2. Count message types: Statistics → Protocol Hierarchy
  3. Examine QoS 0 vs QoS 1: Compare PUBLISH sequences
    • QoS 0: PUBLISH only (no acknowledgment)
    • QoS 1: PUBLISH → PUBACK (acknowledgment)
  4. Measure timing: Right-click PUBLISH packet → Set Time Reference (zero time), then observe time deltas

What to Observe:

  • QoS 0 messages have NO PUBACK response
  • QoS 1 messages show PUBLISH followed by PUBACK within 10-50ms
  • CONNECT → CONNACK sequence at start
  • Keep-alive PINGREQ/PINGRESP every 60 seconds (default)

Challenge Extension: Simulate message loss by disconnecting Wi-Fi during QoS 1 publish. Observe automatic retransmission when reconnected (DUP flag set on retry).

Expected Learning Outcome: You now understand how to capture traffic at the right interface, apply protocol filters, and interpret MQTT message sequences.


14.14 Summary

  • Network traffic analysis enables validation of IoT protocol implementations, connectivity troubleshooting, and security monitoring
  • Strategic capture points (gateway, switch SPAN, device-level) determine what traffic you can observe
  • Promiscuous mode captures all visible packets, not just those addressed to your interface
  • Capture filters (BPF syntax) reduce data volume during capture; display filters (Wireshark syntax) enable flexible post-capture analysis
  • Wireless protocols require specialized hardware sniffers for Zigbee, BLE, and LoRa

Common Pitfalls

Capturing all network traffic on a busy IoT gateway generates gigabytes of data per hour, making it impossible to find relevant packets. Define capture filters before starting: tcpdump “host 192.168.1.50 and port 1883” for a specific MQTT device; “udp port 5683” for CoAP; “host device_ip” for all traffic from a specific IoT device. Capture only the protocol and device relevant to the investigation. Post-capture display filters in Wireshark (e.g., mqtt.topic contains “sensor”) further narrow relevant packets.

Finding an “unusual” pattern in IoT traffic analysis requires knowing what normal looks like. A device sending 3 packets per minute is unusual only if the baseline is 1 packet per minute. Capture a baseline traffic recording of the system operating correctly at steady state (minimum 30 minutes). Compare anomalous traffic against the baseline: count packets per minute, payload sizes, protocol message types, and inter-packet timing. Deviations from baseline are the primary indicator of problems.

Modern IoT devices use TLS or DTLS encryption; Wireshark shows only encrypted binary blobs without the session keys. To decrypt: for TLS 1.2, set the SSLKEYLOGFILE environment variable (supported by OpenSSL apps); for DTLS PSK, configure the pre-shared key in Wireshark Edit → Preferences → Protocols → DTLS → Pre-Shared Keys. Without decryption, traffic analysis can only verify TLS handshake mechanics (certificate validity, cipher suite) but cannot inspect application-layer protocol content.

Traffic captures using relative timestamps (“0.000 s, 0.250 s, 0.500 s”) cannot be correlated with device logs, server logs, or other system events that use wall-clock timestamps. Always verify capture hardware uses synchronized absolute timestamps: enable GPS time synchronization on the capture machine, or use NTP-synchronized system clock. When correlating multiple captures (device-side + server-side), synchronize both capture machines to NTP before starting captures.

14.15 What’s Next

Continue to Traffic Capture Tools to learn how to use Wireshark, tcpdump, tshark, and specialized IoT sniffers for comprehensive traffic analysis.

Previous Current Next
Network Simulation Tools Traffic Analysis Fundamentals Traffic Capture Tools