Simple QoS for VoIP


#17

Hmm i dont fount the link but,
As i understand, exist in each linux network driver a sending queue with band 0, 1 and 2
0 have the highest prioprity

and as i understand the ToS field will be used like here:
https://www.cs.drexel.edu/cgi-bin/manServer.pl/usr/share/man/man8/tc-prio.8


#18

I believe this is only true if you use the pfifo_fast qdisc, which I would not recommend anymore...

running "tc -d qdisc ; tc -s qdisc" might reveal which qdisc is actualy in use.

Also the strict priority precedence as used in those bands is really not that desirable, as band 0 traffic will be able to completely starve the other bands. If possible try sch_cake with the diffserv4 mode and set aterisk to use more conventional DSCP markings. The problem with pfifo_fast really is that it is super easy to introduce massive bufferbloat with that which does not sound like a good idea in general.


#19

As i understand it is enable by default:
http://www.tldp.org/HOWTO/html_single/Traffic-Control-HOWTO/#qs-pfifo_fast

tc -s qdisc show dev pppoe-wan_dsl
qdisc fq_codel 0: root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 70365911 bytes 1059986 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0

but what is the meaning ?


#20

IIRC, lede switched to fq_codel as the default qdisc, so outside of your defined policers there should be no priority bands active. at least not on egress...


#21

Dammed !:japanese_ogre:
I thing my egress prioritizing are totally wrong.
I believe the docu is from 2006.
In the past was all better !

But many thangs @moeller for your help
I would believe in my exgress priority for all eternity.
A second problem are i can not really test my config upload.

What is the keyword for looking for, if i want to have a very simple prioprity of my VoIP exgress ?
(like fifo_fast):sob:


#22

So I would really recommend you try to install sqmscripts/luci-app-sqm and try the layer_cake.qos (which will give you diffserv3 out of the box, with a bit of editing in /usr/lib/sqm/layer_cake.qos you can hard switch this to diffserv4) that should hoist your AQM/QoS set-up into the present decade :wink:

But short of that, if the kaernel is built with pfifo_fast buil-in or as module the following should switch an interfaces qdisc to pfifo_fast, example for interface eth1.2:
tc qdisc replace dev eth1.2 root cake:

full example with output:
root@router:~# tc qdisc delete dev eth1.2 root cake ; tc -d qdisc show dev eth1.2
RTNETLINK answers: Invalid argument
qdisc noqueue 0: root refcnt 2
root@ router:~# tc qdisc replace dev eth1.2 root cake ; tc -d qdisc show dev eth1.2
qdisc cake 8012: root refcnt 2 unlimited diffserv3 triple-isolate rtt 100.0ms raw total_overhead 18 hard_header_len 18
root@ router:~#

Note I believe that current LEDE builds do not actually deliver pfifo_fast anymore...


#23

The most documentation on the Internet pointed to pfifo_fast.
Have i right understand it is the default in Linux but not in LEDE because bufferbload (security risc ?) ?

I have do it a year before. It brings me a new logical device Nr 13 and cost much recources and slow down my device.
(my device is generall too low for my 100Mbit/s connection, but for using this wonderfull device i will accept 50Mbit/s loss but not more)
I need a slim configuration.

But cake looks like working:

opkg update ; opkg install kmod-sched-cake # installing the required packages first

EXTDEV=pppoe-wan_dsl 	# my DSL connection

# here i create a new Chain "custom_qos" on OUTPUT where i setting DSCP flags
iptables -t mangle -N custom_qos
iptables -t mangle -A OUTPUT -o ${EXTDEV} -j custom_qos
iptables -t mangle -A custom_qos -p udp --sport 12300 --dport 12300 -j DSCP --set-dscp 44	# setting my fastd VPN to Voice-Admit (AV)

tc qdisc del dev ${EXTDEV} root 						# delete all old qdisc on that device
tc qdisc add dev ${EXTDEV} root cake help					# shows what is possible
tc qdisc add dev ${EXTDEV} root cake bandwidth 20mbit internet diffserv4 	# install diffserv4
tc -s qdisc show dev ${EXTDEV}

then i Ping a litlebit the other router and the result are:

 qdisc cake 8001: root refcnt 2 bandwidth 20Mbit diffserv4 triple-isolate rtt 100.0ms raw 
 Sent 36352 bytes 146 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
 memory used: 2240b of 4Mb
 capacity estimate: 20Mbit
                 Bulk   Best Effort      Video       Voice
  thresh      1250Kbit      20Mbit      10Mbit       5Mbit
  target        14.5ms       5.0ms       5.0ms       5.0ms
  interval     109.5ms     100.0ms     100.0ms     100.0ms
  pk_delay         0us        22us        16us        21us
  av_delay         0us         5us         0us         2us
  sp_delay         0us         5us         0us         2us
  pkts               0          98           4          44
  bytes              0       10774         304       25274
  way_inds           0           0           0           0
  way_miss           0           9           4           2
  way_cols           0           0           0           0
  drops              0           0           0           0
  marks              0           0           0           0
  sp_flows           0           0           0           1
  bk_flows           0           0           0           0
  un_flows           0           0           0           0
  max_len            0         299          76        1394

(no idea where are the video comes from)

Many thanks i thing it will help.


#24

I see there is an "autorate_ingress" is there a possibility to use it for the ingress too ?
Know everbody an example ?


#25

Hmm, so sqm-scripts really has no discernible run time cost, it really is just a framework to configure and call the ip and tc binaries, combined with some glue that allows easier integration into lede/openwrt including a hotplug script that makes sure that your configuration survives an ifdown/ifup cycle. And if you have the GUI installed then lici-app-sqm also offers a reasonably easy access to the configuration. The nice thing about sqm-scripts that it is quite easy to use it to operate your own or changed versions of the supplied scripts to get your own customizations woking with the luci gui and hotplug and and and. Neither the sqm-scripts nor the luc-app-sqm scripts packages are really that large, the biggest cost probably are the modules it drags in, both size wise and from the run time cost. So maybe it is time to try that again?

Video really is just a name, any packet with one of the following DSCPs (AF4x, AF3x, CS3, AF2x, TOS4, CS2, TOS1) will be reported in the in the "Video tin".


#26

Autorate ingress only makes sense if you have a variable rate ingress link, vdsl should be fixed bandwidth, especially if you shape down to 20Mbps from a true VVDSL100 link...
But you would configure your expected bandwidth as "bandwidth NNN" followed by the autorate-ingress keyword to tell cake to automatically reduce the bandwidth if latency/drop probability increases too much IIRC.


#27

Yes i have done:
(i have test multiple times and use the middle value)

starting circumstances (all values in Mbit/s if no other units given):
Laptop with 100Mbit Ethernet connector (for this reason only 90-95 is maximum)
VDSL2 with Up/Down 20/100 alway reached the maximum Download (90-95) with the provider Fritzbox 7360v1

My O2-Box 6431 without any QoS:

  • speedtest.net up/down: 19/65
  • Download a 1GB testfile from my Provider: 8.2MB/s

My O2-Box 6431 with my simple script from below:
(all unpriliged ingress drop at 60 / priviliged unlimeted. Exgress: cake diffserv4 with 20

  • speedtest.net up/down: 19/46
  • Download a 1GB testfile from my Provider: 5.6MB/s

My O2-Box 6431 with luci-app-sqm:
I enable SQM instance on pppoe-wan_dsl
Download speed 75000 kbit/s
Upload speed 20000 kbit/s
Queuing disciplines: cake
Queue setup script: simple.qos

  • speedtest.net up/down: 19/40
  • Download a 1GB testfile from my Provider: 5.1MB/s[/code]

Result: both QoS unsatisfactory
I need an other QoS solution or better VoIP and SMP support together on this router.

The Problem: The existing rate must always be cut right ?
On high rate VDSL2 connections the ingress rate depend of the load by the device itself.
On low rate ADSL connections each bit/s are precious.


#28

Okay, this is a sub-optimal configuration, you should use layer_cake.qos instead, simple.qos/cake is possible for reference testing, but does not make much sense in production, as you will run both cake and HTB...
https://lede-project.org/docs/user-guide/sqm has a bit more detail on sqm-scripts configuration

Could you post the output of:

  1. cat /etc/config/sqm
  2. tc -d qdisc
  3. tc -s qdisc

followed by a dslreports speedtest (have a look at https://forum.openwrt.org/t/sqm-qos-recommended-settings-for-the-dslreports-speedtest-bufferbloat-testing/2803 for how to get the most out of that speedtest). BTW, this is not because I dislike speedtest.net, it is just that the detailed results page from dslreports offers way more information that is helpful when trying to test/optimize sqm-scripts.

Followed again by
5) tc -s qdisc

And finally run dslreports speedtest while concurrently log into your router and run "top -d 1" and look at the idle and sirq values; if idle is always 0 or close to 0, your router simply runs out of CPU cycles (traffic shaping is unfortunately a bit expensive).

Yes, for ingress shaping a bit of bandwidth sacrifice is necessary, but most users are happy with something in the range of 85-95% of the gross download bandwidth.
without any QoS you only get
(8.281000^2)/(10001000) = 65.6 Mbps (which matches the speedtest.net number of 65 quite well).
if we try to calculate the respective gross rate (brutto-bandbreite) we get:
(8.2
81000^2) * ((1500+26)/(1500-8-20-20)) / (10001000) = 68.94 Mbps

So, I guess the 6431 is a lot less capable than the FB 7360v1...

I ran into a similar issue with a BT hoe hub 5a, that box was not powerful enough (under lede at least) to do VDSL2, PPPoE, NAT, firewalling and wifi even at a 50/10 VDLS2 link. So I turned that box into a dedicated bridged modem, and have an old wndr3700v2 do PPPoE, NAT, firewalling and wifi, which for whatever reason has no issues doing all of that. And I also would really like to reduce my router park a bit...

Best Regards

True, this is why sqm-scripts defaults to ECN on the downstream, so that packets do not need to be dropped 9assuming both endpoints negotiated ECN).


#29

What is the meaning for bufferbload, i here this word serveral times but i do not really know the meaning ?

My O2-Box 6431 with luci-app-sqm:
I enable SQM instance on pppoe-wan_dsl
Download speed 60000 kbit/s
Upload speed 20000 kbit/s
Queuing disciplines: cake
Queue setup script: piece_of_cake.qos
Link Layer Adaption: Ethernet with overhead 8 Byte
cat /etc/config/sqm:


config queue 'eth1'
        option qdisc_advanced '0'
        option enabled '1'
        option interface 'pppoe-wan_dsl'
        option upload '20000'
        option debug_logging '0'
        option verbosity '5'
        option qdisc 'cake'
        option download '60000'
        option script 'piece_of_cake.qos'
        option linklayer 'ethernet'
        option overhead '8'

tc -d qdisc:

qdisc noqueue 0: dev lo root refcnt 2 
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
qdisc fq_codel 0: dev ptm0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
qdisc noqueue 0: dev br-lan root refcnt 2 
qdisc noqueue 0: dev eth0.1 root refcnt 2 
qdisc noqueue 0: dev eth0.3 root refcnt 2 
qdisc noqueue 0: dev eth0.100 root refcnt 2 
qdisc noqueue 0: dev eth0.101 root refcnt 2 
qdisc mq 0: dev wlan0 root 
qdisc fq_codel 0: dev wlan0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
qdisc fq_codel 0: dev wlan0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
qdisc fq_codel 0: dev wlan0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
qdisc fq_codel 0: dev wlan0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
qdisc fq_codel 0: dev tap_fastd0 root refcnt 2 limit 10240p flows 1024 quantum 1440 target 5.0ms interval 100.0ms ecn 
qdisc fq_codel 0: dev ovpntun4s1 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5.0ms interval 100.0ms ecn 
qdisc cake 8017: dev pppoe-wan_dsl root refcnt 2 bandwidth 20Mbit besteffort triple-isolate rtt 100.0ms raw 
 linklayer ethernet overhead 8 
qdisc ingress ffff: dev pppoe-wan_dsl parent ffff:fff1 ---------------- 
qdisc cake 8018: dev ifb4poe-wan_dsl root refcnt 2 bandwidth 60Mbit besteffort triple-isolate wash rtt 100.0ms raw 
 linklayer ethernet overhead 8

tc -s qdisc:

qdisc noqueue 0: dev lo root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 1997656789 bytes 1472501 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev ptm0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 355887474 bytes 1159088 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc noqueue 0: dev eth0.1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc noqueue 0: dev eth0.3 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc noqueue 0: dev eth0.100 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc noqueue 0: dev eth0.101 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc mq 0: dev wlan0 root 
 Sent 8508 bytes 61 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc fq_codel 0: dev wlan0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 8508 bytes 61 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev tap_fastd0 root refcnt 2 limit 10240p flows 1024 quantum 1440 target 5.0ms interval 100.0ms ecn 
 Sent 1006 bytes 9 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev ovpntun4s1 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5.0ms interval 100.0ms ecn 
 Sent 152 bytes 2 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 8017: dev pppoe-wan_dsl root refcnt 2 bandwidth 20Mbit besteffort triple-isolate rtt 100.0ms raw 
 Sent 71712 bytes 286 pkt (dropped 0, overlimits 12 requeues 0) 
 backlog 0b 0p requeues 0 
 memory used: 2240b of 4Mb
 capacity estimate: 20Mbit
                 Tin 0
  thresh        20Mbit
  target         5.0ms
  interval     100.0ms
  pk_delay       257us
  av_delay        23us
  sp_delay        15us
  pkts             286
  bytes          71712
  way_inds           0
  way_miss          69
  way_cols           0
  drops              0
  marks              0
  sp_flows           1
  bk_flows           1
  un_flows           0
  max_len         1500

qdisc ingress ffff: dev pppoe-wan_dsl parent ffff:fff1 ---------------- 
 Sent 110266 bytes 243 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc cake 8018: dev ifb4poe-wan_dsl root refcnt 2 bandwidth 60Mbit besteffort triple-isolate wash rtt 100.0ms raw 
 Sent 112210 bytes 243 pkt (dropped 0, overlimits 24 requeues 0) 
 backlog 0b 0p requeues 0 
 memory used: 10560b of 4Mb
 capacity estimate: 60Mbit
                 Tin 0
  thresh        60Mbit
  target         5.0ms
  interval     100.0ms
  pk_delay       863us
  av_delay        56us
  sp_delay        27us
  pkts             243
  bytes         112210
  way_inds           0
  way_miss          56
  way_cols           0
  drops              0
  marks              0
  sp_flows           1
  bk_flows           1
  un_flows           0
  max_len         1500

But i do not really know with affect it have, or with other words where are my 4 traffic classes ?

http://www.dslreports.com/speedtest: 19/42
speedtest.net: 19/41
Download a 1GB testfile from my Provider: 5.2MB/s

"top -d 1" on huge download:

Mem: 42552K used, 15056K free, 1152K shrd, 3080K buff, 12132K cached
CPU:   0% usr   4% sys   0% nic   0% idle   0% io   0% irq  94% sirq
Load average: 0.52 0.69 0.36 2/102 6729
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
    3     2 root     RW       0   0%  75% [ksoftirqd/0]
 5167     1 asterisk S    28304  49%  13% /usr/sbin/asterisk
 6729  6709 root     R     1184   2%   5% top -d 1
  103     2 root     SW       0   0%   5% [kworker/0:1]
 1447     2 root     SW       0   0%   2% [autbtex]
 1448     2 root     SW       0   0%   1% [pmex_ne]
 1664     1 nobody   S     3380   6%   0% /usr/sbin/openvpn --syslog openvpn(ov
 1495     1 root     S     2136   4%   0% /usr/sbin/uhttpd -f -h /www -r LEDE -
 1167     1 root     S     1740   3%   0% /sbin/netifd
 2003     1 root     S     1684   3%   0% /usr/sbin/hostapd -s -P /var/run/wifi
    1     0 root     S     1528   3%   0% /sbin/procd
 1025     1 root     S     1440   2%   0% /sbin/rpcd
 1213     1 root     S     1424   2%   0% /usr/sbin/odhcpd
 5225     1 root     S     1360   2%   0% {dynamic_dns_upd} /bin/sh /usr/lib/dd
 5226     1 root     S     1360   2%   0% {dynamic_dns_upd} /bin/sh /usr/lib/dd
 4525     1 root     S     1360   2%   0% {dynamic_dns_upd} /bin/sh /usr/lib/dd
 1234     1 root     S     1252   2%   0% /sbin/vdsl_cpe_control -i10_00_10_00_
 1016     1 root     S     1224   2%   0% /sbin/logd -S 64
 2453  1167 root     S     1204   2%   0% /usr/sbin/pppd nodetach ipparam wan_d

"top -d 1" without traffic:

Mem: 42796K used, 14812K free, 1152K shrd, 3080K buff, 12132K cached
CPU:   0% usr   3% sys   0% nic  96% idle   0% io   0% irq   0% sirq
Load average: 1.33 0.97 0.50 1/102 6731
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 6731  6709 root     R     1184   2%   3% top -d 1
 5167     1 asterisk S    28304  49%   1% /usr/sbin/asterisk
 1664     1 nobody   S     3380   6%   0% /usr/sbin/openvpn --syslog openvpn(ov
 1495     1 root     S     2136   4%   0% /usr/sbin/uhttpd -f -h /www -r LEDE -
 1167     1 root     S     1740   3%   0% /sbin/netifd
 2003     1 root     S     1684   3%   0% /usr/sbin/hostapd -s -P /var/run/wifi
    1     0 root     S     1528   3%   0% /sbin/procd
 1025     1 root     S     1440   2%   0% /sbin/rpcd
 1213     1 root     S     1424   2%   0% /usr/sbin/odhcpd
 5225     1 root     S     1360   2%   0% {dynamic_dns_upd} /bin/sh /usr/lib/dd
 5226     1 root     S     1360   2%   0% {dynamic_dns_upd} /bin/sh /usr/lib/dd
 4525     1 root     S     1360   2%   0% {dynamic_dns_upd} /bin/sh /usr/lib/dd
 1234     1 root     S     1252   2%   0% /sbin/vdsl_cpe_control -i10_00_10_00_
 1016     1 root     S     1224   2%   0% /sbin/logd -S 64
 2453  1167 root     S     1204   2%   0% /usr/sbin/pppd nodetach ipparam wan_d
 1911     1 fastd    S     1192   2%   0% /usr/bin/fastd --config - --daemon --
  500     1 root     S     1192   2%   0% /sbin/ubusd
 6709  6708 root     S     1188   2%   0% -ash
 1285     1 root     S     1188   2%   0% /usr/sbin/crond -f -c /etc/crontabs -

From the main hardware part: the FB have 128MB RAM instead 64MB, chipset+modem are the same.
From the software part: The Fritz!OS Linux uses both "cores" presumably (the FB 7490 do it)
It has no tapi.ko and no vmmc.ko but it has an 1,1 MByte isdn_fbox_fon5.ko on the soucecode is inside the /GPL/GPL-release_kernel/linux-3.10/drivers/isdn/isdn_fon5
some init files and emty makefiles but no C-source.
The FB 7490 have some other strange huge kernelmods:

kdsldmod.ko = 3,1MByte / isdn_fbox_fon5.ko = 1,1MByte / dsl_vr9.ko = 560kByte / capi_codec.ko = 544kByte / pcmlink.ko = 525kByte / avm_dect.ko = 484kByte

In the past i have an modem and a sepparate Telefon connection and everthing was fine, i enabled the modem and router only if i need the network.
But with VoIP it must be always enable.
I want an analogphone and i want LEDE, for this reason, if want to separate my network i choice:

1x O2-Box 6431 (or other Lantiq VRX200 device) for VDSL Modem
1x the other nice Lantiq VRX200 device: Easybox 904xDSL as mainrouter
1x O2-Box 6431 as ATA
I thing you can understand me that i want to do it with one device.


#30

Ah, you need to select layer_cake.qos which defaults to 3 traffic classes; to get four you should edit /usrlib/sqm/defaults.sh:
from:
[ -z "$INGRESS_CAKE_OPTS" ] && INGRESS_CAKE_OPTS="diffserv3"
[ -z "$EGRESS_CAKE_OPTS" ] && EGRESS_CAKE_OPTS="diffserv3"

to:
[ -z "$INGRESS_CAKE_OPTS" ] && INGRESS_CAKE_OPTS="diffserv4"
[ -z "$EGRESS_CAKE_OPTS" ] && EGRESS_CAKE_OPTS="diffserv4"

That will get you to the 4 traffic classes but you also need to add the following to /etc/config/sqm to make ingress also honor the DSCPs
option qdisc_advanced '1'
option qdisc_really_really_advanced '1'
option squash_dscp '0'
option squash_ingress '0'

Okay, the 0% idle and the 94% sirq is a clear indicator that your router does not have a powerful enough CPU
to do all the stuff you want it to do. Especially since at rest you see basically the inverse: 96% idle and 0% sirq.

So at least with the lede standard kernel this box does not seem capable enough for a 100/20 link like yours, which is a bit sad. Now, traffic shaping carries a huge cost, so maybe things look better without an active shaper? How do idle and sirq look for a speedtest without sqm? It is suffiecient to disable the sqm instance, either via the GUI or via the CLI ("/etc/init.d/sqm stop")?

Anyway here is a recommended /etc/config/sqm for you, as astarting point:
config queue
option debug_logging '0'
option verbosity '5'
option upload '20000'
option linklayer 'ethernet'
option overhead '34'
option linklayer_advanced '1'
option tcMTU '2047'
option tcTSIZE '128'
option tcMPU '64'
option qdisc_advanced '1'
option ingress_ecn 'ECN'
option egress_ecn 'NOECN'
option qdisc_really_really_advanced '1'
option squash_dscp '0'
option squash_ingress '0'
option download '60000'
option qdisc 'cake'
option script 'layer_cake.qos'
option interface 'pppoe-wan_dsl'
option linklayer_adaptation_mechanism 'cake'
option enabled '1'
option iqdisc_opts 'nat dual-dsthost ingress mpu 64'
option eqdisc_opts 'nat dual-srchost mpu 64'

Please note that sqm-scripts from June on will not require to specify the mpu explicitly in the [i|e]qdisc_opts, but should take the tcMPU value instead.


#31

It should be possible (untested) to reduce it to two devices, namely by letting one o2 box 6431 act as both modem and SIP ATA with a clever vlan configuration (e.g. dsl0.7 bridged with LAN1, asterisk and the management interface only available only on LAN2-4) - combined with a dedicated router, handling PPPoE, NAT and WLAN (WAN to LAN1 of the o2 6431, one of the LAN ports connected to one of LAN2-LAN4 of the o2 box 6431, to provide it with internet access for asterisk). Neither of those tasks (pure modem in bridge mode) or the SIP pbx should be too difficult for the VRX288 to handle, probably at close to 100 MBit/s.

For the dedicated router (especially if you want to do traffic shaping), lantiq is a bit too weak - and that's also a problem with your chosen solution (Easybox 904xDSL), which is more fancy than the o2 box 6431, but (SOC and I/O wise) not any faster than the o2 box 6431. A mt7621 (cheapest option, Xiaomi Mi 3g), ipq4018/ipq4019 (cheapest/ only option, AVM Fritz!Box 4040), ipq806x (Netgear r7800 or ZyXEL NBG6817) or mvebu (Linksys WRT1200AC or Linksys WRT3200ACM) device would be considerably more powerful for routing and traffic shaping tasks; top end ar71xx (e.g. TP-Link Archer C7v2 might also come close, but would be too expensive compared to the faster mt7621/ ipq40xx options available today).


#32

/usr/lib/sqm/defaults.sh:

/etc/config/sqm:

OK thanks this is helping, but it have an equal result:
http://www.dslreports.com/speedtest: 19/45

I already had that idea.
I rejected it.
Because it never reach the 100MBit/s and fear it will not reach the 95MBit/s because missed SMP support.
The second fear is that the switch a leak. (the try was for a long time and i can not exact say what i have do), And the switches of my Provider leak too.
Leak = i mean very few Packets go to somewhere.

When i do it my idea was to have an perfect Network like: DSL-Modem (VR9 with GBit-support) <-> Router (no idea which Model) <-> VoIP O2-Box or Easybox
Then there are the 2 RPis one for alarm system and one for somethings.
But for me the O2-Box is enought for me.
It is more because: i want a solution for 50MBit/s in general.

Only with LEDE not on OEM-Linuxes for example Speedport W921v, TP-Link etc.
Is there support for PPE (Protokoll Processor Engine) inside LEDE ?
see this thread

For the normal WLAN Router
Which SOC can you recommend ?


#33

ipq401x/ ipq8065, mvebu or mt7621 should all be able to cope easily with ~100 MBit/s, plus quite some margin on top.

ipq4019: AVM Fritz!Box 4040 (the only device using this SOC fully supported by LEDE so far)
ipq8065: e.g. Netgear r7800 or ZyXEL NBG6817 (both should be supported equally well under LEDE)
mvebu: e.g Linksys WRT1200AC or Linksys WRT3200ACM (the current hardware revision of the WRT3200ACM doesn't seem to be supported right now, but that should be solvable)
mt7621: e.g. Xiaomi Mi 3g, D-Link DIR-860L rev. B1 (not A1), AFoundry EW1200.

Either of these should deal with 100 MBit/s easily, including SQM. In terms of raw CPU performance, ipq8065 and mvebu should be the fastest - when it comes to routing performance, mt7621 and mvebu should be a bit faster; for SQM you need a mixture of both (but the 'faster routing performance' only matters for throughputs significantly above 300 MBit/s).

The cheapest options would be ipq401x or mt7621, the high(er) end ones ipq8065 or mvebu.
If you'd already own a top end ar71xx device (TP-Link Archer C7 rev2 (the newer revisions are also supported, but slower) or at least TP-Link TL-WDR3600, Netgear WNDR3800, etc.), you might be able to get them work sufficiently (but with only little safety margin). Buying those new today wouldn't make sense though, too expensive for what they can offer performance wise (barely able to cope with your requirements).

Personally I'm pretty happy with the ZyXEL NBG6817 as router on a 100/40 VDSL2/ vectoring connection (it's significantly faster than it would strictly need to be), with a lantiq device acting as pure modem and another lantiq device as VoIP pbx exclusively.


#34

Unfortunately that link does not seem to point to the results of your test, so I can not say much...


#35

OK here a Test again:

What is the meaning of Bufferbload ?
When i right understand was the reason for removing fifo_fast Bufferbload. Right ?
But what is it ?

For the moment to resolv the Problem i will try to use the 34Kc Arch instead of 24Kc it is minimal faster.
Or i try that SQM will only enable when a call comes in via Asterisk AGI script but this is complex.


#36

Well, bufferbloat is a name for the phenomenon that over-sized and under-managed buffers will introduce large and unwanted latency under load increases when a link is under load. Since latency/RTT determines how "snappy"/responsive a link behaves this added delay is quite bad for all interactive kind of uses, like gaming, VoIP, or even web browsing. Hos slreports exactly deines their bufferbloat rating I do not know, but they do offer all the raw data points so you can make your own assessment. A typical assessment is that for a provider supplied router on a 50/10 link you might see latency under load increase from around 50 to 300 ms (or even worse some users see multiple seconds worth of added delay); with proper bufferbloat mitigation (e.q.: sqm-scricpts simple.qos/fq_codel or piece_of_cake.qos/cake you might see more like 70 to 100ms worst case). Hope that helps.

I would guess that this, while in principle the right thing to do, will only gain you very little.

Not sure this is going to fly, as any use that saturates your link will cause latency under load sky-rocket and at least I want my router's to deal with those unexpected traffic patterns as well.

Personally, I accepted defeat and dedicated the bt homehub5a to be a bridged modem (with a great interface :wink: ) and do all of the router stuff (including pppoe and nat) on a secondary device; as that lantiq could not handle the load of everything I want to run concurrently. NOw more power to you if you get your box tp do all of the duties, and please post the steps you took so others (read me :wink: ) have a chance to try as well :wink: