Community discussions

MikroTik App
 
User avatar
krigevr
Member Candidate
Member Candidate
Topic Author
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Interim-Update ..?!

Sat May 03, 2008 2:25 am

Howdy.

I'm looking for a solution to terminate an active accounting session, which is associated with a PPPoE session, without actually killing the PPPoE session. Testing environment is an RB532 running PPPoE Server and User Manager.

Under /tool user-manager session, I am able to remove a current active session, which doesn't affect the PPPoE link. When I shut down the PPPoE link, User Manager gets updated with the FULL session information again. Which is fair, I guess.

I have two problems.

I can not reset the current session's counters to Zero, whilst keeping my PPPoE session open.
But by this I mean that the only information that may be logged (or re-logged) once the pppoe session is eventually closed, is the accounting information obtained AFTER this reset was done. Is this possible?

My second problem is that Mikrotik does not seem to interpret Interim Update information.
I have observed an active pppoe / accounting session on Mikrotik / User Manager, with upload/download counters of Zero. Now, with an interim-update under /ppp/aaa set to 1 minute, one would assume that these figures must increase. It does not.
It only increases once I terminated the PPPoE session.

I have tested this against FreeRadius by simply directing my /radius entry from the User Manager to the Freeradius, thus not affecting any other settings. Freeradius interprets the Interim Updates correctly. UserManager doesn't at all. Either this is a bug, or I am not looking in the right place. Where is the interim accounting information stored in User Manager or Mikrotik?

Thanks.

-Krige
 
Cobusbu
newbie
Posts: 43
Joined: Fri Jan 04, 2008 9:20 am
Location: Cape Town, South Africa

Re: Interim-Update ..?!

Sun May 04, 2008 11:19 pm

Hi Krige

I am currently experiencing the same problem with User Manager. I have a script running every 6 hours pulling the total bytes used from User Manager. The same script writes back into the rate limit table of User Manager,depending upon the amount of bytes used by each client. But I have to disconnect all the PPPoE sessions first in order that User Manager is updated with the latest accounting info and I have to disconnect it within 10 seconds for a second time in order for the rate limits to be applied to the router(s). My customers have a problem with this.

Maybe we can work together in finding a solution.

Regards,

Cobus

Cape Town
 
User avatar
krigevr
Member Candidate
Member Candidate
Topic Author
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Interim-Update ..?!

Mon May 05, 2008 12:23 am

Hi Cobus

I've got two other users - one of which is using my script, with the same problem.
While exploring the options on User Manager, I'm also slowly developing a FreeRadius solution. Also thinking about selling realms on my Radius server (which is in Cape Town) to other WISPs, and let them use my PHP thingy that I'm developing.

At present, the only solution to the problem is severing all active PPPoE sessions, and waiting that split seccie or two for Mikrotik to update User Manager (or whatever Accounting system you're using.)

I've got two working FreeRadius servers if you would like a testing ground for some of your problems and solutions - Neither is currently being used in active duty.

Feel free to contact me with any questions or comments.
I'll gladly accept any help I can get with solving this issue, and/or developing a wholly new solution that can address all the issues, particularly those surrounding User Manager's shortcomings, which I have only partly been able to circumvent in my Automated Billing script.
http://wiki.mikrotik.com/wiki/AutomatedBilling - For your reference.

Thanks for your response.

-Krige
 
Cobusbu
newbie
Posts: 43
Joined: Fri Jan 04, 2008 9:20 am
Location: Cape Town, South Africa

Re: Interim-Update ..?!

Mon May 05, 2008 9:57 am

Hi Krige

Thanks for your response.

What I would like to establish, is if other radius managers will resolve the problem, i.e do the bytes upload -and download counters increase at the predetermined interim update interval and do the dynamic queues active on the remote router(s) automatically change according to the changes in the radius manager, without having to disconnect the client's active PPPoE sessions.

In other words the radius server must be able to change rate limits on the routers on-the-fly.

Unfortunately I do not have access at the moment to a Linux machine with Freeradius on it to test it for myself, as I am currently monitoring my network (via Winbox and User-Manager) from a Windows machine.

Have you tested this with Freeradius to see the effect?

I'm aware of another commercial package available from
http://www.radius-manager.com which might be worthwhile exploring.

Please advise

Regards,

Cobus
 
User avatar
krigevr
Member Candidate
Member Candidate
Topic Author
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Interim-Update ..?!

Wed May 07, 2008 1:05 pm

What I would like to establish, is if other radius managers will resolve the problem, i.e do the bytes upload -and download counters increase at the predetermined interim update interval and do the dynamic queues active on the remote router(s) automatically change according to the changes in the radius manager, without having to disconnect the client's active PPPoE sessions.
I'm attempting to establish the same thing.
So far my effors have not yielded any results.

I have a FreeRadius server as a testing environment, if you wish to access it and perform tests there. It's just a machine sitting in my apartment on a Net connection which I'm using to play around with.

As far as I can establish, the Acct-Input-Octets and Acct-Output-Octets under FreeRadius gets properly updated with Interim-Update, so your current data is up-to-date under FreeRadius, which makes a scenario like yours, where you want to hard- (or soft) cap someone immediately upon reaching a certain troughput level, a viable prospect.

Also, as far as I derive the Accounting-Response attributes, it is possible to terminate an accounting session, whilst letting the PPPoE connection remain open. The whole issue I"m faced with, is that Mikrotik can't do that with User Manager and Scripts. So yes, this is possible. However, whether it is possible to alter Rate-Limit on the fly, is a wholly different matter - And I don't have an answer for you, but it's something I can play with - Or you can do it yourself on my testing server.

I've also looked at using Radius Manager, but I'm enjoying the challenge of developing my entre system myself - Perhaps even sell it, or sell access to the package on my own hosting environment. Who knows. Radius Manager does seem to be a good option, as it's being used by a few other users on this forum. Do a Search on this forum for it, and see what others have to say about it. I can personally not give you too much insight into it's operation.

But as I said, I'll be happy to enter into a joint development of something like this - even if it is for no other reason than Learning.

Have an excellent day!

-Krige
 
Cobusbu
newbie
Posts: 43
Joined: Fri Jan 04, 2008 9:20 am
Location: Cape Town, South Africa

Re: Interim-Update ..?!

Wed May 07, 2008 10:14 pm

Hi Krige

I have managed to resolve 50% of the problem. Usermanager is now interpreting the interim updates and the upload/download counters are increasing.

I am running RouterOS 2.9.51 and userman 2.9.51 on two seperate boards the board running the pppoe server pointing to the one with usermanager on it & both on the same subnet.

I have reduced the interim update setting from 15 minutes to 1 minute same as you, but I have noticed that it does not update at one minute but rather > 5 minutes. RouterOS might be 1 digit after the decimal out here :-)

I will time the update and keep you posted.

I am still trying to figure out how I can get usermanager to send the new rate limits to the active dynamic session on the remote router without ending the pppoe session and starting a new one.

Will keep you posted,

Cobus
 
User avatar
krigevr
Member Candidate
Member Candidate
Topic Author
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Interim-Update ..?!

Wed May 07, 2008 10:29 pm

Excellent, I'll try that one out - That'll solve my problem partly.

But let's suppose for the moment that the month lapses, and you have to reset your counters and such, with PPPoE sessions still active - User Manager will set everything to Zero, but the moment another interim-update from an active PPPoE session comes in, it'll just set it right back up to the current usage level of that session - which may span well into the last month.

As for your remaining problem - I'm theorising on that one and will begin testing it soon on my server - It involves manipulating the SQL.conf and rlm_sql modules of FreeRadius.
But if it works - I may have a solution to your remaining problem.

I'll keep you posted.

-Krige
 
Cobusbu
newbie
Posts: 43
Joined: Fri Jan 04, 2008 9:20 am
Location: Cape Town, South Africa

Re: Interim-Update ..?!

Sun May 11, 2008 10:26 pm

Hi Krige

I am very interested in your offer to access your Freeradius server (if your offer still stands) :-)

I have not seen Freeradius installed on Linux before and your offer will save me a lot of hassles to get such a system up and running.

As far as I am concerned, Usermanager cannot alter the rate limits of the active dynamic queue sessions on the fly.

Looking forward to hearing from you.

Cobus
 
SweetSunday
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Nov 07, 2006 3:06 am

Re: Interim-Update ..?!

Mon May 12, 2008 11:50 am


I've also looked at using Radius Manager, but I'm enjoying the challenge of developing my entre system myself - Perhaps even sell it, or sell access to the package on my own hosting environment. Who knows.
-Krige
Cheque-book out and pen poised...

I tried Radius Manager. Couldn't get on with it.
 
User avatar
krigevr
Member Candidate
Member Candidate
Topic Author
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Interim-Update ..?!

Mon May 12, 2008 12:39 pm

Good morning

Thanks for the vote of confidence, SweetSunday! I'll keep you posted on my progress.

Cobus, you are welcome to contact me on MSN (which you can also use as an E-mail address to reach me) and we can hook you up - theq2006@hotmail.com

I've got two Radius servers - One running on Linux Fedora Core 5, which is currently deployed in a working environment, and the other running on Fedora Core 7, running purely for testing purposes. This is the one I'll allow you access to.

Cheers!

-Krige
 
SweetSunday
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Nov 07, 2006 3:06 am

Re: Interim-Update ..?!

Sat Jun 07, 2008 7:33 am

Thanks for the vote of confidence, SweetSunday! I'll keep you posted on my progress.
Hi krigevr, how's it going?

My attempt to start everyone off afresh again on 1 June has already turned to incomprehensible custard - some subscribers have only two-days worth of sessions recorded against their names, others, for some reason, have sessions only going up to 4 June, though they'll still marked as active - even though they all have identical settings etc.

The inexplicable - and unexplained - workings of User-Manager render it useless to me and I'm afraid I'm going to have to seriously look at Radius-Manager even though it will be a real pain having to run a Linux system just for that. If you've an alternative....?
 
SweetSunday
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Nov 07, 2006 3:06 am

Re: Interim-Update ..?!

Sun Jul 20, 2008 12:54 pm

Cheque-book out and pen poised...
Cheque-book still out and pen still poised....
 
ferdinandbabst
newbie
Posts: 31
Joined: Thu Dec 11, 2008 12:51 pm

Re: Interim-Update ..?!

Mon Feb 28, 2011 8:29 am

Hi

I know this post is very old but I need some help with accounting interim updates and freeradius.

my setup is as follows:

I have a mikrotik onsite with a public static IP. At our Hosting site I have freeradius running on a VPS also with public static IP
The site Mikrotik uses radius and points to freeradius static IP. Accounting interim updates is set to 3 hours

I also host a netflow server at a different hosting site and the Mikrotik passes netflow packets directly to the netflow server also via puplic static IPs
I have setup freeradius to issue framed-IP-addresses to each PPPoE user that logs on. This way my netflow server can track usage per IP linked to each user. I can now give a breakdown of data used for what ever type of application i.e. mail, browsing, audio/video streams etc.

My problem is though that the freeradius records in RADaccounting for any user always has a higher byte count than what the netflow server has. Discrepancies of 30Mb have been recorded.
The netflow server actually monitors packets that leaves the site mikrotik for every static IP(assigned by Radius) that is internet bound.

I know that the freeradius will also record overheads but how can the usage be so different.
I have had users complain about the discrepancies and i loaded an application called "networx" on a test PC

The networx app correlates with the netflow server statistics but the radius is out. Its also an exponential out. The more the browsing the bigger the problem gets.

Questions I have
When the mikrotik sends accounting updates, does it do it per pppoe session? Is there any way to check the database where the mikrotik stores accounting info apart from the snapshot option in ip-accounting? Does the Mikrotik clear its own database after sending the interim update?

any ideas please

Who is online

Users browsing this forum: No registered users and 7 guests