Configuring SQM QoS with DS-Lite

Hello,

I'm trying to find good settings for my SQM QoS profile; looking at the doc and info all over Internet (including this forum) but I still have some questions. I hope someone can help me!

Some background information about my environment:

I used to connect with PPPoE (username/password) but recently I've been upgraded to IPoE (not totally sure if this mean I'm not using PPPoE anymore? Anyway I don't need to enter my username and password anymore).

To connect with IPoE, I am using DS-Lite with a peer address given by my ISP. My connection is VDSL (max 100Mb/s but fortunately I often have around 80Mb/s).

The current DS-Lite settings is shown below:

config interface 'wan'
        option proto 'dslite'
        option encaplimit 'ignore'
        option peeraddr '[redacted]'
        option ipv6 '1'
        option metric '10'

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'

As for SQM QoS, I've settled on the settings below:

config queue 'eth1'
        option qdisc_advanced '0'
        option debug_logging '0'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option enabled '1'
        option download '52400'
        option upload '79800'
        option verbosity '10'
        option interface 'eth1'
        option linklayer 'ethernet'
        option overhead '26'

Here are my questions:

  1. I am using eth1 (wan) but this interface is only a bridge for DS-Lite; when using DS-Lite, should I change it to eth0 or should I create a second setting for eth0?

  2. Which value should I use for "Per Packet Overhead"?

According to OpenWrt docs, it says "[...] 34 (or 26 if you know you are not using PPPoE)" which I think I am not using (anymore) since I am using IPoE. On the other hand, the SQM Details docs also states "[...] ipv4 provided over ipv6 in the DS-Lite scheme (where ipv4 packets experience a 40 byte ipv6 header overhead)".

I'm not sure I understand this last sentence: is the 40 byte in addition to my setting or is it the setting I should be using?

Here are more detailed information about my box and settings:

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 mq 0: dev eth0 root 
 Sent 3775902814 bytes 10443846 pkt (dropped 3, overlimits 0 requeues 34632) 
 backlog 0b 0p requeues 34632
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb 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 eth0 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb 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 eth0 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb 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 eth0 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb 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 eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb 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 eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb 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 eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb 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 eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 3775902814 bytes 10443846 pkt (dropped 3, overlimits 0 requeues 34632) 
 backlog 0b 0p requeues 34632
  maxpacket 69368 drop_overlimit 0 new_flow_count 68732 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc cake 8019: dev eth1 root refcnt 9 bandwidth 79833Kbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 26 
 Sent 6126294969 bytes 6059955 pkt (dropped 1, overlimits 3023390 requeues 21) 
 backlog 0b 0p requeues 21
 memory used: 61824b of 4Mb
 capacity estimate: 79833Kbit
 min/max network layer size:            6 /    1500
 min/max overhead-adjusted size:       32 /    1526
 average network hdr offset:           22

                  Tin 0
  thresh      79833Kbit
  target          5.0ms
  interval      100.0ms
  pk_delay         46us
  av_delay         18us
  sp_delay          6us
  backlog            0b
  pkts          6059956
  bytes      6126296491
  way_inds       538137
  way_miss         2591
  way_cols            0
  drops               1
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len         12176
  quantum          1514

qdisc ingress ffff: dev eth1 parent ffff:fff1 ---------------- 
 Sent 371417454 bytes 4406908 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan4 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-guest_turris root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 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 ds-wan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 801a: dev ifb4eth1 root refcnt 2 bandwidth 52418Kbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 26 
 Sent 433112644 bytes 4406907 pkt (dropped 1, overlimits 218175 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 69120b of 4Mb
 capacity estimate: 52418Kbit
 min/max network layer size:           54 /    1508
 min/max overhead-adjusted size:       80 /    1534
 average network hdr offset:           14

                  Tin 0
  thresh      52418Kbit
  target          5.0ms
  interval      100.0ms
  pk_delay        389us
  av_delay         67us
  sp_delay          7us
  backlog            0b
  pkts          4406908
  bytes       433114166
  way_inds            0
  way_miss            1
  way_cols            0
  drops               1
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            1
  un_flows            0
  max_len          1522
  quantum          1514

qdisc noqueue 0: dev wlan0 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc mq 0: dev wlan1 root 
 Sent 51180865 bytes 46156 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan1 parent :4 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 6163 bytes 36 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 wlan1 parent :3 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 1109985 bytes 1164 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 wlan1 parent :2 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 50064717 bytes 44956 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 91 drop_overlimit 0 new_flow_count 2 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :1 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb 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 noqueue 0: dev guest_turris_0 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0

tc -d qdisc

qdisc noqueue 0: dev lo root refcnt 2 
qdisc mq 0: dev eth0 root 
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc cake 8019: dev eth1 root refcnt 9 bandwidth 79833Kbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 26 
qdisc ingress ffff: dev eth1 parent ffff:fff1 ---------------- 
qdisc noqueue 0: dev lan1 root refcnt 2 
qdisc noqueue 0: dev lan2 root refcnt 2 
qdisc noqueue 0: dev lan3 root refcnt 2 
qdisc noqueue 0: dev lan4 root refcnt 2 
qdisc noqueue 0: dev br-guest_turris root refcnt 2 
qdisc noqueue 0: dev br-lan root refcnt 2 
qdisc noqueue 0: dev ds-wan root refcnt 2 
qdisc cake 801a: dev ifb4eth1 root refcnt 2 bandwidth 52418Kbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 26 
qdisc noqueue 0: dev wlan0 root refcnt 2 
qdisc mq 0: dev wlan1 root 
qdisc fq_codel 0: dev wlan1 parent :4 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev wlan1 parent :3 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev wlan1 parent :2 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc fq_codel 0: dev wlan1 parent :1 limit 10240p flows 1024 quantum 1614 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
qdisc noqueue 0: dev guest_turris_0 root refcnt 2

ifstatus wan

{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 118982,
	"l3_device": "ds-wan",
	"proto": "dslite",
	"updated": [
		"addresses",
		"routes",
		"data"
	],
	"metric": 10,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		{
			"address": "192.0.0.2",
			"mask": 32,
			"ptpaddress": "192.0.0.1"
		}
	],
	"ipv6-address": [
		
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "0.0.0.0",
			"mask": 0,
			"nexthop": "0.0.0.0",
			"source": "0.0.0.0/0"
		}
	],
	"dns-server": [
		
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"firewall": [
			{
				"type": "nat",
				"target": "ACCEPT"
			}
		]
	}
}

ifstatus wan6


	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 119025,
	"l3_device": "eth0",
	"proto": "dhcpv6",
	"device": "eth0",
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "[redacted]",
			"mask": 64,
			"preferred": 604757,
			"valid": 2591957
		}
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "[redacted]",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"valid": 2591957,
			"source": "::/0"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "[redacted]",
			"metric": 512,
			"valid": 1757,
			"source": "[redacted]"
		}
	],
	"dns-server": [
		"[redacted]",
		"[redacted]"
	],
	"dns-search": [
		"[redacted]",
		"[redacted]"
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "[redacted]"
	}
}

Thank you for your help!

Sorry to revive an old post but anyone knowledgeable about SQM QoS have an idea?

DSlite adds an additional 40bytes so you probably want around 74 bytes total +-

Thank you for your answer! I'll try 74.

Do you happen to know if you need two SQM settings with DS-Lite or if only one is enough?