Wednesday, May 7, 2014

Setup a PPPoE Server Using Mikrotik RouterBoard 750

The scheme I'd like to achieve is like this:


This post will focus on how the PPPoE server is configured. The connection service will be asymmetric like this:
1 Mbps: 1 Mbps Download / 256 Kbps Upload
2 Mbps: 2 Mbps Download / 512 Kbps Upload

The only way to access a routerboard is using their winbox tool which you can download here. Let's start :)

Run the winbox, and you'll get this pop-up box:


Click on the button with three dots to scan connected device, choose the one mac-address that shows up and leave any other things at it is, then click the Connect button to open up another window like this:


Choose IP -> Addresses, add new and fill in the field:
Address: 10.200.10.2/24
Network: [automatically filled in when you click on 'Apply' button]
Interface: ether1

* Next, Create an IP pool for each service you'll create (allocate):
IP -> Pool, add new IP pool:
Name: 2MB
Addresses: 192.168.99.2-192.168.99.254
Next Pool: none

* Create a PPP profile for one of your service:
PPP -> go to Profile tab, add new profile and fill in the following fields:
Name: PPPOE_2MB
Local Address: 192.168.99.2
Remote Address: 2MB
DNS Server: 8.8.8.8, 4.4.4.4

* then go to PPPoE Servers, add new PPPoE service, and fill in the following fields:
Service Name: PPPOE
Interface: ether3
check 'One Session Per Host'
uncheck 'machap1' 'machap2' 'chap'

* Create a NAT rule for masquerade
IP -> Firewall -> go to NAT tab, add new NAT rule:
Chain: srcnat
Out. Interface: ether1
>> go to Action tab, choose 'masquerade' as Action

* Create Queue rule for bandwidth limit
Queue -> got to Queue Types tab, add new type for download limit:
Type Name: 2MB_DOWNLOAD
Kind: pcq
Rate: 2M

add another one for upload limit:
Type Name: 512KB_UPLOAD
Kind: pcq
Rate: 512K
uncheck 'Dst. Address'
check 'Src. Address'

* Apply the queue type just created:
go to Simple Queue tab, add new simple queue to apply queue type you just created:
in General tab:
Name: TOTAL
Target Address: 192.168.99.0/24

>> add another new simple queue rule:
in General tab:
Name: 2MB
Target Address: 192.168.99.0/24
Max Limit: choose 512KB_UPLOAD for Target Upload
choose 2MB_DOWNLOAD for Target Download
>> go to Advanced tab:
Queue Type: choose 512KB_UPLOAD for Target Upload
choose 2MB_DOWNLOAD for Target Download

* Create user credential for login:
PPP -> go to Secrets tab, add new PPP secrets:
Name: xs2
Password: xs2
Service: pppoe
Profile: PPPOE_2MB
Local Address: 192.168.99.2
Remote Address: 192.168.99.1

Then you can test it by creating a dialer, as I'm using Mac OS X, so I go to System Preferences -> Network, create a connection with a PPPoE interface:


And fill in the credential to connect:


That's it! :)



No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)