Penguin
Note: You are viewing an old revision of this page. View the current version.

This is a brief but concerted effort to minimise the effect of TCP traffic on interactive applications, using QoS under linux.

The major motivating factor behind this work was the effect the new queuing imposed before the bandwidth throttling at the RAN, on Telecom's network in early 2004.

I live in a flat where we pay 3rds of the cost of the internet bill, so between three people, they each should have an even crack at the bandwidth.

I devised two queuing structures that should give a decent balance between users, one for egress on the internal interface and one for egress on the external interface.

Egress on internal interface (eth0).

Root Class (PRIO) Handle 1:


| Class 1:1: PRIO Queue priority 1 | | CBQ Qdisc 128kbit Handle 10: | | ------------------------------------------ | | | Class 10:1(CBQ Class, 128kbit) | | | | Qdisc SFQ Handle 101: | | | | -------------------------------------- | | | | | High Priority Per-User Queue | | | | | | For interactive applications | | | | | | and ICMP etc. | | | | | -------------------------------------- | | | | Class 10:2(CBQ Class, 128kbit) | | | | Qdisc SFQ Handle 102: | | | | -------------------------------------- | | | | | High Priority Per-User Queue | | | | | | For interactive applications | | | | | | and ICMP etc. | | | | | -------------------------------------- | | | | Class 10:x(CBQ Class, 128kbit) | | | | Qdisc SFQ Handle 10x: | | | | -------------------------------------- | | | | | High Priority Per-User Queue | | | | | | For interactive applications | | | | | | and ICMP etc. | | | | | -------------------------------------- | | | | Class 10:5(CBQ Class, 120kbit) | | | | Qdisc 105: TBQ (Rate 96kbit) | | | | -------------------------------------- | | | | | Low Priority Per-User Queue | | |

Routing -> | | | For TCP and other non-interactive | | | -> Network card

| | | applications. | | | | | -------------------------------------- | | | | Class 10:6(CBQ Class, 120kbit) | | | | Qdisc 106: TBQ (Rate 96kbit) | | | | -------------------------------------- | | | | | Low Priority Per-User Queue | | | | | | For TCP and other non-interactive | | | | | | applications. | | | | | -------------------------------------- | | | | Class 10:x(CBQ Class, 120kbit) | | | | Qdisc 10x: TBQ (Rate 96kbit) | | | | -------------------------------------- | | | | | Low Priority Per-User Queue | | | | | | For TCP and other non-interactive | | | | | | applications. | | | | | -------------------------------------- | | | ------------------------------------------ | | Class 1:2 (PRIO band priority 2) | | Qdisc 20: SFQ | | ------------------------------------------ | | | Bypass Queue for internal | | | | Traffic | | | ------------------------------------------ | | |


Egress on external interface (ppp0).

Root Class (PRIO) Handle 1:


| Class 1:1: PRIO Queue priority 1 | | CBQ Qdisc 128kbit Handle 10: | | ------------------------------------------ | | | Class 10:1(CBQ Class, 128kbit) | | | | Qdisc SFQ Handle 101: | | | | -------------------------------------- | | | | | High Priority Per-User Queue | | | | | | For interactive applications | | | | | | and ICMP etc. | | | | | -------------------------------------- | | | | Class 10:2(CBQ Class, 128kbit) | | | | Qdisc SFQ Handle 102: | | | | -------------------------------------- | | | | | High Priority Per-User Queue | | | | | | For interactive applications | | | | | | and ICMP etc. | | | | | -------------------------------------- | | | | Class 10:x(CBQ Class, 128kbit) | | | | Qdisc SFQ Handle 10x: | | | | -------------------------------------- | | | | | High Priority Per-User Queue | | | | | | For interactive applications | | | | | | and ICMP etc. | | | | | -------------------------------------- | | | | Class 10:5(CBQ Class, 120kbit) | | | | Qdisc 105: TBQ (Rate 96kbit) | | | | -------------------------------------- | | | | | Low Priority Per-User Queue | | |

Routing -> | | | For TCP and other non-interactive | | | -> Network card

| | | applications. | | | | | -------------------------------------- | | | | Class 10:6(CBQ Class, 120kbit) | | | | Qdisc 106: TBQ (Rate 96kbit) | | | | -------------------------------------- | | | | | Low Priority Per-User Queue | | | | | | For TCP and other non-interactive | | | | | | applications. | | | | | -------------------------------------- | | | | Class 10:x(CBQ Class, 120kbit) | | | | Qdisc 10x: TBQ (Rate 96kbit) | | | | -------------------------------------- | | | | | Low Priority Per-User Queue | | | | | | For TCP and other non-interactive | | | | | | applications. | | | | | -------------------------------------- | | | ------------------------------------------ | | Class 1:2 (PRIO band priority 2) | | Qdisc 20: SFQ | | ------------------------------------------ | | | Bypass Queue for internal | | | | Traffic | | | ------------------------------------------ | | |