9
在Linux上使用流量整形(tc),嘗試將吞吐量限制在2個級別。tc類ceil繼承
1:20類從1:10繼承,但交通限制不適用。流量正在使用最後一堂課的限制進行限制。
class htb 1:1 root rate 1Gbit ceil 1Gbit burst 15125b cburst 1375b
class htb 1:10 parent 1:1 rate 4Mbit ceil 5Mbit burst 15Kb cburst 1600b
class htb 1:20 parent 1:10 leaf 200: prio 0 rate 9Mbit ceil 10Mbit burst 15Kb cburst 1600b
class htb 1:30 parent 1:10 leaf 300: prio 0 rate 9Mbit ceil 10Mbit burst 15Kb cburst 1600b
我每個站使用以下的過濾器過濾:
filter parent 1: protocol all pref 5 u32
filter parent 1: protocol all pref 5 u32 fh 800: ht divisor 1
filter parent 1: protocol all pref 5 u32 fh 800::20 order 32 key ht 800 bkt 0 flowid 1:20
match 00000800/0000ffff at -4
match 5be42dc1/ffffffff at -12
match 00009cd3/0000ffff at -16
使用的iperf TCP測試:
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 1.25 MBytes 10.5 Mbits/sec
[ 3] 1.0- 2.0 sec 1.12 MBytes 9.44 Mbits/sec
[ 3] 2.0- 3.0 sec 1.00 MBytes 8.39 Mbits/sec
所有流量傳遞儘管2類:
class htb 1:10 parent 1:1 rate 4Mbit ceil 5Mbit linklayer ethernet burst 15Kb/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 6
Sent 31091090 bytes 20545 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
lended: 0 borrowed: 0 giants: 0
tokens: -135041557 ctokens: -86778070
class htb 1:20 parent 1:10 leaf 200: prio 0 quantum 112500 rate 9Mbit ceil 10Mbit linklayer ethernet burst 15Kb/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 0
Sent 31091090 bytes 20545 pkt (dropped 17, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 101p requeues 0
lended: 20545 borrowed: 0 giants: 0
tokens: -20701 ctokens: 1075
此設置與我的類似。請交換1:1和1:110課程的限制,並告訴我會發生什麼 – HenryGiraldo