sinet.com.kh

Wednesday, July 20, 2016

Mikrotik Router PPPOE Server Configuration

1. Comment Interface

    Interfaces > Interface (Tab) > ether1 (Double Click)

    +General (Tab)

            -Name: ether1-WAN (Interface_Name)


2. Configure IP Address for WAN and LAN

    2.1 Configure IP Address for WAN

    IP > Addresses > (+)

           -Address: 203.217.170.168/24

           -Network: 203.217.170.0

           -Interface: ether-WAN

    2.2 Configure IP Address for LAN    

     IP > Addresses > (+)

           -Address: 192.168.1.1/24

           -Network: 192.168.1.0

           -Interface: ether-LAN

3. Configure DNS Server

    IP > DNS > Servers: 203.217.168.27

                                             203.217.168.36

4. Configure IP Route

    IP > Routes > Routes (Tab) > (+)

    +General (Tab)

           -Dst. Address: 0.0.0.0/0

           -Gateway: 203.217.170.1

5. Configure NAT

    IP > Firewall > NAT (Tab) > (+)

    +General (Tab)

           -Chain: srcnat

           -Src. Address: 192.168.1.0/24 

    +Action (Tab)

           -Action: masuuerade

6. Create Pool for PPPoE User

    IP > Pool > (+)

           -Name: PppoePrivatePool (Pool_Name)

           -Address: 192.168.1.2-192.168.1.254

           -Next Pool: none

7. Create Profile for PPPoE Server

    PPP > Profiles (Tab) > (+)

    +General (Tab)

           -Name: pppoe-profile1 (PPPoE_Profile_Name)

           -Local Address: 192.168.1.1

           -Remote Address: PppoePrivatePool (Choose Pool Name)

8. Create PPPoE Server

    PPP > PPPoE Servers (Tab) > (+)

           -Service Name: pppoeservice1 (PPPoE_Service_Name) 

           -Interface: ether-LAN

           -Default Profile: pppoe-profile1 (Choose Profile Name)

9. Create PPPoE User

    PPP > Secrets (Tab) > (+)

           -Name: user1 (User Account)

           -Password: pwd123 (User Password)

           -Service: pppoe

           -Profile: pppoeprofile1 (Choose Profile Name)

           -Local Address: 192.168.1.1

           -Remote Address: 192.168.1.7

10. Create Queue Type

    10.1 Create Queue Type for Download

    Queues  > Queue Types (Tab) > (+)

           -Type Name: pppoe_7M_download

           -Kind: pcq

           -Rate: 7M

           -Classifier: Src. Address

    10.2 Create Queue Type for Upload

    Queue > Queue Type (Tab) > (+)

           -Type Name: pppoe_7M_upload

           -Kind: pcq

           -Rate: 7M

           -Classifier: Dst. Address

11. Create Simple Queue for PPPoE User

    Queues > Simple Queues (Tab) > (+)

    +General (Tab)

           -Name: user7

           -Target: 192.168.1.7

           -Target Upload: 7M

           -Target Download: 7M

12. Setting Up SNTP Client

    System > SNTP Client > (Tick) Enabled

           -Primary NTP Server: 203.217.168.28 (For SI Net NTP Server in Cambodia)

13. Setting Up Clock

    System > Clock > Time (Tab)

           Time: ...Time...

           Date: ....Date....

           (Tick) Time Zone Autodetect

           Time Zone Name: Asian/Phnom Penh (For Cambodia)

14. Setting Up Identity 

    System > Identity > Identity: PPPoE-Server (Name of our System) 

 
>>>>>>>Script
/interface ethernet
set [ find default-name=ether1 ] name=ether1-WAN
set [ find default-name=ether2 ] name=ether2-LAN
set [ find default-name=ether3 ] master-port=ether2-LAN
set [ find default-name=ether4 ] master-port=ether2-LAN
set [ find default-name=ether5 ] master-port=ether2-LAN
/ip pool
add name=PppoePrivatePool ranges=192.168.1.2-192.168.1.254
/ppp profile
add dns-server=203.217.168.27 local-address=192.168.1.1 name=pppoe-profile1
remote-address=PppoePrivatePool wins-server=203.217.168.36
/queue simple
add max-limit=1M/1M name=user1 target=192.168.1.254/32
add max-limit=2M/2M name=user2 target=192.168.1.2/32
add max-limit=3M/3M name=user3 target=192.168.1.3/32
add max-limit=5M/5M name=user5 target=192.168.1.5/32
add max-limit=4M/4M name=user4 target=192.168.1.4/32
add dst=203.217.168.192/26 max-limit=20M/20M name=Youtube target=192.168.1.0/24
add dst=43.245.200.192/26 max-limit=20M/20M name=GGC-01 target=192.168.1.0/24
add dst=43.245.201.192/26 max-limit=20M/20M name=GGC-02 target=192.168.1.0/24
add dst=118.67.200.0/21 max-limit=20M/20M name="Sabay Game" target=192.168.1.0/24
/queue type
add kind=pcq name=pppoe_1M_upload pcq-classifier=dst-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_1M_download pcq-classifier=src-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_2M_download pcq-classifier=src-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_2M_upload pcq-classifier=dst-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_3M_download pcq-classifier=src-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_3M_upload pcq-classifier=dst-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_7M_download pcq-classifier=src-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_7M_upload pcq-classifier=dst-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_50M_upload pcq-classifier=dst-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
add kind=pcq name=pppoe_50M_download pcq-classifier=src-address
    pcq-dst-address6-mask=64 pcq-rate=1M pcq-src-address6-mask=64
/interface pppoe-server server
add default-profile=pppoe-profile1 disabled=no interface=ether2-LAN max-mru=1480 
max-mtu=1480 mrru=1600 service-name=pppoeservice1
/ip address
add address=203.217.170.30/24 interface=ether1-WAN network=203.217.170.0
add address=192.168.1.1/24 interface=ether2-LAN network=192.168.1.0
/ip dns
set servers=203.217.168.27,203.217.168.36
/ip firewall nat
add action=masquerade chain=srcnat src-address=192.168.1.0/24
/ip route
add distance=1 gateway=203.217.170.1
/ppp secret
add local-address=192.168.1.1 name=user1 password=pwd123 profile=pppoe-profile1 
remote-address=192.168.1.254 service=pppoe
add local-address=192.168.1.1 name=user2 password=pwd123 profile=pppoe-profile1 
remote-address=192.168.1.2 service=pppoe
add local-address=192.168.1.1 name=user3 password=pwd123 profile=pppoe-profile1
remote-address=192.168.1.3 service=pppoe
add local-address=192.168.1.1 name=user4 password=pwd123 profile=pppoe-profile1 
remote-address=192.168.1.4 service=pppoe
add local-address=192.168.1.1 name=user5 password=pwd123 profile=pppoe-profile1
remote-address=192.168.1.5 service=pppoe
add local-address=192.168.1.1 name=user6 password=pwd123 profile=pppoe-profile1 
remote-address=192.168.1.6 service=pppoe
add local-address=192.168.1.1 name=user7 password=pwd123 profile=pppoe-profile1 
remote-address=192.168.1.7 service=pppoe
/system clock
set time-zone-name=Asia/Phnom_Penh
/system ntp client
set enabled=yes primary-ntp=203.217.168.28

No comments:

Post a Comment