1
2
|
#tc qdisc [add|change|replace|link] dev DEV [parent qdisk-id|
root][handle qdisc-
id
] qdisc[qdisc specific parameters]
|
#tc qdisc add dev eth0 root handle 1:htb default 11
1
2
|
#tc class [add|change|replace] dev DEV parent qdisc-id
[classid class-
id
] qdisc [qdisc specific parameters]
|
1
|
#tc class add dev eth0 parent 1: classid 1:1 htb rate 40mbit ceil 40mbit #tc class add dev eth0 parent 1: classid 1:12 htb rate 40mbit ceil 40mbit #tc class add dev eth0 parent 1: cllassid 1:13 htb rate 20mbit ceil 20mbit
|
1
2
3
|
#tc filter [add|change|replace] dev DEV [parent qdisc-id
|root] protocol protocol prio priority filtertype [filtertype
specific parameters] flowid flow-
id
|
1
|
#tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:11 #tc filter add dev eth0 prtocol ip parent 1:0 prio 1 u32 match ip dport 25 0xffff flowid 1:12 #tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 23 oxffff flowid 1:13
|
1
|
|
1
2
3
4
5
6
7
8
|
#tc qdisc add dev eth0 root handle 1: htb default 21
#tc class add dev eth0 partent 1: classid 1:1 htb rate 20mbit ceil 20mbit
#tc class add dev eth0 parent 1: classid 1:2 htb rate 80mbit ceil 80mbit
#tc class add dev eth0 parent 1: classid 1:21 htb rate 40mbit ceil 20mbit
#tc class add dev eth0 parent 1:2 classid 1:22 htb rate 40mbit ceil 80mbit
#tc filter add dev eth0 protocol parent 10 prio 1 u32 match ip dport 80 0xffff flowid 1:21
#tc filter add dev eth0 protocol parent 1:0 prio 1 u32 match ip dport 25 0xffff flowid 1:22
#tc filter add dev eth0 protocol parent 1:0 prio 1 u32 match ip dport 23 0xffff flowid 1:1
|
1
2
|
#tc qdisc [add|change|replace|link] dev DEV [parent qdisk-id|
root][handle qdisc-
id
] qdisc[qdisc specific parameters]
|
#tc qdisc add dev eth0 root handle 1:htb default 11
1
2
|
#tc class [add|change|replace] dev DEV parent qdisc-id
[classid class-
id
] qdisc [qdisc specific parameters]
|
1
|
#tc class add dev eth0 parent 1: classid 1:1 htb rate 40mbit ceil 40mbit #tc class add dev eth0 parent 1: classid 1:12 htb rate 40mbit ceil 40mbit #tc class add dev eth0 parent 1: cllassid 1:13 htb rate 20mbit ceil 20mbit
|
1
2
3
|
#tc filter [add|change|replace] dev DEV [parent qdisc-id
|root] protocol protocol prio priority filtertype [filtertype
specific parameters] flowid flow-
id
|
1
|
#tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:11 #tc filter add dev eth0 prtocol ip parent 1:0 prio 1 u32 match ip dport 25 0xffff flowid 1:12 #tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 23 oxffff flowid 1:13
|
1
|
|
1
2
3
4
5
6
7
8
|
#tc qdisc add dev eth0 root handle 1: htb default 21
#tc class add dev eth0 partent 1: classid 1:1 htb rate 20mbit ceil 20mbit
#tc class add dev eth0 parent 1: classid 1:2 htb rate 80mbit ceil 80mbit
#tc class add dev eth0 parent 1: classid 1:21 htb rate 40mbit ceil 20mbit
#tc class add dev eth0 parent 1:2 classid 1:22 htb rate 40mbit ceil 80mbit
#tc filter add dev eth0 protocol parent 10 prio 1 u32 match ip dport 80 0xffff flowid 1:21
#tc filter add dev eth0 protocol parent 1:0 prio 1 u32 match ip dport 25 0xffff flowid 1:22
#tc filter add dev eth0 protocol parent 1:0 prio 1 u32 match ip dport 23 0xffff flowid 1:1
|