Upload rate-limit is not working for IPoE

IPoE related questions
Post Reply
hugleo
Posts: 59
Joined: 13 Apr 2016, 14:28

Upload rate-limit is not working for IPoE

Post by hugleo »

uploading is not working for ipoe sessions.

Code: Select all

accel-cmd show sessions 
  ifname  | username |    calling-sid    |       ip       | rate-limit | type | comp | state  |  uptime  
----------+----------+-------------------+----------------+------------+------+------+--------+----------
 eth0 | eth0 | xx:xx:xx:xx:xx:xx | x.x.x.x | 10240/2048 | ipoe |      | active | 00:09:43 
download bandwith is normal 10 Mbps but upload bandwith is almost 0. I tried to browser and test and got only 0.10 Mbps. It should be 2 Mbps.

Tried pppoe in the same interface and worked perfectly 10 Mbps/2Mbps:

Code: Select all

 ifname | username |    calling-sid    |      ip       | rate-limit | type  | comp | state  |  uptime  
--------+----------+-------------------+---------------+------------+-------+------+--------+----------
 ppp0   | eth0     | xx:xx:xx:xx:xx:xx | x.x.x.x | 10240/2048 | pppoe |      | active | 00:02:08 


tried to remove rate-limite for ipoe like:

Code: Select all

shaper change eth0 0
and with the rate-limit off upload is working normaly. Why uploading rate-limit is not working?

qdisc and filter looks the same:

IPOE:

Code: Select all

tc filter show dev eth0 parent ffff:
filter protocol all pref 100 u32 
filter protocol all pref 100 u32 fh 800: ht divisor 1 
filter protocol all pref 100 u32 fh 800::1 order 1 key ht 800 bkt 0 flowid :1 
  match 00000000/00000000 at 0
	action order 1:  police 0x1 rate 2048Kbit burst 275Kb mtu 2Kb action drop overhead 0b 
ref 1 bind 1


tc qdisc show dev eth0
qdisc tbf 1: root refcnt 9 rate 10240Kbit burst 125Kb lat 50.0ms 
qdisc ingress ffff: parent ffff:fff1 ---------------- 
PPPoE:

Code: Select all

tc filter show dev ppp0 parent ffff:
filter protocol all pref 100 u32 
filter protocol all pref 100 u32 fh 800: ht divisor 1 
filter protocol all pref 100 u32 fh 800::1 order 1 key ht 800 bkt 0 flowid :1 
  match 00000000/00000000 at 0
	action order 1:  police 0xe rate 2048Kbit burst 275Kb mtu 2Kb action drop overhead 0b 
ref 1 bind 1

tc qdisc show dev ppp0
qdisc tbf 1: root refcnt 2 rate 10240Kbit burst 125Kb lat 50.0ms 
qdisc ingress ffff: parent ffff:fff1 ---------------- 

Ipoe and shapper config:

Code: Select all

[ipoe]
verbose=5
username=ifname
password=password
lease-time=600
renew-time=600
max-lease-time=600
#unit-cache=1000
#l4-redirect-table=4
#l4-redirect-ipset=l4
#l4-redirect-on-reject=300
#l4-redirect-ip-pool=pool1
shared=0
ifcfg=1
mode=L2
start=dhcpv4
#start=UP
ip-unnumbered=1
#proxy-arp=1
#nat=0
#proto=100
#relay=10.10.10.10
#attr-dhcp-client-ip=DHCP-Client-IP-Address
#attr-dhcp-router-ip=DHCP-Router-IP-Address
#attr-dhcp-mask=DHCP-Mask
#attr-dhcp-lease-time=DHCP-Lease-Time
#attr-dhcp-opt82=DHCP-Option82
#attr-dhcp-opt82-remote-id=DHCP-Agent-Remote-Id
#attr-dhcp-opt82-circuit-id=DHCP-Agent-Circuit-Id
#attr-l4-redirect=L4-Redirect
#attr-l4-redirect-table=4
#attr-l4-redirect-ipset=l4-redirect
#lua-file=/etc/accel-ppp.lua
#offer-delay=0,100:100,200:200,-1:1000
#vlan-mon=eth0,10-200
#vlan-timeout=60
#vlan-name=%I.%N
#ip-pool=ipoe
#idle-timeout=0
#session-timeout=0
#soft-terminate=0
#check-mac-change=1
#calling-sid=mac
#local-net=192.168.0.0/16
gw-ip-address=x.x.x.x/24
interface=eth0


[shaper]
attr=Accel-Rate-Limit
#down-burst-factor=0.1
up-burst-factor=1.1
#latency=50
#mpu=0
#mtu=0
#r2q=10
#quantum=1500
#moderate-quantum=1
#cburst=1534
#ifb=ifb0
up-limiter=police
down-limiter=tbf
#leaf-qdisc=sfq perturb 10
#leaf-qdisc=fq_codel [limit PACKETS] [flows NUMBER] [target TIME] [interval TIME] [quantum BYTES] [[no]ecn]
#rate-multiplier=1
#fwmark=1
verbose=1

hugleo
Posts: 59
Joined: 13 Apr 2016, 14:28

Re: Upload rate-limit is not working for IPoE

Post by hugleo »

Changed shapper to
ifb=ifb0
up-limiter=htb
down-limiter=htb

and worked.

Could I use tbf/police for non pppoe interfaces?
Post Reply