Attention: All pages of this wiki depend on the pages that come before it, in order as they are listed on the Main Page. Please check for Dependencies.
Please also look at What You Need to Know Before Using This Wiki

/root/scripts/qos.tc: Difference between revisions

From COCNM
Jump to navigation Jump to search
m (1 revision)
 
(No difference)

Latest revision as of 01:19, 19 September 2013

#include <ports.tc>
#include <fields.tc>

#define INTERFACE0 eth0
#define INTERFACE2 eth2

dev eth0 {
        egress {
                class( <$pubaccess> )
                        if ip_src == 192.168.27.0/24
                ;
                class( <$serverdonthog> )
                        if ip_src == 192.168.26.10
                ;
                class( <$fullspeed> )
                        if 1
                ;
                htb () {
                        class ( rate 700 kbps, ceil 768 kbps ) {
                                $pubaccess      = class ( rate 30 kbps, ceil 112 kbps ) { sfq; } ;
                                $serverdonthog  = class ( rate 30 kbps, ceil 500 kbps ) { fifo; } ;
                                $fullspeed      = class ( rate 30 kbps, ceil 768 kbps ) { sfq; } ;
                        }
                }
        }
}
dev eth2 {
        egress {
                class( <$pubaccess> )
                        if ip_dst == 192.168.27.0/24
                ;
                class( <$fullspeed> )
                        if 1
                ;
                htb () {
                        class ( rate 5000 kbps, ceil 16000 kbps ) {
                                $pubaccess      = class ( rate 56 kbps, ceil 112 kbps ) { sfq; } ;
                                $fullspeed      = class ( rate 5000 kbps, ceil 16000 kbps ) { sfq; } ;
                        }
                }
        }
}