一般的路由都有按IP进行流量统计,但是openwrt似乎没有自带的按ip进行流量统计插件,只有按interface进行统计的插件,不是特别方便。在查阅一些资料后,发现一个软件叫做bandwithd,可以实现这个功能。

opkg update
opkg install bandwidthd

复制代码

/etc/init.d/bandwidthd enable
/etc/init.d/bandwidthd start
复制代码
然后通过:
就可以看到各内网ip的流量,页面自动刷新的。

注意,如果路由ip不是192.168.1.0/24网段,需要修改/etc/config/bandwidthd。

我的ip 为10.1.1.0网段

config bandwidthd
option dev br-lan
option subnets "10.1.1.0/24"
option skip_intervals 0
option graph_cutoff 1024
option promiscuous true
option output_cdf false
option recover_cdf false
option filter ip
option graph true
option meta_refresh 150

http://IP地址/bandwidthd/index.html