Most CAKE guides assume a plain Ethernet uplink, but GPON works just as transparently — so you can treat it like a normal Linux CAKE setup.
The Issue
┌───────────────────┐
│ Customer Router │
│ (PPPoE Client) │
└───────┬───────────┘
│ PPPoE over Ethernet / GPON / XGSPON
▼
┌───────────────────┐
│ ISP Access NW │
│ (OLT / Switch) │
└───────┬───────────┘
│
▼
┌───────────────────┐
│ ISP BNG │
│ (PPPoE Server) │
└───────────────────┘
Normal Operation:
────────────────────────────────────────────────────────────
[Client] --- PPP Echo Request ---> [BNG]
[Client] <--- PPP Echo Reply ----- [BNG]
(Session stays alive)
When Problem Happens:
────────────────────────────────────────────────────────────
[Client] --- PPP Echo Request ---> X (Lost in network)
[Client] ............................ (No reply)
BNG times out, sends PPP Terminate to client:
[BNG] --- PPP Terminate Req ---> X (Lost in network)
Client never gets terminate request,
TX queue starts to drop, session "hangs"
until client manually or automatically reconnects.
Why This Matters
My ISP enforces a strict PPPoE session policy. If PPP Echo packets get lost somewhere, their PPPoE AC will disconnect the session. The client won’t immediately receive a Terminate Request, so the session hangs for a few seconds and TX queues start to drop until the PPPoE client reconnects.
This can momentarily halt your internet, which is unacceptable for latency-sensitive tasks.
The Fix: Apply CAKE on the Parent Interface
Instead of relying on the default only-hardware-queue
(which blindly sends packets without knowing which ones are critical), put CAKE directly on the parent interface.
- This ensures high-priority packets like PPP Echo, TCP ACKs, and pings don’t get dropped.
- It’s more effective than using an egress limit on a switch port — but you can use both for granular TX control.
Tip:
If your router supports egress shaping at the switch level, set the GPON upload egress limit to 1244 Mbit/s.
Step 1 — Fix Mikrotik’s Hardware Queue
MikroTik’s default hardware queue isn’t great for fairness or packet prioritization.
We’ll replace it with mq_pfifo
to help reduce LAN TX drops:
/queue type add name=multi-queue-ethernet kind=mq-pfifo mq-pfifo-limit=1000
/queue interface set [ find default-queue=only-hardware-queue ] queue=multi-queue-ethernet
Step 2 — Add CAKE for GPON ONU
This CAKE config is tuned for a 1.2 Gbps GPON uplink:
/queue type add name=cake-gpon-onu kind=cake \
cake-bandwidth=1200M cake-overhead=50 cake-mpu=84 \
cake-rtt=300 cake-rtt-scheme=oceanic \
cake-diffserv=diffserv8 cake-flowmode=triple-isolate \
cake-ack-filter=aggressive cake-wash=yes cake-memlimit=33554432
If you have a GPON OLT stick running in 2.5 G mode:
/queue type add name=cake-gpon-olt kind=cake \
cake-bandwidth=2400M cake-overhead=50 cake-mpu=84 \
cake-rtt=100 cake-rtt-scheme=internet \
cake-diffserv=diffserv8 cake-flowmode=triple-isolate \
cake-ack-filter=aggressive cake-wash=yes cake-memlimit=33554432
Parameter Notes
- Overhead (50 bytes) → Includes IFG, preamble, CRC, VLAN, and PPPoE.
- MPU (84 bytes) → Keeps small packets (PPPoE discovery, ping, TCP ACK) from being dropped — crucial for PPP Echo stability.
- RTT (300 ms) → Matches long-haul latency (e.g., Europe ↔ Singapore).
- diffserv8 → Gives detailed classification — Network Control (BGP, routing updates, PPP Echo) gets top priority.
diffserv8 Classification
Priority | DSCP | Value | Typical Use |
---|---|---|---|
2 | CS6 | 48 | Network control (BGP, OSPF, PPP Echo, ICMP) |
3 | EF | 46 | Real-time voice (VoIP, SIP RTP) |
4 | AF41 | 34 | Video conferencing / interactive video |
5 | AF31 | 26 | Streaming video / high-priority data |
6 | AF21 | 18 | Bulk interactive (gaming, SSH) |
7 | AF11 | 10 | Standard data / normal web traffic |
8 | BE | 0 | Best effort / VPN / Wireguard / background sync / torrents |
The Priority
1
mainly internal ISP/IX, and ISP ignore such marking
Step 3 — Apply CAKE to the WAN Interface
Finally, put CAKE on your GPON WAN port:
/queue interface set sfp-sfpplus1 queue=cake-gpon-onu
It should look like this



Result
Great for routers without a switch chip — keeps 2 Gbps GPON + PPPoE rock-solid.
Smooth, stable PPPoE sessions.
No random session drops from missed PPP Echo packets.