Community discussions

MikroTik App
 
User avatar
Giepie
Member
Member
Topic Author
Posts: 432
Joined: Mon Sep 13, 2004 12:33 pm
Location: Western Cape, South Africa
Contact:

Traffic Counting possible bug

Tue Oct 16, 2007 10:26 am

Hi all

A client recently did 88GB according to UM, but we noticed there was several almost duplicate entries, with varying upload used and the sessions were more or less the same time spans too. I can assure you it's not a routing problem or that more than one user is using the same account. UM is currently MTV3 RC6. The Interim update is set for 30min, and the user connects via PPtP.

I added the used data together roughly between the first of the month and today, and it gives me less than 30GB (this is when I don't add the duplicate sessions). UM adds everything together, bringing the total to 88GB download and 30GB upload, which is impossible on the client's line.

I have to make a note that the user switches their power off every night.

Please have a look at the following:
You do not have the required permissions to view the files attached to this post.
 
SweetSunday
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Nov 07, 2006 3:06 am

Re: Traffic Counting possible bug

Tue Oct 16, 2007 12:17 pm

I too am harbouring deep suspicions that User-Manager simply isn't up to the task of handling real situations with real customers being asked to pay real money for services rendered.

In an attempt to get to the bottom of the almost completely undocumented accounting features of User-Manager I've been running it on a test bed to see how it works, accessing a remote U-M from NTRadPing test Utility on a dummy radius client. The first user report below followed an Accounting-Stop request (hence the session was not active.) I then, to see what would happen, sent an Accounting-Update without restarting the session. The update was for a 10 min session with 400Byte upload and a 4000Byte download.

It seems from the second user report that U-M for some reason DOUBLED the closing session-time, upload and download totals, and then ADDED the new accounts to them despite the fact the session was closed.

I then restarted accounting with a new Session-id, but U-M merely added the further 10 mins + upload and download reports to the doubled total.

[admin@MikroTik] /tool user-manager user> print
Flags: X - disabled, A - active, I - incomplete
0 subscriber=admin name="test one" password="test1" first-name="test"
last-name="one" phone="1200" location="b"
email="admin@clovabay.net.nz" ip-address=10.100.3.2 group-name="test"
rate-limit=" 512k/2048k" uptime-used=1h30m download-used=40000
upload-used=4000 last-seen=oct/16/2007 21:40:05 credit-count=0
credit-left=0s credit-duration=0s credit-price=0 credit-time-added=0s

[admin@MikroTik] /tool user-manager user> print
Flags: X - disabled, A - active, I - incomplete
0 subscriber=admin name="test one" password="test1" first-name="test"
last-name="one" phone="1200" location="b"
email="admin@clovabay.net.nz" ip-address=10.100.3.2 group-name="test"
rate-limit=" 512k/2048k" uptime-used=3h10m download-used=84000
upload-used=8400 last-seen=oct/16/2007 21:48:53 credit-count=0
credit-left=0s credit-duration=0s credit-price=0 credit-time-added=0s

[admin@MikroTik] /tool user-manager user>
Flags: X - disabled, A - active, I - incomplete
0 A subscriber=admin name="test one" password="test1" first-name="test"
last-name="one" phone="1200" location="b"
email="admin@clovabay.net.nz" ip-address=10.100.3.2 group-name="test"
rate-limit=" 512k/2048k" uptime-used=3h20m download-used=89000
upload-used=8900 last-seen=oct/16/2007 21:56:23 active-sessions=1
credit-count=0 credit-left=0s credit-duration=0s credit-price=0
credit-time-added=0s


This is the session print report, which I find hard to make sense of:-

[admin@MikroTik] /tool user-manager session> print
Flags: A - active
0 subscriber=admin user="test one" calling-station-id="" host-ip=10.3.2.101
status=start,stop,interim from-time=oct/16/2007 16:01:17
till-time=oct/16/2007 21:40:05 terminate-cause=user-request uptime=1h30m
download=40000 upload=4000

1 subscriber=admin user="test one" calling-station-id=""
acct-session-id="1032" host-ip=10.3.2.101 status=stop
from-time=oct/16/2007 20:08:53 till-time=oct/16/2007 21:48:53
terminate-cause=unknown uptime=1h40m download=44000 upload=4400

2 A subscriber=admin user="test one" calling-station-id=""
acct-session-id="2952" host-ip=10.3.2.101 status=start,interim
from-time=oct/16/2007 21:54:26 till-time=oct/16/2007 21:56:23 uptime=10m
download=5000 upload=500
[admin@MikroTik] /tool user-manager session>

The above was using 3.0rc6 but like Giepie I've noticed U-M running on 2.9-n versions in the field doing some seeming odd things and if subscribers began seriously challenging the usage reports I'm giving them I honestly don't think I could swear to the reliability of what U-M is giving me.

Given that accurate accounting lies at the heart of every ISP's business and reputation I believe Mikrotik needs to be a lot more up-front and detailed about how U-M works, and to get it really, really right.
 
SweetSunday
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Nov 07, 2006 3:06 am

Re: Traffic Counting possible bug

Wed Oct 17, 2007 3:54 am

OK, I think I understand what's going on - in my case, anyway.

Rather than the radius client wiping the slate after each Interim-Update and sending only incremental accounting to U-M on the server leaving the server to keep the cumulative total for the session - which is what I was expecting - the radius client keeps the cumulative totals for the session and sends it as an interim update, and on receiving the Interim-Update the server wipes its records and replaces them with the new totals.

So that when I sent an Interim-Update just of upload-octets and session-time the previous recorded cumulative total of download-octets was wiped from the server with nothing to replace it.

Thus I was having to send the cumulative total each time, but when I did it after the Accounting-stop packet the server didn't wipe the previous total and replace it with the new one, it added them together.

I'm not sure I'm entirely happy with this. My reason for wanting a remote RADIUS server and accounting is that the radius clients in the field are vulnerable to equipment or battery failure, lightning, animal interference, vandalism and physical intrusion perhaps by the serial port or re-set button, and of course someone hacking an admin password. By having the server under my eye with its own non-networked password on a UPS it is much more secure and I would like it to be the authoritative source of accounting records rather than an echo of the client. If the client merely sends incremental updates all that can be lost is the last increment, whereas at present if the client sends garbage this is what the server duly records.

Who is online

Users browsing this forum: No registered users and 23 guests