#!/bin/sh
cd ${0%${0##*/}}.
. ./conf.sh

#clear all rules
/sbin/tc qdisc del dev $MANAD_INTERFACE_IN  root 2> /dev/null
/sbin/tc qdisc del dev $MANAD_INTERFACE_OUT  root 2> /dev/null

#root
/sbin/tc qdisc add dev $MANAD_INTERFACE_IN root handle 1: htb default ffff r2q 1
/sbin/tc qdisc add dev $MANAD_INTERFACE_OUT root handle 1: htb default ffff r2q 1


#default 
/sbin/tc class add dev $MANAD_INTERFACE_IN  parent 1:0 classid 1:ffff htb rate 100mbit burst 4k prio 3
/sbin/tc qdisc add dev $MANAD_INTERFACE_IN parent 1:ffff handle ffff: sfq perturb 10 quantum 1500

/sbin/tc class add dev $MANAD_INTERFACE_OUT  parent 1:0 classid 1:ffff htb rate 100mbit burst 4k prio 3
/sbin/tc qdisc add dev $MANAD_INTERFACE_OUT parent 1:ffff handle ffff: sfq perturb 10 quantum 1500

 