Scenario # 1
We have created 512k service for the users, In late night, our bandwidth is usually not much used because only limited number of users uses the internet in late timings. Therefore we want to increase users bandwidth from 512k to 1mb automatically in night 12:00am till 12:00pm
we will divide this article in three sections.
1) Mikrotik Section (For Adding API):
2) Radius Manager Section (For Adding API):
3) Adding Service & Plan in Radius Manager:
Mikrotik Section (For Adding API):
We have to first configure API both in Mikrotik & DMASOFTLAB RM Panel.
Goto IP > Services & enable API service.
As showed in the image below . . .
Now create API user so it can be used by RM to connect to MT.
Goto SYSTEM > USERS and add new user by click on + icon.
User name = api
Password = api (or anything else)
As showed in the image below . . .
Radius Manager Section (For Adding API):
Open Radius Manager Admin Panel,
Goto NAS > LIST NAS
Select your Mikrotik NAS
Click on ENABLE MIKROTIK API
Define API user name & Password that we added in mikrotik section.
As showed in the image below . . .
Adding Service & Plan in Radius Manager:
First Create a normal service profile (512k) using Radius Manager Admin Panel.
As showed in the image below . . .
Now Click on EDIT button on Special Bandwidth Periods section at the bottom of the page . . .
As showed in the image below . . .
.
Now click on NEW PERIOD
As showed in the image below . . .
Enter your desired timings (in this example I used night 12 till day 12) in which you want to allow excess/reduced bandwidth. After done, click on ADD PERIOD
As showed in the image below . . .
After You see the new Special Bandwidth Periods close this popup window.
As showed in the image below . . .
Click on the UPDATE SERVICE on main service window.
Now create any user and test it by modifying timings (for test or quick results)
As showed in the image below . . .
Important Note: [updated as of Year 2016]
DMA 4.1.x change on the fly
may not work with ver 6.30 or above. so try this with 6.29 first.
Regard’s
Syed Jahanzaib
do you have any idea to block or limit the no. of connections in torrent via dma or mikrotik.
LikeLike
Comment by tamilmaran — November 20, 2012 @ 9:26 PM
thanks thanks
LikeLike
Comment by jackobarca — November 21, 2012 @ 1:35 AM
Thank you for useful information. I wonder if it is possible to change the period/timing of staring/ending of used service. Namely, after ending service time which is in the case at 00:00 h, the client is not able to call us for extension of period at the contact phone due to working hours. It is possible to change starting and ending time of services from 00:00 h and to be changed for example to 08:00 h. By the way I am using Radius Manager v4. Thanks.
LikeLike
Comment by Elvir — November 21, 2012 @ 1:39 AM
Excellent… Kindly this procedure define for userman users.
LikeLike
Comment by ABBAS — November 21, 2012 @ 9:45 AM
USERMAN does not provide bandwidth change on the fly for day and night bandwidth.
However you can follow the below guide to fulfill your goal. Donot set bandwidth limit in USERMAN. Only define ip pool for multiple sets of users like 256k, 512k and 1m,
Shape the bandwidth on miktoik, and then schedule to have change on given timings.
Follow this
http://wiki.mikrotik.com/wiki/Limit_different_bandwidth_in_day_and_night_for_different_users
LikeLiked by 1 person
Comment by Syed Jahanzaib / Pinochio~:) — November 21, 2012 @ 3:52 PM
gud …. thanx
LikeLike
Comment by Mukesh Kumar — November 28, 2012 @ 2:33 PM
excellent thanks
LikeLike
Comment by ramaprasad — November 29, 2012 @ 5:30 PM
how to take rm users,nas,services,managers and whole backup..how to install another new server
please help me
LikeLike
Comment by ramaprasad — November 29, 2012 @ 5:31 PM
Backup all the folders, including /boot /etc /home /root /usr/local /var/www /var/lib/mysql /var/spool/mail
If you want to migrate or change the system, just re.install Linux, install RM, and copy the data in there respective folder. restore the DB via SQL.
Test this . . .
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — November 30, 2012 @ 9:03 AM
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — November 30, 2012 @ 4:22 PM
[…] https://aacable.wordpress.com/2012/11/20/dmasoftlab-radius-manager-different-bandwidth-for-day-night/ […]
LikeLike
Pingback by Howto setup Mini ISP using Mikrotik as PPPoE Server + DMASOFTLAB Radius Manager Scratch Card Billing System+ Linux Transparent Firewall Bridge + Ubuntu SQUID 2.7 Proxy Server « Syed Jahanzaib Personnel Blog to Share Knowledge ! — December 28, 2012 @ 8:44 AM
its working in radius 4.0v but not in 3.9v any suggestion?
thanks
LikeLike
Comment by fajja — December 29, 2012 @ 10:08 PM
It do work with 3.9 as well. You have to configure api settings in Mikrotik and RM NAS as well.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — December 30, 2012 @ 9:31 PM
I am using RM 4. My Mikrotik NAS 5.22, bandwidth not chaging if user already loged in. I mean it not chaning on fly mode.
LikeLike
Comment by venkat — February 4, 2013 @ 5:20 PM
is it pppoe or hotspot client?
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — February 5, 2013 @ 6:15 PM
I’m having the same problem, not working on the fly. It’s pppoe…
LikeLike
Comment by Gorco — September 1, 2013 @ 2:48 AM
Mikrotik does not support COA for pppoe. it only support POD (packet of disconnection/death) so user will be disconnect and when reconnect he will get new package
only hotspot support COA.
COA = change of authorization
However you can create script to change the bandwidth plan using pcq or some other simple queues.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — September 1, 2013 @ 8:35 AM
Hey everyone
I am trying to configure two basic services in DMA Radius Manager(A – Capped, B – Uncapped).
Both services must run for 30 days from the date the client makes the purchase, and then expiry. For A I want to limit the total traffic transfer by the number of Gigs used, and for B there is no limit on the data usage. Both services are prepaid, and must be allowed to be bought through my payment gateway.
Does anyone have an example of how to set this up in DMA Radius Manager, I have been trying for weeks now! And the support at DMA Radius Manager is REALLY BAD!!!
LikeLike
Comment by Sigma721 — August 24, 2013 @ 8:32 PM
What is the issue in creating these simple services.
For service A, simply implement Limit Total Download OR Limit Download bytes, and define its quota
For service B, implement only Limit Expiration.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — August 26, 2013 @ 9:18 AM
Hi Syed
Can you please help me with special accounting. I want to creat a package with 100Gig cap. But only 25Gig is allowed to be used between 6am and 10pm. The rest of the 75% can be used between 10pm and 6am. Is this possible in special accounting? I figured setting up one interval to use download and upload ratio at 25% between 6am and 10pm. Will this work? What will happen when client reach their 25gig during the day period? Will you be able to top up the 25%?
Any help will be greatly appreciated!
Kind regards,
Riaan
LikeLike
Comment by Riaan Griesel — February 25, 2015 @ 9:00 PM
Riaan, I am also looking for a night time data package and how to setup
LikeLike
Comment by Justin — June 28, 2016 @ 2:13 AM
Salam Syed Bhai,
Thanks for the article. Can you please explain how can we create a time based packages in DMA Radius? For e.g 21:00 to 23:59:59 nigh package. I don’t think so we can create time based packages in Dmasoftlab Radius Manager because of software limitations. May be I am wrong so please guide us.
regards
Zia
LikeLike
Comment by Zia — March 7, 2015 @ 2:16 AM
Hi,
I followed exactly the same tutorial. But the bandwidth is not changing based on time..
1. API Service enabled @ port 8728
2. User api created with full permission and allowed from all IP.
3. Disonnection method selected as Remote in RM.
4. API user details provided in NAS Config in RM.
5. Mikrotik logs shows api log in and log out from RM IP Address.
Am I missing something?
LikeLike
Comment by srijitb — January 4, 2016 @ 10:50 AM
some mikrotik versions have this specific bug. try to change ROS version.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — January 28, 2016 @ 10:45 AM
i have same problem, i have router os 6.32.2 so i should upgrade it or downgrade?
LikeLike
Comment by keval — July 8, 2016 @ 9:15 PM
Downgrade to 6.29
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — July 11, 2016 @ 8:30 AM
is it work with 6.37 or i have to dodwngrade
LikeLike
Comment by ZEYAD HAMOODI — November 3, 2016 @ 9:11 PM
DMA 4.1.5 `change on the fly` may not work with Mikrotik RouterOS ver 6.30 or above.
Try with 6.29
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — November 4, 2016 @ 4:59 PM
I am having a problem, a while ago my radius database has crashed i fixed it, but the accounts speed isnt changing between days and night unless i disconnect the user
LikeLike
Comment by Ali daher — December 31, 2016 @ 5:20 PM
it’s possible to decode radius manager any php file ?
LikeLike
Comment by Cyber Networks — December 8, 2017 @ 3:23 PM
Yes.
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — December 8, 2017 @ 4:56 PM
how?
LikeLike
Comment by Wuilliams Hernandez — April 22, 2020 @ 7:54 AM
will it work with pppoe clients??
LikeLike
Comment by zain — September 4, 2018 @ 10:06 AM
yes
LikeLike
Comment by Syed Jahanzaib / Pinochio~:) — September 7, 2018 @ 1:20 PM
Hello Sir thanks for useful information. is it possible to create plan with login timeout and idle timeout session disconnect?Thank you
LikeLike
Comment by rajveer singh — September 27, 2021 @ 8:16 PM