Wireshark is the world’s foremost network protocol analyzer. It lets you see what’s happening on your network at a microscopic level. It is the de facto (and often de jure) standard across many industries and educational institutions.
First, we install Wireshark from the terminal.
sudo apt–get install wireshark
Type wireshark from terminal.
Start capture by looking at Capture Tab and interfaces
Export data as a csv
Import file in R to analyze