alishka Posted February 3, 2014 Posted February 3, 2014 (edited) Доброе утро, сменил VPN сервер, не режутся скоростя. accel-ppp.conf [modules] log_file pptp pppoe auth_mschap_v2 auth_mschap_v1 auth_chap_md5 auth_pap radius ippool sigchld shaper_tbf [tbf] attr-down=PPPD-Downstream-Speed-Limit attr-up=PPPD-Upstream-Speed-Limit [radius] dictionary=/usr/local/share/accel-ppp/radius/dictionary nas-identifier=VPN nas-ip-address=192.168.0.1 gw-ip-address=172.16.0.1 auth-server=192.168.0.2:1812,rfhnjyrf acct-server=192.168.0.2:1813,rfhnjyrf dae-server=192.168.0.1:3799,rfhnjyrf dm_coa_secret=rfhnjyrf verbose=1 #timeout=3 #max-try=3 acct-timeout=0 захожу по 127.0.0.1 2000 accel-ppp#show sessions ppp589 | ali88 | 00:15:6d:4b:04:47 | 172.16.2.4 | 800/800 | pppoe | | active | 00:00:21 /usr/local/share/acce-ppp/radius/dictionary ATTRIBUTE Traffic-Shape-in 231 integer ATTRIBUTE<----->PPPD-Downstream-Speed-Limit<--->230<--->integer ATTRIBUTE<----->PPPD-Upstream-Speed-Limit<----->231<--->integer /etc/ppp/ip-up if [ -f /var/run/radattr.$1 ] then DOWNSPEED=`/usr/bin/awk '/PPPD-Downstream-Speed-Limit/ {print $2}' /var/run/radattr.$1` UPSPEED=`/usr/bin/awk '/PPPD-Upstream-Speed-Limit/ {print $2}' /var/run/radattr.$1` FILTERS=`/usr/bin/awk '/Filter-Id/ {print $2}' /var/run/radattr.$1` #echo $DOWNSPEED #echo $UPSPEED #echo $FILTERS /usr/sbin/tc qdisc del dev $1 root > /dev/null /usr/sbin/tc qdisc del dev $1 ingress > /dev/null ##### speed server->client if [ "$UPSPEED" != "0" ] ; then /usr/sbin/tc qdisc add dev $1 root handle 1: htb default 20 r2q 1 /usr/sbin/tc class add dev $1 parent 1: classid 1:1 htb rate ${UPSPEED}kbit burst 4k /usr/sbin/tc class add dev $1 parent 1:1 classid 1:10 htb rate ${UPSPEED}kbit burst 4k prio 1 /usr/sbin/tc class add dev $1 parent 1:1 classid 1:20 htb rate ${UPSPEED}kbit burst 4k prio 2 /usr/sbin/tc qdisc add dev $1 parent 1:10 handle 10: sfq perturb 10 quantum 1500 /usr/sbin/tc qdisc add dev $1 parent 1:20 handle 20: sfq perturb 10 quantum 1500 /usr/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10 /usr/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10 /usr/sbin/tc filter add dev $1 parent 1: protocol ip prio 10 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:10 fi ##### speed client->server if [ "$DOWNSPEED" != "0" ] ; then /usr/sbin/tc qdisc add dev $1 handle ffff: ingress /usr/sbin/tc filter add dev $1 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${DOWNSPEED}kbit burst 12k drop flowid :1 fi accel-ppp# show stat uptime: 0.00:14:52 cpu: 5% mem(rss/virt): 34660/4341020 kB core: mempool_allocated: 19243427 mempool_available: 292888 thread_count: 23 thread_active: 1 context_count: 753 context_sleeping: 0 context_pending: 0 md_handler_count: 2219 md_handler_pending: 0 timer_count: 1462 timer_pending: 0 ppp: starting: 7 active: 727 finishing: 1 pptp: starting: 0 active: 5 pppoe: active: 730 delayed PADO: 0 recv PADI: 8377 drop PADI: 0 sent PADO: 8377 recv PADR(dup): 8375(7) sent PADS: 8369 radius(1, 192.168.0.2): request count: 0 queue length: 0 auth sent: 8372 auth lost(total/5m/1m): 0/0/0 auth avg query time(5m/1m): 11/12 ms acct sent: 753 acct lost(total/5m/1m): 0/0/0 acct avg query time(5m/1m): 4/1 ms interim sent: 8594 interim lost(total/5m/1m): 0/0/0 interim avg query time(5m/1m): 8/7 ms accel-ppp# linux-f2js:/etc/ppp # tc class show dev ppp384 class htb 1:10 parent 1:1 leaf 10: prio 1 rate 400000bit ceil 400000bit burst 4Kb cburst 1600b class htb 1:1 root rate 400000bit ceil 400000bit burst 4Kb cburst 1600b class htb 1:20 parent 1:1 leaf 20: prio 2 rate 400000bit ceil 400000bit burst 4Kb cburst 1600b linux-f2js:/etc/ppp # И правило для логина с нужно скоростью Edited February 3, 2014 by alishka Вставить ник Quote
Lynx10 Posted February 4, 2014 Posted February 4, 2014 вы определитесь как вы хотите шейпить... внешними скриптами или внутренним шейпером... а то у вас как-то сумбурно..... Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.