Managing Internet Connections PPPoE, MikroTik and Radius Dashamir Hoxha <firstname.lastname@example.org> Artur Nurja <email@example.com>● How to manage internet clients of an ISP● With PPPoE and MikroTik and Radius● Based on the work done at AlbaniaOnline
Managing PPPoE Connections with Mikrotik is Easy ● PPPoE = Point-to-Point Protocol over Ethernet ● Why PPPoE and not Ethernet? ● Configuring Mikrotik for PPPoE 1.Install package PPP 2. Create PPP profiles 3. Create a PPPoE service and enable it 4. Create user accounts
However it Doesnt Scale Up Well● A single Mikrotik can serve only a limited number of clients (400-500).● Managing clients and their profiles in Mikrotik cannot be integrated easily with CRM apps.● Managing clients manually in more than one Mikrotik server is difficult and error prone.● If a Mikrotik fails, the service to the clients is interrupted, until a new Mikrotik is prepared and a backup of the clients is restored.
Centralized AAA is Required● AAA = Authentication, Authorization, Accounting● FreeRadius is used to check username/password, to provide client profiles, and to get usage statistics.● Client details are stored in a MySql database.● Mikrotik-s are dumb gateways with simple configs. No client details are stored on them!● Mikrotik-s use the central Radius for authentication, authorization, and for storing usage statistics.● Clients can connect through any Mikrotik available.
Clients are Managed by anExternal CRM Application ● CRM = Customer Relationship Management ● SugarCRM is used to keep all the client details ● SugarCRM is integrated with the database of freeRadius ● Decisions about clients are taken by Customer Care on SugarCRM ● They are automatically enforced by applying them on Radius
We Need Also High Availability and Load Balancing
We Need Also High Availability and Load Balancing● There are 2 MySQL databases, replicating in Master-->Slave mode; if the first one fails, it is replaced by the second one, in order to minimise the service down time.● Each Mikrotik is configured with a primary and a secondary Radius server; if the primary server does not reply, the second one is tried. This provides HA.● Almost half of mikrotiks have the first radius as primary, and the others have the second one. This provides Load Balancing.
Implementation Steps1. Install freeRadius2. Test freeRadius installation3. Set up freeRadius to use a MySQL database4. Test freeRadius with MySQL backend5. Configure Mikrotik for being a PPPoE server6. Test the PPPoE Service7. Get Mikrotik to work with Radius8. Add a second Radius server in Mikrotik9. Replicate MySQL databases of freeRadius
SQL API for Radius Manager● API = Application Programing Interface● Helps to access the database of Radius Manager from an outside program (SugarCRM).● Encapsulates (hides) the complexity of the database from the outside programmer.● Makes simpler the code of the outside program.● The programmer is relived from the fear of touching something inappropriately in the database.● If structure of DB is modified in future releases, only the API needs to take them into account.