Jump to content
Калькуляторы

проблемы с шейпером

здравствуйте уважаемые Гуру!

хотелось бы услышать Ваш совет, который день бьюсь с шейпером но он так и не хочет резать траффик, а теперь подробнее:

PPTPD сервер+RadiusClient+шейпер - ОС Debian

Billing+RadiusServer - fedora13

 

конфиг шейпера (файл ip-up) то что добавил:

iif [ -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
/sbin/tc qdisc del dev $1 root > /dev/null
/sbin/tc qdisc del dev $1 ingress > /dev/null

##### speed server->client
if [ "$UPSPEED" != "0" ] ;
then
/sbin/tc qdisc add dev $1 root handle 1: htb default 20 r2q 1
/sbin/tc class add dev $1 parent 1: classid 1:1 htb rate ${UPSPEED}kbit burst 4k
/sbin/tc class add dev $1 parent 1:1 classid 1:10 htb rate ${UPSPEED}kbit burst 4k prio 1
/sbin/tc class add dev $1 parent 1:1 classid 1:20 htb rate ${UPSPEED}kbit burst 4k prio 2
/sbin/tc qdisc add dev $1 parent 1:10 handle 10: sfq perturb 10 quantum 1500
/sbin/tc qdisc add dev $1 parent 1:20 handle 20: sfq perturb 10 quantum 1500
/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10
/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10
/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 u160x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:10
fi
##### speed client->server
if [ "$DOWNSPEED" != "0" ] ;
then
/sbin/tc qdisc add dev $1 handle ffff: ingress
/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
fi

то что вижу в /var/run/raddattr.pppX

Acct-Interim-Inteval 60
Service-Type Framed-User
Framed-Protocol PPP
PPPD-Downstream-Speed-Limit 2048
PPPD-Upstream-Speed-Limit 2048

логи радисуа:

02-07/08:48:28 INFO [radiusListener-p-2-t-1] RadiusListenerWorker - REQUEST:
Packet type: Access-Request
Identifier: 26
Authenticator: {DA 15 36 2A 6C ED B8 CD DA C9 29 E8 E3 27 1B AB}
Attributes:
User-Name=tyrist
CHAP-Password={9E 54 57 90 71 62 30 6E A4 AC 4C 3D 92 D8 9B D2 04}
NAS-IP-Address=127.0.1.1
NAS-Port=0
Service-Type=2
Framed-Protocol=1
Calling-Station-Id=10.222.1.2
CHAP-Challenge=�{�"�?t]H��̋���(�W

02-07/08:48:28 INFO [radiusListener-p-2-t-1] RadiusListenerWorker - RESPONSE:
Packet type: Access-Accept
Identifier: 26
Authenticator: {CB 33 39 3A F1 54 59 9A 8F AA 9B 6C 3C 5B 5B 02}
Attributes:
Acct-Interim-Interval=60
Service-Type=2
Framed-Protocol=1
PPPD-Downstream-Speed-Limit=2048
PPPD-Upstream-Speed-Limit=2048

 

т.е. все атрибуты получает нормально, но по факту upspeed и downspeed не меняются

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this