Mikrotik in office block

Hi Guys

I wonder if anyone could help with some guidance…

I am in an office block with a total of 5 companies. We want to provide a single internet connection to the building, and then share between the 5 companies. The criteria however will be to share the bandwidth fairy, but more importantly there needs to be a cap on usage per company. In other words each company may only be allowed to use 5GB of traffic per month.

Once a company has hit the 5GB limit, we would like to have the option to add an extra gig or whatever, but this will be at an additional cost because we will have to buy the extra traffic.

The idea is:
Internet enters the building on ADSL, fed into a Mikrotik router, and then from there hard wire to each company. I suppose it may be needed to have another smaller mikrotik there or perhaps just a switch, but in each company there is anything between 3 and 40 PC’s/Laptops that require internet access. We do not have the desire to limit traffic or usage for each machine inside the network per company, just the company as a whole.

Does anyone have any ideas on this?

Thanks

You could do this with just a Mikrotik, give each company there own interface on the router or set up a mangle rule then look at how much has been used on that interface every month. This counter is reset when the router reboots so I suggest buying a good UPS if you want to do it this way.

I am positive there are other more robust ways to do this but this way would be simple and easy to set up.

Thanks bobertperry for that reply, but that is going to be a little to “loose” for our requirement - I actually need to cap the users when they hit it, otherwise they could rob other companues of bandwidth and so forth.

I was hoping that there was some sort of hard setting that could go into it to really lock them down.

Thanks

One way to do this is to set up a main router as a PPPoE server. Then distribute routers to each customer and have them act as PPPoE clients. Combined with RADIUS (or User Manager) that will allow you to specify data limits per user account per month. You basically become a small time ISP. This is, of course, a more complicated setup but the wiki for these topics is fairly good.

A (very) simple alternative is to do as bobertperry suggested, but to add a script that runs every 5 minutes and checks the interface counters. If they’re over the limit, shut down the interface.

Or run a script that turns their speed right down by switching them to a different queue with very low speed limits. You could write a script that checks the totals per month and if it goes over, say, 5GB, it slows them to 64kbps. That’s just enough to allow them to run urgent stuff but slow enough to really make them take notice. We prefer that method over a complete switch off. A complete switch off can make clients very angry, even if it is there fault in the first place. Remember the client is always right. Stupid maybe, misguided maybe, but always right. So when they’re shouting down the phone, they still have some internet, so they can still send that very urgent email and also still access your payment webpage! :slight_smile:

Try this and also check out the links at the bottom for some ideas on how to do this download counting and actions that can be taken. http://wiki.mikrotik.com/wiki/Limiting_a_user_to_a_given_amount_of_traffic

Thanks guys… I will do that reading, I obviously have a lot of learning to do so that I can get this right - I am certainly not professing to be highly skilled in this area at all, I have some skills, but I have to learn a lot I see.

Thanks for the guidance so far, and if you guys don’t mind me asking more questions, are certainly will still be.

Cheers

That’s how many of us started! Always happy to put something back into the community that lead me to where I am today. Someone with enough knowledge of MT to be dangerous! :wink: