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.
The image below illustrates the basic concept of this project.
In this image, we can identify the following elements:
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.
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.
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 streamsOne 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 upTo 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.
All right, enough chit-chat. Let's see it in action.
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.
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.
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.
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.