Lab Name Exploring packet layer data in JSON using a packet analyzer.
Subject Area Computer Science
Grade 9 - 12
Topic Networking, Data Analysis & Visualization, bits & bytes.
Experiment Title Evaluate the QoS of the WiFi network by capturing and analyzing packets using an open source network analyzer, measuring packets sent/received from your computer (total, per IP), length (size) of packets (total,average), and data transfer rate (bps, packets/sec).
Hardware WiFi Network Adapter (built-in to laptops)
Software Wireshark, web-browser, COSMOS toolkit framework
Number of Sessions to teach the topic 3 or more
Educational standards to be addressed CSTA K-12 Computer Science Standards (Level 3A: Grades 9-10)
  • Computing Systems
    • 3A-CS-01 Explain how abstractions hide the underlying implementation details of computing systems embedded in everyday objects.
    • 3A-CS-02 Compare levels of abstraction and interactions between application software, system software, and hardware layers.
  • Networks and the Internet
    • 3A-NI-04 Evaluate the scalability and reliability of networks, by describing the relationship between routers, switches, servers, topology, and addressing.
  • Data and Analysis
    • 3A-DA-09 Translate between different bit representations of real-world phenomena, such as characters, numbers, and images.
    • 3A-DA-10 Evaluate the tradeoffs in how data elements are organized and where data is stored.
    • 3A-DA-11 Create interactive data visualizations using software tools to help others better understand real-world phenomena.
    • 3A-DA-12 Create computational models that represent the relationships among different elements of data collected from a phenomenon or process.
  • Algorithms and Programming
    • 3A-AP-13 Create prototypes that use algorithms to solve computational problems by leveraging prior student knowledge and personal interests.
    • 3A-AP-14 Use lists to simplify solutions, generalizing computational problems instead of repeatedly using simple variables.
    • 3A-AP-17 Decompose problems into smaller components through systematic analysis, using constructs such as procedures, modules, and/or objects.
AP Computer Science Principles Standards
  • Models and Simulations
    • EK2.3.1A Models and simulations are simplified representations of more complex objects or phenomena.
  • Information Processing
    • EK3.1.1B Digital information can be filtered and cleaned by using computers to process information.
    • EK3.1.1D Insight and knowledge can be obtained from translating and transforming digitally represented information.
    • EK3.1.1E Patterns can emerge when data is transformed using computational tools.
    • EK3.1.3C Summaries of data analyzed computationally can be effective in communicating insight and knowledge gained from digitally represented information.
  • Data used for Discovery
    • EK3.2.1B Large data sets provide opportunities for identifying trends, making connections in data, and solving problems.
    • EK3.2.1E Information filtering systems are important tools for finding information and recognizing patterns in information.
    • EK3.2.1G Metadata is data about data.
    • EK3.2.1H Metadata can be descriptive data about an image, a Web page, or other complex objects.
    • EK3.2.1I Metadata can increase the effective use of data or data sets by providing additional information about various aspects of that data.
    • EK3.2.2B The storing, processing, and curating of large data sets is challenging.
COSMOS concepts to be used for the lab Networking layers, IP addresses and packets, data transfer rate.
K12 Educational Goals (How the educational goals are achieved through teaching using the experiment, how the topic is connected to the COSMOS concepts used) The experiment uses networking traffic as a data set to further explore how data can be stored (low level hex vs high level JSON), analyzed via statistical algorithms (sum,min,max,average, percent total), converted to appropriate data storage/transfer units (bytes vs bps), and then visualized in a web interface (p5), by using simple shapes and colors within a coordinate system. Students learn about the different layers of a network from their data sets and can run their own networking experiments if desired.
Short Description and Walk-through of the experiment Data Structure
  1. Export Wireshark packet capture as JSON.
  2. Compare file structure & size:
    1. PCAP: hex, unreadable by humans, small size.
    2. JSON: text, easily readable, large file size
  3. JavaScript activities (web console/p5):
    1. Parse JSON array of packets:
      1. Dot (.) vs brackets [“”]
    2. Print layers of each packet:
      1. Ex: [frame eth ip]
    3. Print one piece of data/layer/packet:
      1. Frame: length (overall size).
      2. Ethernet: src/dst mac address.
      3. IP: src/dst IP address.
      4. TCP/UDP: src/dst port number.
Testbed mapping of the experiment Data sets (pcap files) used in experiment can be captured from any node running wireshark (tshark in terminal) and then analyzed and visualized. This in turn may help further the understanding of other networking experiments run on the testbed.

Experiment Execution


Experiment Material

NGSS Lesson Plan
Teacher's Demo
Student's Demo

© 2018 COSMOS Project. Created by Joel Bianchi, Frederick Douglas Academy I
Andrew Rose, Trinity School.