Networking

Enterprise MikroTik & BDIX Traffic Optimization

Enterprise MikroTik & BDIX Traffic Optimization

I configured an enterprise MikroTik router so local BDIX traffic always gets priority — queues, firewall and QoS keep local content fast and guests safe.

BDIX TRAFFIC
Priority
INTL LINK
Uncongested
GUESTS
Isolated

The problem

In a Bangladeshi ISP network, BDIX (Bangladesh Internet Exchange) traffic — local content such as caching servers, local video and local services — shares the same links as international traffic. Without shaping, a few heavy users can slow local content for everyone.

How it works — in three steps

Step 1 — Mark BDIX traffic with mangle

BDIX destinations are collected in an address list. Mangle rules mark connections to those destinations, then mark their packets — so the queues can recognise them.

/ip firewall address-list
add list=BDIX address=203.0.113.0/24 comment="BDIX destinations (example)"

/ip firewall mangle
add chain=prerouting dst-address-list=BDIX action=mark-connection \
    new-connection-mark=bdix-con passthrough=yes comment="Mark BDIX connections"
add chain=prerouting connection-mark=bdix-con action=mark-packet \
    new-packet-mark=bdix-pkt passthrough=no comment="Mark BDIX packets"

Step 2 — Prioritize BDIX with a queue tree

A queue tree on the WAN interface gives BDIX packets priority 1 and a guaranteed share of the link, while everything else shares what is left.

/queue tree
add name=bdix-queue parent=ether1-WAN packet-mark=bdix-pkt \
    limit-at=20M max-limit=80M priority=1 comment="BDIX priority lane"
add name=other-queue parent=ether1-WAN packet-mark=no-mark \
    limit-at=5M max-limit=80M priority=8 comment="Everything else"

Step 3 — Cap each customer with simple queues

Queue trees shape traffic classes, not users. Simple queues stop one customer from taking everything.

/queue simple
add name=customer-01 target=192.168.10.10/32 max-limit=20M/20M \
    comment="Per-customer cap"

Check that it works

Open Queues in WinBox and watch the BDIX queue: its rate should rise when local content is used, and its dropped-packet counter should stay near zero. Run a speed test to a BDIX host and to an international host at the same time — BDIX should stay fast.

What to avoid

Never shape on the LAN interface by mistake — queues belong on the WAN-facing interface. Never use an outdated BDIX address list; a stale list silently stops marking. Always export a backup before changing queues (/export).

Result

Local BDIX content stays fast even at peak hours, international traffic is shared fairly, and no single user can congest the link.

Related reading: Optimizing MikroTik BDIX Bandwidth & Queue Management

Project files