May 2018 - April 2020

Internet network traffic visualization

Todo List Mobile App Redesign

Introduction

The night after my Network Security exam, my mind was still processing all the interesting stuff that I had just learned. While some people dream about winning the lottery or marrying the love of their life, I was dreaming about SYN flood attacks and the OSI model. At some point, I dreamt about visualizing the different protocols using LEDs, so that you can 'see' your internet traffic. When I woke up, I realized that this was actually a really cool idea, especially if it's done using LED strips. Before I knew it, I found myself ordering all the necessary parts on Aliexpress to create a real-life version of this project. On this page, I will provide more details about this hobby project.

Idea

The image below illustrates the basic concept of this project.

In this image, we can identify the following elements:

  • A computer (located on the left)
  • Two LED strips linked to this computer
  • A WiFi router, connected to the computer via an ethernet cable
  • A person using a separate computer connected to this router via WiFi. We will call her Sarah.

General idea

When Sarah accesses a website from her computer, it initiates both 'outgoing' network traffic to request the website and 'incoming' network traffic containing the requested data. Imagine these data streams as a flow of network 'packets' traversing the room in two directions: from her computer to the router and back. To represent these packets visually on the LED strips, we illuminate a specific set of colored LEDs for each packet. By shifting these LED groups in two directions, we create a simulation of the packets in motion.

How it works

In the illustration, you'll find two LED strips. The upper LED strip represents the simulation of Sarah's outgoing network traffic, while the lower one symbolizes her incoming traffic. Here's how we visualize her traffic on both LED strips.

  • Outgoing Traffic:
    1. Sarah initiates a website request, generating corresponding network traffic.
    2. Her computer transmits this traffic to the router.
    3. The router forwards the traffic to the computer on the left.
    4. The left computer logs all incoming packets and translates them into instructions for illuminating a group of LEDs on the upper LED strip. On this upper LED strip, a cluster of LEDs appears on the right, emulating a packet. By shifting this cluster to the left, we create the illusion of the packet departing from Sarah's computer and heading roughly in the direction of the router.
    5. This single moving packet to the left does of course not represent all of her outgoing traffic. Instead, for each packet a set of LEDs is added to the LED strip. These multiple sets of LEDs in motion collectively simulate her outgoing network traffic stream.

  • Incoming Traffic:
    1. As a response to the earlier outgoing traffic, the router receives incoming traffic from the internet.
    2. This incoming traffic is then directed to the computer on the left, which translates the incoming packets into sets of LEDs.
    3. These LED groups are sequentially added to the left side of the lower LED strip.
    4. These LED clusters move to the right, mimicking incoming traffic directed towards Sarah.
    5. In addition to this, the router also forwards the traffic to Sarah's computer to ensure she receives the actual network data.

Combining the two

We've seen how we can visualize outgoing and incoming traffic separately. But here's the fun part: we want to mix these two streams to give Sarah a real-time view of her entire traffic.

Seperate the traffic streams

One thing to note is that our computer on the left is now handling both incoming and outgoing traffic through a single Ethernet cable. To get these streams onto their own LED strips, we need to be able to identify and separate both streams.

Spicing it up

To make things more visually appealing and accurate, we link the number of lit-up LEDs for each packet to its packet's size and determine their colors based on the packet's protocol. This way, it's not just informative; it's also a blast to watch.

Speaking of streamlining, we can swap the big computer on the left with something more compact, like a Raspberry Pi. It's not only low on computing needs but also hides away nicely, uses less power, and keeps things sleek.

Proof of concept

All right, enough chit-chat. Let's see it in action.

Constant data streams

In this short video, you see how the LEDs visualize a constant network traffic stream in both directions. The colored bars that you see flying through the room represent actual packets in the network traffic. Using a remote, I can also pause the LED strips or change the speed of the visualizations.

Pinging

For a fun and easy method to demonstrate that the LEDs effectively represent actual network traffic, try pinging another computer within your network or on the internet. In the picture below, you see that you are sending four packets to ping and you will also receive four packets as a reply from the other computer.

You can spot those four packets in both directions in the video below. Imagine the person or computer that pings to be on the right, while the one being pinged and sending the replies is on the left.

Loading a website

The traffic going from left to right is the outgoing traffic, requesting the website. Next, a longer stream will appear from the right to the left. This is the incoming data containing the website data.

Send and receive Whatsapp messages

As previously explained, the LED strips illuminate when Sarah visits a website on her computer. However, they respond to all internet traffic flowing to and from the router. This means that any device connected to the same router, such as her phone, can also trigger the LED strips.
In the video below, you see what it looks like when Sarah receives a WhatsApp message on her phone.

In this video, you'll notice that the incoming traffic moves from right to left, meaning that Sarah is on the left. It's depicting the WhatsApp message as a series of packets heading in that direction.

What's intriguing is that there's also traffic moving in the opposite direction. Curiously, each received WhatsApp message generates some outgoing traffic. This could be an acknowledgment of the message being received, such that the sender of the message gets to see the two checkmarks next to their message.

Made in Webflow