modified on 2 June 2008 at 06:18 ••• 48,770 views

Pppoe server with profiles

From MikroTik Wiki

Jump to: navigation, search

PPPoE Server Setup with Profiles

Hi everyone. This is my second time i am writing any thing on INTERNET.

In this article i will be setting up a PPPoE (point-to-point protocol over ethernet) Server with different profiles.


First we will configure interface that is connected to WAN.

/ ip address add address=172.16.10.50/16 network=172.16.0.0 broadcast=172.16.255.255 interface=ether1

Now one interface is configured and connected to WAN (with ip 172.16.10.50/16). Now we will configure second interface for our Local Network.

/ ip address add address=10.10.10.1/24 network=10.10.10.0 broadcast=10.10.10.255 interface=ether2

Now we will configure PPPoE using WinBOX, download Winbox from http://www.mikrotik.com and login to you MT Router.


Now goto IP > Pool. Press the PLUS sign in RED, then create a IP Address Pool that will be used by the PPPoE to give out IP (i am using 10.10.10.10-10.10.10.250) Press APPLY and OK. It should look something like this.


Pppoe-pool.JPG



Now we will create a PPPoE Server. Goto PPP then press PLUS sign and select PPPoE Server, a new small window will popup, just press APPLY and OK. You will see a window similar to this one after you press APPLY and OK.


Pppoe-in-interface.JPG




Now we will setup the main PPPoE Server. Press the button which says "PPPoE Server" in the same window. A new window will popup, press the PLUS sign to add a PPPoE Server. Now set the Service Name=pppoe-server (or whatever you like), then select the interface connected to local network (here i have selected ether2). Dont change the values of max MTU and max MRU. Uncheck the button Keepalive Timeout, select the option "Once Session per host". At the bottom of the window you can see 4 authenticaion methods, here only select PAP, and unselect all others. It should look something like this. Now press APPLY and OK.


Pppoe-server-setup.JPG




Now we will create a profile that will be used by different users. Goto the main PPP window, goto Profiles tab, here you will see two profiles by default, dont do any thing to these default profiles, create a new profile by pressing the PLUS sign. Name the profile what ever you like (here i have named it name=profile512). Local Address is the address of the server (here it is 10.10.10.1) local-address=10.10.10.1. In Remote Address box press the down arrow button you will see the name of the pool that we created in the first step, select it. If you dont see the name of the pool dont worry, name type the name of the pool in the Remote Address Location. In the DNS Server, enter the IP of your SERVER (here i am using mikrotik as my DNS Server) DNS-Server=10.10.10.1. Then goto Limits tab in the same window, now here we have to setup the bandwidth rate at which the users using this profile will be restricted at. Here set the Rate Limit (tx/rx) to what ever you like (i am setting it to 512k up/down). Then press APPLY and OK. Your settings should be a bit similar to settings shown below.


Pppoe-profile-setup.JPG




Now we will create users. In the main PPP window goto Secrets tab, then press the PLUS sign to add a new user. Name is the UID ( here i am setting it to test), set the password ( i am setting here to test). Now in the service box, select "pppoe", in the profile select the profile that we created in the previous step profile="profile512". Dont change any thing else. Just press APPLY and OK. Setting should be similar to this.


Pppoe-user-setup.JPG




Our PPPoE Server Setup is complete, however Internet right now will not be working at any cleint. Now we will setup NAT and ROUTE and DNS so that internet will also work on the clients.

Goto IP > Firewall. In the NAT tab add a new FIREWALL rule, press the PLUS sign. chain=srcnat , src.address=10.10.10.0/24 , then goto Action's tab in the same window, select action=masquerade. Then press APPLY and OK.


Pppoe-NAT-Rule.JPG




Now we will setup Default ROUTE. Goto IP > Routes , in here add a new Static ROUTE by pressing PLUS sign. Destination=0.0.0.0/0 , set the gateway to the gateway of the interface connected to INTERNET or the main IP of your ADSL Router (here its 172.16.10.1) gateway=172.16.10.1. Then Press APPLY and OK.


Pppoe-default-route.JPG




Now the last and final step, setup DNS Server on Mikrotik Router. Goto IP > DNS, press the settings butting. Enter the primary and secondary DNS Server's IP provided by your ISP (here i have a DNS Server on my network i am using that) primary DNS=172.16.10.1 , also select "Allow Remote Request" this will make your Mikrotik Router act as a DNS Server. Notice that i have setup the Cache size=10000 , if you want you can change that, its not that big deal. Now press APPLY and OK.


Pppoe-dns-server.JPG




Now our PPPoE Server Setup with Profiles is complete. Every thing should be working fine. For further help feel free to post on http://forum.mikrotik.com .


Created by Mudasir Mirza