Niestety nie działa. Przy 4 poleceniu wywala błąd:Aby uzyskać pod Linuksem przycinanie ruchu wyjściowego do 58kB/s między 7:55 a 0:05 należy wykonać następujące polecenia:Ewentualnie, gdy brakuje targetu CLASSIFY dla iptables, ostatnią linijkę można zastąpić:Kod: Zaznacz cały
tc qdisc del root dev eth0 2>/dev/null tc qdisc add dev eth0 root handle 1: htb tc class add dev eth0 parent 1: classid 1:42 htb rate 1Gbit burst 1mbit tc class add dev eth0 parent 1:42 classid 1:2 htb rate 58kbps burst 6kbps iptables -t mangle -A OUTPUT -d ! 153.19.0.0/16 -m time --timestart 7:55 --timestop 0:05 -j CLASSIFY 1:2
Kod: Zaznacz cały
iptables -t mangle -A OUTPUT -d ! 153.19.0.0/16 -m time --timestart 7:55 --timestop 0:05 -j MARK 69 tc filter add dev eth0 protocol ip parent 1: handle 69 fw classid 1:2
Kod: Zaznacz cały
#tc class add dev eth0 parent 1:42 classid 1:2 htb rate 58kbps burst 6kbps
Illegal "buffer"
Usage: ... qdisc add ... htb [default N] [r2q N]
default minor id of class to which unclassified packets are sent {0}
r2q DRR quantums are computed as rate in Bps/r2q {10}
debug string of 16 numbers each 0-3 {0}
... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
[prio P] [slot S] [pslot PS]
[ceil R2] [cburst B2] [mtu MTU] [quantum Q]
rate rate allocated to this class (class can still borrow)
burst max bytes burst which can be accumulated during idle period {computed}
mpu minimum packet size used in rate computations
overhead per-packet size overhead used in rate computations
linklay adapting to a linklayer e.g. atm
ceil definite upper class rate (no borrows) {rate}
cburst burst but for ceil {computed}
mtu max packet size we create rate map for {1600}
prio priority of leaf; lower are served first {0}
quantum how much bytes to serve from leaf at once {use r2q}
TC HTB version 3.3