Skip to main content

Custom Overhead Profiles

Creating custom CAKE overhead profiles for accurate traffic shaping.

Overview​

CAKE uses overhead values to accurately calculate transmission time. Different encapsulations require different overhead values.

Overhead Calculation​

Transmission time = (Packet Size + Overhead) / Bandwidth

Example:

  • Packet: 1500 bytes
  • Overhead: 34 bytes
  • Bandwidth: 100Mbit
  • Transmission Time = (1500 + 34) / 100Mbit = 122.72 µs

Built-in Profiles​

PPPoE over Ethernet​

pppoe_ethernet:
overhead: 34
mpu: 64

Breakdown:

  • Ethernet: 14 bytes
  • PPPoE: 6 bytes
  • PPP: 2 bytes
  • IP: 20 bytes
  • FCS: 4 bytes
  • Total: 46 bytes (rounded to 34)

IPoE over Ethernet​

ipoe_ethernet:
overhead: 22
mpu: 64

Breakdown:

  • Ethernet: 14 bytes
  • VLAN: 4 bytes
  • FCS: 4 bytes
  • Total: 22 bytes

PPPoE over QinQ​

pppoe_qinq:
overhead: 38
mpu: 64

Breakdown:

  • Ethernet: 14 bytes
  • Outer VLAN: 4 bytes
  • Inner VLAN: 4 bytes
  • PPPoE: 6 bytes
  • PPP: 2 bytes
  • IP: 20 bytes
  • FCS: 4 bytes
  • Total: 54 bytes (rounded to 38)

Custom Profiles​

Define Custom Profile​

qos:
overhead_profiles:
custom_profile:
overhead: 50
mpu: 64

Assign to Subscriber​

Via RADIUS:

Athena-Overhead-Profile = "custom_profile"

Calculating Overhead​

Step 1: Identify Encapsulation​

What layers are between subscriber and upstream?

Subscriber → Ethernet → VLAN → PPPoE → IP → Upstream

Step 2: Sum Layer Sizes​

LayerSize
Ethernet14 bytes
VLAN (per tag)4 bytes
PPPoE6 bytes
PPP2 bytes
IP20 bytes
FCS4 bytes

Step 3: Calculate Total​

14 + 4 + 6 + 2 + 20 + 4 = 50 bytes

Step 4: Round Down​

Use 50 (or round to nearest 2: 50).

Testing Overhead​

Measure Actual Rate​

Use iperf to measure actual throughput:

# From subscriber
iperf -c <bng-ip> -t 10 -R

Compare to Expected​

If actual rate is consistently lower than configured:

  • Increase overhead
  • Re-test

If actual rate is consistently higher:

  • Decrease overhead
  • Re-test

Example​

Configured: 100Mbit with overhead 34 Actual: 95Mbit

Solution: Increase overhead to 40 and re-test.

Advanced Profiles​

High latency, high overhead:

satellite:
overhead: 100
mpu: 256

Mobile Network​

Variable overhead:

mobile:
overhead: 60
mpu: 128

Wireless​

High overhead due to retransmissions:

wireless:
overhead: 80
mpu: 128

Monitoring​

View Overhead Profile​

abng> show configuration | match overhead_profiles

Check CAKE Stats​

tc -s qdisc show dev ppp0

Monitor Rate Accuracy​

iperf -c <subscriber-ip> -t 10

Best Practices​

  1. Measure First — Test actual overhead before deploying
  2. Document — Document custom profiles and reasoning
  3. Test — Test with iperf to verify accuracy
  4. Monitor — Monitor CAKE stats for congestion
  5. Adjust — Fine-tune overhead based on actual measurements

Next Steps​