mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 23:48:39 +01:00
nft-qos: support mac address based speed limit
This patch makes it possible to configure and limit per-client internet
speed based on MAC address and it can work with SQM.
This feature is what OpenWRT currently lacks. This patch is largely based
on static.sh and the configuration file is similar to original nft-qos.
New configuration options and examples are listed below
config default 'default'
option limit_mac_enable '1'
config client
option drunit 'kbytes'
option urunit 'kbytes'
option hostname 'tv-box'
option macaddr 'AB:CD:EF:01:23:45'
option drate '1000'
option urate '50'
config client
option drunit 'kbytes'
option urunit 'kbytes'
option hostname 'my-pc'
option macaddr 'AB:CD:EF:01:23:46'
option drate '3000'
option urate '2000'
limit_mac_enable - enable rate limit based on MAC address
drunit - download rate unit
urunit - upload rate unit
macaddr - client MAC address
drate - download rate
urate - upload rate
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
This commit is contained in:
@@ -51,6 +51,9 @@ config default default
|
||||
# list limit_whitelist '192.168.1.0/24'
|
||||
# list limit_whitelist 'ABCD:CDEF::1/64'
|
||||
|
||||
# Option for Mac address based traffic control
|
||||
option limit_mac_enable '0'
|
||||
|
||||
# Options for Traffic Priority
|
||||
option priority_enable '0'
|
||||
option priority_netdev 'lan'
|
||||
@@ -73,6 +76,15 @@ config default default
|
||||
# option ipaddr 'ABCD:FFED::1/64'
|
||||
# option rate '1024'
|
||||
#
|
||||
# For MAC address based traffic control Samples :
|
||||
#
|
||||
#config client
|
||||
# option drunit 'kbytes'
|
||||
# option urunit 'kbytes'
|
||||
# option hostname 'tvbox'
|
||||
# option macaddr '00:00:00:00:00:00'
|
||||
# option drate '300'
|
||||
# option urate '30'
|
||||
#
|
||||
# Traffic Priority Samples :
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user