/* * * An attempt to replicate the configuration of the traffic control on * diglossia * */ #include "fields.tc" #include "ports.tc" #define OUTSIDE ppp0 #define INSIDE eth0 dev OUTSIDE { egress { /* all of our classification happens here */ class ( <$interactive> ) if tcp_dport == 22 && ip_tos_delay == 1 ; class ( <$audio> ) if tcp_dport == 554 || tcp_dport == 7070 ; class ( <$bulk> ) if tcp_dport == 22 || tcp_dport == 80 ; class ( <$default> ) ; /* all of our queues are added here */ htb () { $interactive = class ( rate 64kbps, ceil 128kbps ) { sfq ( perturb 10s ); } $audio = class ( rate 128kbps, ceil 128kbps ) { sfq ( perturb 10s ); } $bulk = class ( rate 256kbps, ceil 512kbps ) { sfq ( perturb 10s ); } $default = class ( rate 256kbps, ceil 512kbps ) { sfq ( perturb 10s ); } } } } dev INSIDE { /* -- start of device -- */ htb { class ( rate 600kbps, ceil 600kbps ) { class ( rate 64kbps, ceil 128kbps ) \ if tcp_dport == 22 && ip_tos_delay == 1 { /* interactive ssh */ sfq ( perturb 10s ); } class ( rate 128kbps, ceil 128kbps ) \ if tcp_dport == 554 || tcp_dport == 7070 { /* real audio */ sfq ( perturb 10s ); } class ( rate 256kbps, ceil 512kbps ) \ if tcp_dport == 22 || tcp_dport == 80 { /* scp and http */ sfq ( perturb 10s ); } class ( rate 256kbps, ceil 512kbps ) { /* default class */ sfq ( perturb 10s ); } } } } /* -- end of device -- */