Skip to content

Plans and shaping

A plan is a name with a download and an upload speed in Mbit/s.

Terminal window
dtvsol plans list
dtvsol plans add plan_100_50 100 50 "100/50 residential"
dtvsol plans del plan_100_50

Adding a plan with a name that exists updates its speeds. Every client or service on it follows.

Services are limited on the OLT. Each plan becomes a line profile, a DBA profile and rate tables on every registered OLT, with a small headroom above the plan (olt_car_headroom in /opt/dtvsol/etc/config.php). The router pushes the plans to the OLTs every 15 minutes and after every plan change. See OLTs.

Clients (MAC-based) are limited on the router with Linux tc HTB: download on the client’s VLAN, upload on a mirror of the VLAN’s incoming traffic. A client with no plan, or with a plan that does not exist, is not limited (line rate).

A service names a plan, or gives the speeds:

Terminal window
dtvsol service add <sn> --name "Example Customer" --down 300 --up 300 …

--down 300 --up 300 uses plan_300_300, and creates it if it is missing. Change a service’s plan:

Terminal window
dtvsol service set C-0001 --plan plan_500_500

The ONT moves to the new profile on the OLT. The customer sees a few seconds of interruption.

Terminal window
dtvsol clients plan AA:BB:CC:DD:EE:FF plan_100_50
dtvsol clients plan AA:BB:CC:DD:EE:FF none # unlimited

A MikroTik-style billing that sets a queue or a lease rate limit through MK-api gets a plan made for it automatically, named mk_<down>m_<up>m.

Terminal window
dtvsol service suspend C-0001
dtvsol service resume C-0001
dtvsol clients suspend AA:BB:CC:DD:EE:FF
dtvsol clients resume AA:BB:CC:DD:EE:FF

A suspended service’s ONT is deactivated on the OLT and its address blocked on the router. A suspended client’s traffic is dropped in both directions on the router. Suspensions survive reboots.

Give a service or a client an end date. On that date the router suspends it by itself. When the billing pushes a later date, the router resumes it.

Terminal window
dtvsol service set C-0001 --expires 2026-12-31
dtvsol clients expires AA:BB:CC:DD:EE:FF 2026-12-31
dtvsol clients expires AA:BB:CC:DD:EE:FF never

End dates are checked every 5 minutes.

Terminal window
dtvsol graph AA:BB:CC:DD:EE:FF week
dtvsol graph bond0 day /tmp/uplink.png
dtvsol service graph C-0001 month