Quick Start

This tutorial takes you from freshly installed packages to a working traffic dashboard, a persisted traffic history, a first scheduled rate limit and a daily quota. It assumes both bandix and luci-app-bandix are installed (see Installation) and that hardware flow offloading is disabled.

1. Open the Settings Page

Log in to LuCI and open Network → Bandix → Settings. The page has four sections: Basic Settings, Traffic Monitor Settings, Connection Monitor Settings and DNS Monitor Settings. If a section does not exist in /etc/config/bandix yet, the page creates it in memory so the form can be shown; it is written when you save.

2. Choose the Interface to Monitor

In Basic Settings, set Monitor Interface to the interface that carries your LAN clients. On a typical OpenWrt router this is the bridge br-lan. The selector is LuCI's standard device picker: bridges are allowed, aliases are hidden, and you cannot type a new device name.

Leave the other basic settings at their defaults for now:

Setting Default
Listen Address 127.0.0.1
Port 8686
Log Level info
Data Directory /usr/share/bandix
TC backend auto

3. Enable Traffic Monitoring

In Traffic Monitor Settings, tick Enable Traffic Monitoring. While you are there:

  • set Speed Units to Bytes Units (B/s, KiB/s, MiB/s) or Bits Units (bps, kbps, Mbps), whichever you prefer;
  • tick Persist History Data if you want long-term statistics to survive reboots, and keep the Data Flush Interval at 10 minutes.

Click Save & Apply. LuCI commits the bandix configuration and the backend is reloaded through its init script.

The equivalent shell commands are:

uci set bandix.general.iface='br-lan'
uci set bandix.traffic.enabled='1'
uci set bandix.traffic.traffic_enable_storage='1'
uci commit bandix
/etc/init.d/bandix restart

4. Watch the Status Page

Open Network → Bandix → Status. You should see:

  • the title Bandix Traffic Monitor with the installed versions of both packages and, if a newer release exists on GitHub, an Update available badge;
  • a notice that rate limiting only applies to WAN traffic, next to an Online Devices: online / total counter;
  • three summary cards for LAN Traffic, WAN Traffic and Total;
  • the Realtime Traffic Trends chart, drawing one point per second;
  • the Device List, with each device's name, IPv4 address, MAC address, LAN and WAN speeds and totals.

Generate some traffic on a client (start a download or a video) and its WAN download speed should rise within a second. The list refreshes every second.

If the list stays empty, see Troubleshooting.

5. Give a Device a Friendly Name

Devices without a DHCP hostname appear only by IP address. Click Settings on the device's row, type a name into the hostname field and save. The name is stored by the backend as a hostname binding for that MAC address and appears in the list on the next refresh. See Devices and Hostnames.

6. Add a Scheduled Rate Limit

In the same Settings dialog, on the rate-limit tab:

  1. Click Add Rule.
  2. Set the time slot, for example 20:00 to 23:59.
  3. Leave the days you want selected (all seven days are selected by default).
  4. Enter an upload limit and a download limit, for example 2 MiB/s down and 512 KiB/s up. 0 means unlimited.
  5. Click Add.

The rule is now listed in the dialog, and while it is active the device's row shows the effective limit in the Rules / Quota column. Rate limits only apply to WAN traffic. More options, including a global default limit, are described in Rate Limits.

7. Set a Daily Quota

Switch to the quota tab of the device dialog:

  1. Leave Quota mode on Combined quota.
  2. Enter 5 in the Daily field and choose GiB as the unit.
  3. Click Save Quota.

From now on the device's WAN upload plus download is counted against a 5 GiB daily allowance. When it is used up, the device's WAN traffic is blocked until the period resets, and its row is marked as blocked. See Traffic Quotas.

8. Optional: Enable Connection and DNS Monitoring

Back on the Settings page:

  • tick Enable Connection Monitoring to fill the Connections tab with per-device TCP/UDP counts and flow lists;
  • tick Enable DNS Monitoring to fill the DNS tab with query logs and statistics.

Click Save & Apply and open the corresponding tabs. Both pages show a "monitoring disabled" notice with a Go to Settings button until the option is enabled.

9. Check Traffic Statistics

Scroll down the Status page to Traffic Statistics. Click Today to see the Device Usage Ranking (top 10 devices by traffic) and the Traffic Timeline. Ranking and timeline are queried on demand and do not refresh automatically. Long-term statistics are only meaningful after the backend has collected data for a while.

What You Have Now

  • live per-device traffic for your LAN,
  • history that survives reboots (if you enabled persistence),
  • a named device with an evening speed limit and a daily data allowance.

Next Steps