#! /bin/tcsh

#sudo insmod sch_dsmark.o
#sudo insmod sch_gred.o

echo "\n>> install rio queue on interface eth0 ..."
echo "\nqdisc info: -- before install"
echo "-------------------------------"
tc qdisc show

sudo tc qdisc add dev eth0 handle 1:0 root dsmark indices 64 set_tc_index
sudo tc qdisc add dev eth0 parent 1:0 handle 2:0 gred setup DPs 2 default 2 grio

sudo tc qdisc change dev eth0 parent 1:0 handle 2:0 gred limit 250K min 50K max 240K avpkt 500 bandwidth 10Mbit burst 300 probability 0.002 DP 1 prio 1
sudo tc qdisc change dev eth0 parent 1:0 handle 2:0 gred limit 220K min 30K max 220K avpkt 500 bandwidth 10Mbit burst 200 probability 0.100 DP 2 prio 2

echo "\nqdisc info: -- after install"
echo "-------------------------------"
tc qdisc show
echo "\n"
