вот нацарапал
класс 1:2 развил на 1:30 и 1:40 ,1:30 (1мегабит внешнего инета) 1:40 ( 4мегабит внутрисетевого инета)
1:30 развил или начудил обалдеть
- код выделить все
#--------------------------------------------INCOMING---------------------------------------------------------------
#all output traffic for ppp0
$LOG "All incoming ppp rate: normal $BANDWIDTHDOWN_LIMIT , maximum $BANDWIDTHDOWN (kbit/s)"
tc qdisc add dev br0 root handle 1: htb default 22
tc class add dev br0 parent 1: classid 1:1 htb rate 90mbit quantum 1500 burst 500k
tc class add dev br0 parent 1:1 classid 1:2 htb rate ${BANDWIDTHDOWN}kbit \
quantum 1500 burst 100k
tc class add dev br0 parent 1:1 classid 1:3 htb rate 80 \
ceil 90mbit prio 0 quantum 1500 burst 100ktc class add dev br0 parent 1:2 classid 1:30 htb rate 1024kbit \
ceil 1024kbit prio 1 quantum 1500
tc class add dev br0 parent 1:2 classid 1:40 htb rate 4006kbit \
ceil 4000kbit prio 2 quantum 1500tc class add dev br0 parent 1:30 classid 1:31 htb rate 512kbit ceil 999kbit prio 1 quantum 1500
tc class add dev br0 parent 1:30 classid 1:32 htb rate 385kbit ceil 512kbit prio 2 quantum 1500tc class add dev br0 parent 1:31 classid 1:33 htb rate 250kbit ceil 512kbit prio 1 quantum 1500
tc class add dev br0 parent 1:31 classid 1:34 htb rate 511kbit ceil 990kbit prio 2 quantum 1500tc class add dev br0 parent 1:32 classid 1:35 htb rate 128kbit ceil 384kbit prio 1 quantum 1500
tc class add dev br0 parent 1:32 classid 1:36 htb rate 127kbit ceil 256kbit prio 2 quantum 1500tc class add dev br0 parent 1:36 classid 1:37 htb rate 126kbit ceil 255kbit prio 1 quantum 1500
tc class add dev br0 parent 1:36 classid 1:38 htb rate 126kbit ceil 255kbit prio 2 quantum 1500tc class add dev br0 parent 1:40 classid 1:41 htb rate 1000kbit ceil 4002kbit prio 1 quantum 1500
tc class add dev br0 parent 1:40 classid 1:42 htb rate 1000kbit ceil 4002kbit prio 2 quantum 1500
tc class add dev br0 parent 1:40 classid 1:43 htb rate 1000kbit ceil 4002kbit prio 2 quantum 1500
tc class add dev br0 parent 1:40 classid 1:44 htb rate 1000kbit ceil 4002kbit prio 3 quantum 1500
tc class add dev br0 parent 1:40 classid 1:45 htb rate 1000kbit ceil 4002kbit prio 4 quantum 1500tc qdisc add dev br0 parent 1:3 handle 3: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:33 handle 33: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:34 handle 34: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:35 handle 35: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:37 handle 37: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:38 handle 38: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:41 handle 41: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:42 handle 42: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:43 handle 43: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:44 handle 44: esfq perturb 10 hash dst quantum 1500
tc qdisc add dev br0 parent 1:45 handle 45: esfq perturb 10 hash dst quantum 1500tc filter add dev br0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.3 flowid 1:33
tc filter add dev br0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.5 flowid 1:34
tc filter add dev br0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.4 flowid 1:35
tc filter add dev br0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.6 flowid 1:37
tc filter add dev br0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.2 flowid 1:38if [ "$SHAPER_IN_ENABLE" = "on" ]; then
#filters for marked in prerouting
tc filter add dev br0 parent 1:0 prio 2 protocol ip handle 6 fw flowid 1:40
else
tc filter add dev br0 parent 1:0 protocol ip prio 2 u32 match ip dst 192.168.1.5 flowid 1:41
tc filter add dev br0 parent 1:0 protocol ip prio 2 u32 match ip dst 192.168.1.3 flowid 1:42
tc filter add dev br0 parent 1:0 protocol ip prio 2 u32 match ip dst 192.168.1.4 flowid 1:43
tc filter add dev br0 parent 1:0 protocol ip prio 2 u32 match ip dst 192.168.1.6 flowid 1:44
tc filter add dev br0 parent 1:0 protocol ip prio 2 u32 match ip dst 192.168.1.2 flowid 1:45
fi#local connections
tc filter add dev br0 parent 1:0 protocol ip prio 0 u32 match ip src $LAN_IP_ADDR flowid 1:3#---------------------------------------------OUTGOING--------------------------------------------------------------
вопрос на сасыпку
где напортачил ?
где начудил ?
угадайте !