Skip to content
Snippets Groups Projects
opentrafficshaper.conf 3.4 KiB
Newer Older
Nigel Kukard's avatar
Nigel Kukard committed
[system]
# Log level:
# 0 - Errors only
# 1 - Warnings and errors
# 2 - Notices, warnings, errors
# 3 - Info, notices, warnings, errors
# 4 - Debugging 
#log_level=2
# Log file:
# Filename to write log messages to
# Defaults to /var/log/opentrafficshaper/opentrafficshaper.log
#log_file=/var/log/opentrafficshaper/opentrafficshaper.log


# PID file:
# Filename to write our PID to
# Defaults to /var/run/opentrafficshaper/opentrafficshaper.pid
#pid_file=/var/run/opentrafficshaper/opentrafficshaper.pid


# STATE file:
# This is the file used to store persistent information
#statefile=/var/lib/opentrafficshaper/configmanager.state
#
# Plugins
#
Nigel Kukard's avatar
Nigel Kukard committed
[plugins]
# Names of plugins to load, one per line
load=radius
Nigel Kukard's avatar
Nigel Kukard committed
load=webserver
Nigel Kukard's avatar
Nigel Kukard committed
load=tc
Nigel Kukard's avatar
Nigel Kukard committed
# Statistics
load=statistics
load=tcstats
# Statistics live streaming snapin
load=webserver/snapins/websockets/statistics
#
# General shaping settings
#
[shaping]
# Group 1 is by default the "Default" group
group=1:Default
# Traffic classes
# ID's and short description of traffic classes to Setup. Traffic is 
# priortized as the lowest number getting the highest priority
Nigel Kukard's avatar
Nigel Kukard committed
#
# The second parameter is the name of the class
#
class=1:High Priority
class=2:Platinum
class=3:Gold
class=4:Silver
class=5:Bronze
class=6:Best Effort


# Default pool
Nigel Kukard's avatar
Nigel Kukard committed
# For traffic not classified, we can send it to a specific traffic class
#
# Defaults to "no"
Nigel Kukard's avatar
Nigel Kukard committed
#default_pool=no


# Interface group
# This is a friendly name for a group of interfaces used for TX & RX
# Its in the format of     txiface,rxiface:Friendly name
# The txiface is always the interface the client traffic is transmitted on (downloaded)
# The rxiface is always the interface the client traffic is received on (uploaded)
interface_group=eth1,eth0:LAN-side


#
# Interface setup
#

[shaping.interface eth0]
# This is the friendly name used when displaying this interface
name=WAN interface
# The rate is specified in Kbps
rate=100000

# Class format is:  ClassID:CIR/Limit
# If Limit is not specified it defaults to CIR
# if the class definition is omitted, defaults to rate of interface
# The CIR and Limit are specified in Kbps or percentage
class_rate=1:10
class_rate=2:5%/5%
class_rate=3:5%
class_rate=4:5/10
class_rate=5:5%
class_rate=6:5%

[shaping.interface eth1]
name=LAN Interface
rate=100000
Nigel Kukard's avatar
Nigel Kukard committed
class_rate=1:10
class_rate=2:5%/5%
class_rate=3:5%
class_rate=4:5/10
class_rate=5:5%
#
# Radius plugin
#
[plugin.radius]
dictionary_path=/etc/opentrafficshaper
# Dictionaries we need to load for radius functionality
dictionary=dicts/dictionary
dictionary=dicts/dictionary.allworldit

# Expire traffic control entries from radius in this period of time if not updated
# Default: 86400     (1 day)
#expiry_period=86400
#
# TC Plugin
#
[plugin.tc]
# Interface used for transmission of traffic to client
txiface=eth1
# Interface used for the receiving of traffic for client
rxiface=eth0

# Rates of both interfaces
# This is in Mbit/s!!
# Defaults to 100 each
txiface_rate=100
rxiface_rate=100
# Protocol to filter on, 99% of the time it will be "ip"
# If however you're filtering VLAN Q-in-Q traffic, set this to 0x88a8
#protocol=ip

# IP Header offset
# If the kernel offsets your IP packet with octets you need to specify the value here
# this most commonly happens when you shaping vlan traffic (as per above one would maybe
# set this value to 4)
#iphdr_offset=0

#
# Statistics Plugin
#
[plugin.statistics]
#db_dsn=dbi:SQLite:dbname=stats.sqlite3
#db_username=
#db_password=