VDSL2 overheads and CAKE

I have been experimenting with using CAKE and traffic shaping on my Linux router to eliminate bufferbloat on my Internet connection. My local network links are mostly 1 Gbps, including the link between my router and VDSL2 modem. The modem is configured in bridge mode and syncs reliably at an upsteam rate of 19,999 kbps.

In order for CAKE to ensure that the flow of outbound traffic won’t exceed the link rate, it needs to be told what that maximum link rate is and what the per-packet overhead will be due the encapsualtion used on that link.

VDSL2 transports Ethernet frames using Packet Transfer Mode (PTM) with a 64/65 octet encapsulation. This means that every 65th byte is a control byte rather than a payload byte. This overhead can be easily accounted for by reducing the line rate accordingly: 19,999 kbps × 64 ÷ 65 = 19,691 kbps.

Finding clear information on the per-packet overheads was more difficult. The following table shows what I think the overheads are when encapsulating an IP packet over this VDSL link.

PPPProtocol ID22
PPPoEVersion & Type16
Session ID2
EthernetMAC destination622
MAC source6
VLAN tag4
PTMStart of frame (S)14
End of frame (Ck)1
Grand total34

My ISP (AAISP) uses PPPoE which introduces 8 bytes of overhead. Then there are the standard Ethernet headers with the addition of a 4-byte VLAN tag (101) injected by the modem. Finally, there are an additional 4-bytes to transfer the Ethernet frame using PTM.

A total additional overhead of 34 bytes seems to agree with the corresponding keyword options in tc-cake, which gives me some confidence. The pppoe-ptm option equates to 30 bytes overhead and ether-vlan to an additional 4 bytes. I have also used the noatm option to disable compensation for the 64/65 octet encoding, as this has already been accounted for by calculating a reduction in the line rate (bandwidth).

The command to configure CAKE on my wan interface (renamed from eth1) is:

tc qdisc replace root dev wan cake bandwidth 19691kbit pppoe-ptm ether-vlan noatm

It seems to be performing well on DSLReports’ bufferbloat test. Latency increases by less than 5 ms when the upload is fully saturated at 20 Mbps.


Your email address will not be published. I need it to send you a verification link. It will also be sent to Gravatar to check if you have one.


Do you know what the overheads are for Sky superfast broadband? I'm trying to setup SQM on my router but I can't find the correct settings.

Alasdair Smith

I believe that Sky use IP directly over Ethernet (IPoE) and DHCP with option 61 / client ID to assign IP addresses. PPP/PPPoE is not involved so you can exclude those 8 bytes from the table above, which would leave a total of 26 bytes additional per-packet overhead.

That equates to the bridged-ptm plus ether-vlan options in tc-cake. So the command would be something like this instead:

tc qdisc replace root dev wan cake bandwidth 19691kbit bridged-ptm ether-vlan noatm