sc.conf(5)
| SC.CONF(5) | SC.CONF(5) |
NAME
sc.conf - configuration file for sc(8).
DESCRIPTION
The sc.conf is parsed using "AppConfig" module and has a simple "variable = value" form. Expansion for internal and environment variables is enabled (see AppConfig(3) for details). The file may contain extra tabs and newlines for formatting. Comments begin with the # character and end at the end of line, like in shell or Perl scripts.
OPTIONS
- tc
- Location of tc(8) executable.
- out_if, in_if
- Names of the interfaces that will be used for shaping of output and input traffic, respectively. Possible values: interface name or "disable" keyword, which disables rule generation.
- limit_method
- Rate limiting method. The hybrid method uses shaping for download
and policing for upload, and all the rules are created on the in_if
interface. This is suitable, when NAT is performed on the outbound
interface.
Possible values: shaping, policing, hybrid.
Default value: shaping.
- debug
- Debug modes.
Possible values:
- 0
- no debug (default value),
- 1
- print command lines with nonzero return values,
- 2
- print all command lines without execution.
Default value: 0.
- verbose
- When enabled, turns on verbose messages and disables piping of
tc(8) rules.
Possible values:
- 0
- no verbose messages (default)
- 1
- enable verbose messages (i.e. for results of `sync' command)
- 2
- disable batch loading of rules for tc(8)
- 3
- do 1 + 2
Default value: 0.
- quiet
- Suppress output. Does not affect messages caused by
"verbose" flag.
Possible values: boolean.
Default value: 0.
- colored
- Colorize output using ANSI escape sequences. Autodetection of non-tty
handles is supported.
Possible values: boolean.
Default value: 1.
- joint
- Perform add, change and delete operations on rules and database with a single command.
- network
- This variable contains the list of networks for classid calculation. These
networks must cover all IPs which you are going to use in shaping rules.
Possible values: a list of networks with masks from 16 to 31.
Total number of hosts in the specified networks should not exceed the maximum number of child classes: 65533 (from 2 to fffd, because fffe is reserved for default class, and ffff is for ingress policer).
Default value: 10.0.0.0/16.
- filter_network
- Network list for hashing filters generation. To improve the classification
performance you may specify here a summarized network just like in case of
supernetting (route aggregation). For example, if you have the following
networks
network = 10.0.0.0/20 10.0.253.0/24 10.0.254.0/24you should specify a single 10.0.0.0/16 network to classify traffic by a single hashing filter
filter_network = 10.0.0.0/16Possible values: a list of networks with mask from 16 to 31, that includes the networks specified in network parameter.
Default value: same as network parameter.
- default_policy
- Default traffic policy for shaper.
Possible values: block-all, block or pass.
block-all = block all traffic including shaper itself
block = block all IP's, except for shaper's interfaces (default)
pass = allow all trafficDefault value: block.
- bypass_int
- List of internal networks and IPs, whose traffic is transmitted without
shaping.
Possible values: space-separated list of networks with masks from 16 to 32.
Default value: empty.
- bypass_ext
- List of external networks and IPs, whose traffic is transmitted without
shaping.
Possible values: space-separated list of networks with masks from 16 to 32.
Default value: empty.
- policer_burst_ratio
- Ratio between the size of policer buffer size and bandwidth rate.
Possible values: floating-point number.
Default value: 0.2.
- quantum
- Amount of bytes a stream is allowed to dequeue before the next queue gets
a turn.
Possible values: integer numbers >= MTU of the interface.
Default value: 1500.
- rate_unit
- Default rate unit.
Possible values: see sc(8) or tc(8) manpage for list of units.
Default value: kibit.
- rate_ratio
- Ratio between bandwidth rates in rules and in the database.
rule_rate = db_rate * rate_ratioThis coefficient is used only for load and sync commands.
Possible values: floating-point number.
Default value: 1.0.
- root_qdisc
- Root queueing discipline.
Possible values: htb or hfsc.
Default value: htb.
- leaf_qdisc
- Leaf queueing discipline with parameters. This string will be used as a
tail of corresponding "tc qdisc ..."
command line.
Possible values: all classless qdiscs supported by tc(8).
Default value: pfifo limit 100.
- db_host
- Database host.
Possible values: IP-address or domain name.
Default value: 127.0.0.1.
- db_driver
- Database driver.
Possible values: all database drivers supported by Perl DBI module. See output of "sc help" command for the list of available drivers.
Default value: SQLite.
- db_user
- Username to use when connecting to database.
Possible values: depends on database server.
Default value: user.
- db_pass
- The password to use when connecting to database. Remember that specifying
a password on the command line is insecure.
Possible values: arbitrary string.
Default value: password.
- db_name
- Database name to use.
Possible values: arbibrary string (should be a valid filename in case of SQLite driver).
Default value: sc.db.
- Database queries
- create
- Create table with "ip" and "rate" columns.
- load
- Select all data from table.
- list
- Select data for one IP.
- add
- add a new entry.
- del
- delete an existing entry.
- change
- modify an existing entry.
- Syslog options
- enable
- Output errors and warnings to syslog.
Possible values: boolean.
Default value: 1.
- options
- Possible values (comma-separated):
- ndelay
- open the connection immediately
- nofatal
- just emit warnings instead of dying if the connection to syslog can't be established
- perror
- write the message to standard error output as well to the syslog
- pid
- include PID with each message
Default value: <empty string>.
- facility
- Possible values: see Sys::Syslog(3), section
"Facilities".
Default value: user.
SEE ALSO
sc(8), tc(8), tc-htb(8), tc-hfsc(8), tc-u32(8), tc-pfifo(8), AppConfig(3), Sys::Syslog(3). http://lartc.org/howto/lartc.adv-filter.hashing.html, http://ace-host.stuart.id.au/russell/files/tc/doc/cls_u32.txt.
AUTHOR
Stanislav Kruchinin <stanislav.kruchinin@gmail.com>
| 2017-07-21 |
