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

accel-ppp version 1.7.3(upspeed)

Добрый день, подскажите пожалуйста по accel'у.

Начались проблемы с upspeed.

 

Пример:

 

тариф 10мб, по радиусу атрибуты передаются. Downspeed как и должно быть 10мб, а вот Upspeed 1мб. Если же убираю ограничения и не передаю атрибуты то Upspeed поднимается максимально как и Downspeed.

 

accel-ppp.conf

 

[modules]

#path=/usr/local/lib/accel-ppp

log_file

#log_tcp

#log_pgsql

pptp

pppoe

#l2tp

auth_mschap_v2

auth_mschap_v1

auth_chap_md5

auth_pap

radius

ippool

sigchld

pppd_compat

shaper_tbf

#chap-secrets

 

[core]

log-error=/var/log/accel-ppp/core.log

thread-count=23

 

[ppp]

verbose=1

min-mtu=1000

mtu=1400

mru=1400

ccp=0

#sid-case=upper

#check-ip=0

#single-session=replace

#mppe=require

 

[lcp]

echo-interval=30

echo-failure=3

 

[pptp]

#echo-interval=30

verbose=1

[pppoe]

interface=eth0.101

interface=eth0.136

interface=eth0.151

interface=eth0.152

interface=eth0.153

interface=eth0.154

interface=eth0.155

interface=eth0.156

interface=eth0.157

interface=eth0.159

interface=eth0.93

interface=eth0.999

#ac-name=xxx

#service-name=yyy

#pado-delay=0

#pado-delay=0,100:100,200:200,-1:500

#ifname-in-sid=called-sid

verbose=1

echo-interval=30

 

[l2tp]

#dictionary=/usr/local/share/accel-ppp/l2tp/dictionary

#hello-interval=60

#timeout=60

#rtimeout=5

#retransmit=5

#host-name=accel-ppp

verbose=1

 

[dns]

dns1=8.8.8.8

dns2=8.8.4.4

 

[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,xxxxxx

acct-server=192.168.0.2:1813,xxxxxx

dae-server=192.168.0.1:3799,xxxxxx

dm_coa_secret=xxxxxx

verbose=1

#timeout=3

#max-try=3

acct-timeout=0

 

[client-ip-range]

192.168.0.0/16

10.10.0.0/16

10.253.253.0/24

10.17.139.0/24

[ip-pool]

gw-ip-address=172.16.0.1

172.16.0.2-254

172.16.1.2-254

172.16.2.2-254

172.16.3.2-254

172.16.4.2-254

[log]

log-file=/var/log/accel-ppp/accel-ppp.log

log-emerg=/var/log/accel-ppp/emerg.log

log-fail-file=/var/log/accel-ppp/auth-fail.log

#log-debug=/dev/stdout

#log-tcp=127.0.0.1:3000

copy=1

#color=1

#per-user-dir=per_user

#per-session-dir=per_session

#per-session=1

level=3

#log-tcp=127.0.0.1:3000

 

[log-pgsql]

conninfo=user=log

log-table=log

 

[pppd-compat]

#ip-pre-up=/etc/ppp/ip-pre-up

#ip-up=/etc/ppp/ip-up

#ip-down=/etc/ppp/ip-down

#ip-change=/etc/ppp/ip-change

radattr-prefix=/var/run/radattr

verbose=1

 

[chap-secrets]

gw-ip-address=192.168.100.1

#chap-secrets=/etc/ppp/chap-secrets

 

[tbf]

#attr=Filter-Id

#down-burst-factor=0.1

#up-burst-factor=1.0

#latency=50z

#attr-down=PPPD-Downstream-Speed

#attr-up=PPPD-Upstream-Speed

attr-down=PPPD-Downstream-Speed-Limit

attr-up=PPPD-Upstream-Speed-Limit

 

[cli]

telnet=127.0.0.1:2000

tcp=127.0.0.1:2001

#password=123

 

Вырезка из 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 1400

/usr/sbin/tc qdisc add dev $1 parent 1:20 handle 20: sfq perturb 10 quantum 1400

/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

 

/var/log/messages :

 

2014-04-14T12:16:04.346615+04:00 linux-f2js ip-up: TC HTB version 3.3

2014-04-14T12:16:04.346895+04:00 linux-f2js ip-up: Illegal "rate"

2014-04-14T12:16:04.347240+04:00 linux-f2js ip-up: Usage: ... qdisc add ... htb [default N] [r2q N]

2014-04-14T12:16:04.347708+04:00 linux-f2js ip-up: default minor id of class to which unclassified packets are sent {0}

2014-04-14T12:16:04.347964+04:00 linux-f2js ip-up: r2q DRR quantums are computed as rate in Bps/r2q {10}

2014-04-14T12:16:04.348237+04:00 linux-f2js ip-up: debug string of 16 numbers each 0-3 {0}

2014-04-14T12:16:04.348486+04:00 linux-f2js ip-up:.

2014-04-14T12:16:04.348812+04:00 linux-f2js ip-up: ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]

2014-04-14T12:16:04.349088+04:00 linux-f2js ip-up: [prio P] [slot S] [pslot PS]

2014-04-14T12:16:04.349325+04:00 linux-f2js ip-up: [ceil R2] [cburst B2] [mtu MTU] [quantum Q]

2014-04-14T12:16:04.349736+04:00 linux-f2js ip-up: rate rate allocated to this class (class can still borrow)

2014-04-14T12:16:04.350060+04:00 linux-f2js ip-up: burst max bytes burst which can be accumulated during idle period {computed}

2014-04-14T12:16:04.350340+04:00 linux-f2js ip-up: mpu minimum packet size used in rate computations

2014-04-14T12:16:04.350637+04:00 linux-f2js ip-up: overhead per-packet size overhead used in rate computations

2014-04-14T12:16:04.350909+04:00 linux-f2js ip-up: linklay adapting to a linklayer e.g. atm

2014-04-14T12:16:04.351195+04:00 linux-f2js ip-up: ceil definite upper class rate (no borrows) {rate}

2014-04-14T12:16:04.351459+04:00 linux-f2js ip-up: cburst burst but for ceil {computed}

2014-04-14T12:16:04.351847+04:00 linux-f2js ip-up: mtu max packet size we create rate map for {1600}

2014-04-14T12:16:04.352197+04:00 linux-f2js ip-up: prio priority of leaf; lower are served first {0}

2014-04-14T12:16:04.352496+04:00 linux-f2js ip-up: quantum how much bytes to serve from leaf at once {use r2q}

2014-04-14T12:16:04.352821+04:00 linux-f2js ip-up:.

2014-04-14T12:16:04.353102+04:00 linux-f2js ip-up: TC HTB version 3.3

2014-04-14T12:16:04.353420+04:00 linux-f2js ip-up: Illegal "rate"

2014-04-14T12:16:04.353691+04:00 linux-f2js ip-up: Usage: ... qdisc add ... htb [default N] [r2q N]

2014-04-14T12:16:04.353957+04:00 linux-f2js ip-up: default minor id of class to which unclassified packets are sent {0}

2014-04-14T12:16:04.354272+04:00 linux-f2js ip-up: r2q DRR quantums are computed as rate in Bps/r2q {10}

2014-04-14T12:16:04.354590+04:00 linux-f2js ip-up: debug string of 16 numbers each 0-3 {0}

2014-04-14T12:16:04.354924+04:00 linux-f2js ip-up:.

2014-04-14T12:16:04.355146+04:00 linux-f2js ip-up: ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]

2014-04-14T12:16:04.355495+04:00 linux-f2js ip-up: [prio P] [slot S] [pslot PS]

2014-04-14T12:16:04.355816+04:00 linux-f2js ip-up: [ceil R2] [cburst B2] [mtu MTU] [quantum Q]

2014-04-14T12:16:04.356123+04:00 linux-f2js ip-up: rate rate allocated to this class (class can still borrow)

2014-04-14T12:16:04.356403+04:00 linux-f2js ip-up: burst max bytes burst which can be accumulated during idle period {computed}

2014-04-14T12:16:04.356720+04:00 linux-f2js ip-up: mpu minimum packet size used in rate computations

2014-04-14T12:16:04.357013+04:00 linux-f2js ip-up: overhead per-packet size overhead used in rate computations

2014-04-14T12:16:04.357268+04:00 linux-f2js ip-up: linklay adapting to a linklayer e.g. atm

2014-04-14T12:16:04.357617+04:00 linux-f2js ip-up: ceil definite upper class rate (no borrows) {rate}

2014-04-14T12:16:04.357907+04:00 linux-f2js ip-up: cburst burst but for ceil {computed}

2014-04-14T12:16:04.358185+04:00 linux-f2js ip-up: mtu max packet size we create rate map for {1600}

2014-04-14T12:16:04.358494+04:00 linux-f2js ip-up: prio priority of leaf; lower are served first {0}

2014-04-14T12:16:04.358736+04:00 linux-f2js ip-up: quantum how much bytes to serve from leaf at once {use r2q}

2014-04-14T12:16:04.359054+04:00 linux-f2js ip-up:.

2014-04-14T12:16:04.359409+04:00 linux-f2js ip-up: TC HTB version 3.3

2014-04-14T12:16:04.359819+04:00 linux-f2js ip-up: RTNETLINK answers: No such file or directory

2014-04-14T12:16:04.370682+04:00 linux-f2js ip-up: RTNETLINK answers: No such file or directory

2014-04-14T12:16:04.430537+04:00 linux-f2js ip-up: Illegal "rate"

2014-04-14T12:16:04.431027+04:00 linux-f2js ip-up: Illegal "police"

2014-04-14T12:17:24.017866+04:00 linux-f2js netconfig: open lock for netconfig failed. Abort.

2014-04-14T12:17:24.048520+04:00 linux-f2js ip-up: RTNETLINK answers: No such file or directory

2014-04-14T12:17:24.063122+04:00 linux-f2js ip-up: RTNETLINK answers: No such file or directory

2014-04-14T13:02:32.636496+04:00 linux-f2js kernel: [434238.711191] HTB: quantum of class 10001 is big. Consider r2q change.

2014-04-14T13:02:32.651425+04:00 linux-f2js kernel: [434238.726131] HTB: quantum of class 10010 is big. Consider r2q change.

2014-04-14T13:02:32.665466+04:00 linux-f2js kernel: [434238.740731] HTB: quantum of class 10020 is big. Consider r2q change.

Edited by alishkka

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