OpenWRT - Display bandwidth of individual devices (monitor)

Diese Seite gibt es auch in Deutsch

Most routers show an overview of all connected devices, some show a snapshot of the bandwidth used, but hardly any give an overview of the amount of data consumed over a certain period of time and certainly not by which device it was consumed. To make the consumed bandwidth a bit more transparent, I was looking for a way to historically record the bandwidth per device. The firmware of normal routers hardly offer a possibility here, differently when using an open source firmware, for example OpenWRT, see: Alternative Router Firmware: OpenWrt and no longer DD-WRT.

OpenWRT

OpenWRT is OpenSource software and can be customized as desired, whereby numerous supporters have published various extensions. Practically, however, I have not been able to find a perfect package for bandwidth monitoring for the LEDE web interface:  The available software packages for OpenWRT do not always integrate with its web interface and feel a bit outdated. Nevertheless, the extensions presented here provide a good overview of the consumed bandwidth:

bandwidthd

bandwidthd can easily be activated in OpenWRT's packages and provides an overview for daily, weekly, monthly and yearly traffic, as well as charts for total consumption and for each individual device.

To activate the package in OpenWRT, go to "System", "Software", "Update lists ..." and then search for bandwidthd and install it:

The statistics can then be accessed outside the router's web interface using the router's IP and /bandwidthd, e.g.: http://192.168.0.1/bandwidthd

 

To swap the data to an SD card, the configuration can be adjusted as follows:

 vi /etc/config/bandwidthd-opkg
config bandwidthd
...
        option sqlite_filename  "/mnt/sda1/bandwidthd/stats.db"
...

Netlink Bandwidth Monitor

Netlink Bandwidth Monitor shows the data distribution of individual devices per month. The installation is easily done via the package management: luci-app-nlbwmon.

If a mounted USB stick is selected, the data can be stored permanently on it:

Yet Another Monior (YAMon)

YAMon is not directly available through the OpenWRT packages: A bash script is provided for installation. To store the statistic data I used a USB stick at the router on which I also put the installation script in advance: yamon???install.sh, see usage-monitoring.com/. The terrible homepage of the manufacturer was quite deterring for me in the beginning, the software itself also seems extremely old, but is not that bad and still offers a lot of statistics. The installation is then done by connecting via ssh to the router, as a prerequisite I also installed the packages for accessing the USB stick and mounted it:

opkg update && opkg install block-mount e2fsprogs kmod-fs-ext4 kmod-usb3 kmod-usb2 kmod-usb-storage darkstat
block detect > /etc/config/fstab 
uci set fstab.@mount[0].enabled='1' && uci set fstab.@global[0].check_fs='1' && uci commit 
/sbin/block mount

cd /mnt/sda1
./yamon347install.sh

The call is then made via the router IP/yamon, e.g.: http://192.168.0.1/yamon

YAMon offers much more information, but in my opinion it is a bit more confusing than e.g. Bandwidthd.

Devices show up multiple times: random MAC address?

Mobile devices have an option for a random MAC address, which causes them to report with different MAC addresses and makes it more difficult to assign access. The option can be disabled in the WLAN settings of the individual devices by activating the "Phone MAC" setting:

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Updated: 2022-10-19 von Bernhard 🔔


Top articles in this section


Ping with Port | cmd vs. PowerShell: Test-Netconnection
As is well known, the tool ping can be used to test the access to a certain network device and its response time. Not all devices will respond to a ping, but they may respond to a particular Tcp-Port if a particular network service is provided through it. Windows PowerShell allows you to test a specific port using Windows board tools. The psping tool can also measure the response time to a specific port.

OpenWRT hardware recommendation - available devices 2022
OpenWRT provides a uniform and up-to-date software for different network devices like routers or access points and delivers countless additional setting options, software packages and functions. This makes it possible to combine new and old devices from different manufacturers and, among other things, to use low-cost hardware in a common WiFi, see: Setting up a home network: Extending LAN and WLAN | Improving.

List all IP addresses in the network even if the firewall is enabled
If you want to get a quick overview of all active devices in a network, you can do this with network discovery, commands in the command prompt, in PowerShell or with special IP scanners. The PowerShell commands presented at the beginning of this post give a quick overview of all devices on the local network and may make special programs for scanning the network unnecessary. If you would like to see the commands in action, you can do so in my YouTube video. For expanding your own network, see als...

Questions / Comments


By continuing to browse the site, you agree to our use of cookies. More Details