iproute/iproute2-traffic_control-sysconfig

36 lines
2.4 KiB
Plaintext

#
# tc configuration file
#
# this file is loaded by the tc initscript (/etc/rc.d/init.d/tc) upon start
# note: only tc add commands are allowed here, tc del is done by the tc initscript
# sample configuration
# DOWNSTREAM
#tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100mbit avpkt 1000 cell 8
#tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100mbit rate 2mbit allot 1514 weight 200kbit prio 8 maxburst 20 avpkt 1000 bounded
#tc class add dev eth1 parent 1:1 classid 1:10 cbq bandwidth 100mbit rate 1mbit allot 1514 weight 100kbit prio 8 maxburst 20 avpkt 1000
#tc class add dev eth1 parent 1:1 classid 1:20 cbq bandwidth 100mbit rate 500kbit allot 1514 weight 50kbit prio 8 maxburst 20 avpkt 1000
#tc class add dev eth1 parent 1:1 classid 1:30 cbq bandwidth 100mbit rate 500kbit allot 1514 weight 50kbit prio 8 maxburst 20 avpkt 1000
#tc qdisc add dev eth1 parent 1:10 sfq quantum 1514b perturb 15
#tc qdisc add dev eth1 parent 1:20 sfq quantum 1514b perturb 15
#tc qdisc add dev eth1 parent 1:30 sfq quantum 1514b perturb 15
#tc filter add dev eth1 parent 1:0 protocol ip prio 5 u32 match ip dport 80 0xffff flowid 1:10
#tc filter add dev eth1 parent 1:0 protocol ip prio 5 u32 match ip dport 25 0xffff flowid 1:20
#tc filter add dev eth1 parent 1:0 protocol ip prio 5 u32 match ip protocol 0 0xff flowid 1:30
# UPSTREAM
#tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100mbit avpkt 1000 cell 8
#tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100mbit rate 2mbit allot 1514 weight 200kbit prio 8 maxburst 20 avpkt 1000 bounded
#tc class add dev eth0 parent 1:1 classid 1:10 cbq bandwidth 100mbit rate 1mbit allot 1514 weight 100kbit prio 8 maxburst 20 avpkt 1000
#tc class add dev eth0 parent 1:1 classid 1:20 cbq bandwidth 100mbit rate 500kbit allot 1514 weight 50kbit prio 8 maxburst 20 avpkt 1000
#tc class add dev eth0 parent 1:1 classid 1:30 cbq bandwidth 100mbit rate 500kbit allot 1514 weight 50kbit prio 8 maxburst 20 avpkt 1000
#tc qdisc add dev eth0 parent 1:10 sfq quantum 1514b perturb 15
#tc qdisc add dev eth0 parent 1:20 sfq quantum 1514b perturb 15
#tc qdisc add dev eth0 parent 1:30 sfq quantum 1514b perturb 15
#tc filter add dev eth0 parent 1:0 protocol ip prio 5 u32 match ip sport 80 0xffff flowid 1:10
#tc filter add dev eth0 parent 1:0 protocol ip prio 5 u32 match ip sport 25 0xffff flowid 1:20
#tc filter add dev eth0 parent 1:0 protocol ip prio 5 u32 match ip protocol 0 0xff flowid 1:30