Community discussions

MikroTik App
 
nikos
just joined
Topic Author
Posts: 22
Joined: Sat Jan 14, 2012 11:18 am

Loadbalancer with 4 pppoe-out interface from same provider

Sat Nov 30, 2013 5:13 pm

Hello ,
I cannot setup loadbalancer with 4 pppoe-out connections from same ISP. I have 4 ADSL 12/2 connections with bridged modems and now I using cheap TP-LINK loadblancer , need to swap to RB450G .Can you help me guys to setup this router to act as loadbalancer.

Thank you in advance!!!
 
bingo220
Member Candidate
Member Candidate
Posts: 124
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Loadbalancer with 4 pppoe-out interface from same provid

Sat Nov 30, 2013 5:29 pm

 
nikos
just joined
Topic Author
Posts: 22
Joined: Sat Jan 14, 2012 11:18 am

Re: Loadbalancer with 4 pppoe-out interface from same provid

Mon Dec 02, 2013 12:43 pm

aacble's script is not complete there is many thing needs to be change and is not work in my case.I don't understand why Mikrotik didn't provide us full ready configurations script for all cases in routers.Need to faith to find out solutions :(......
Any help appreciated !!!!
 
User avatar
nick3dos
Member Candidate
Member Candidate
Posts: 189
Joined: Fri Apr 29, 2011 11:03 pm
Location: Greece

Re: Loadbalancer with 4 pppoe-out interface from same provid

Mon Dec 02, 2013 1:09 pm

This is my setup with 3 bridged modems load balancing and working very good.
You can add an extra modem very easily.
I use RB1100 so need to change some ethernet names and ports.

Interfaces
---------------
ether01-MODEM1
ether04-MODEM4
ether05-MODEM5
pppoe-MODEM1
pppoe-MODEM4
pppoe-MODEM5
ether13-GW_LAN
/ip firewall mangle
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-connection chain=input comment="Mark new inbound connection MODEM1" connection-state=new disabled=no in-interface=pppoe-MODEM1 \
    new-connection-mark=MODEM1 passthrough=yes
add action=mark-connection chain=input comment="Mark new inbound connection MODEM4" connection-state=new disabled=no in-interface=pppoe-MODEM4 \
    new-connection-mark=MODEM4 passthrough=yes
add action=mark-connection chain=input comment="Mark new inbound connection MODEM5" connection-state=new disabled=no in-interface=pppoe-MODEM5 \
    new-connection-mark=MODEM5 passthrough=yes
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection MODEM1" connection-state=established disabled=no in-interface=\
    pppoe-MODEM1 new-connection-mark=MODEM1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection MODEM4" connection-state=established disabled=no in-interface=\
    pppoe-MODEM4 new-connection-mark=MODEM4 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection MODEM5" connection-state=established disabled=no in-interface=\
    pppoe-MODEM5 new-connection-mark=MODEM5 passthrough=yes
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection MODEM1" connection-state=related disabled=no in-interface=pppoe-MODEM1 \
    new-connection-mark=MODEM1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection MODEM4" connection-state=related disabled=no in-interface=pppoe-MODEM4 \
    new-connection-mark=MODEM4 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection MODEM5" connection-state=related disabled=no in-interface=pppoe-MODEM5 \
    new-connection-mark=MODEM5 passthrough=yes
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-routing chain=output comment="Mark new inbound route MODEM1" connection-mark=MODEM1 disabled=no new-routing-mark=static-MODEM1 passthrough=no
add action=mark-routing chain=output comment="Mark new inbound route MODEM4" connection-mark=MODEM4 disabled=no new-routing-mark=static-MODEM4 passthrough=no
add action=mark-routing chain=output comment="Mark new inbound route MODEM5" connection-mark=MODEM5 disabled=no new-routing-mark=static-MODEM5 passthrough=no
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=new \
    disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM1_pcc_conn passthrough=yes per-connection-classifier=\
    both-addresses:3/0
add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=new \
    disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM4_pcc_conn passthrough=yes per-connection-classifier=\
    both-addresses:3/1
add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=new \
    disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM5_pcc_conn passthrough=yes per-connection-classifier=\
    both-addresses:3/2
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 1" \
    connection-state=established disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM1_pcc_conn passthrough=yes \
    per-connection-classifier=both-addresses:3/0
add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 2" \
    connection-state=established disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM4_pcc_conn passthrough=yes \
    per-connection-classifier=both-addresses:3/1
add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 3" \
    connection-state=established disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM5_pcc_conn passthrough=yes \
    per-connection-classifier=both-addresses:3/2
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=\
    related disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM1_pcc_conn passthrough=yes per-connection-classifier=\
    both-addresses:3/0
add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=\
    related disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM4_pcc_conn passthrough=yes per-connection-classifier=\
    both-addresses:3/1
add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=\
    related disabled=no dst-address-type=!local in-interface=ether13-GW_LAN new-connection-mark=MODEM5_pcc_conn passthrough=yes per-connection-classifier=\
    both-addresses:3/2
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
add action=mark-routing chain=prerouting comment="Mark routing for  PCC mark - option 1" connection-mark=MODEM1_pcc_conn disabled=no new-routing-mark=MODEM1 \
    passthrough=yes
add action=mark-routing chain=prerouting comment="Mark routing for  PCC mark - option 2" connection-mark=MODEM4_pcc_conn disabled=no new-routing-mark=MODEM4 \
    passthrough=yes
add action=mark-routing chain=prerouting comment="Mark routing for  PCC mark - option 3" connection-mark=MODEM5_pcc_conn disabled=no new-routing-mark=MODEM5 \
    passthrough=yes
add action=accept chain=prerouting comment="--------------------------------------------------------------------------------------------------------------------\
    -------------------------------------------------------------------------------------------------------" disabled=yes
/ip firewall nat
add action=masquerade chain=srcnat comment=MODEM1 disabled=no out-interface=pppoe-MODEM1
add action=masquerade chain=srcnat comment=MODEM4 disabled=no out-interface=pppoe-MODEM4
add action=masquerade chain=srcnat comment=MODEM5 disabled=no out-interface=pppoe-MODEM5
/ip route
add check-gateway=arp comment="Static Route - MODEM1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-MODEM1 routing-mark=static-MODEM1 scope=30 \
    target-scope=10
add check-gateway=arp comment="Static Route - MODEM4" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-MODEM4 routing-mark=static-MODEM4 scope=30 \
    target-scope=10
add check-gateway=arp comment="Static Route - MODEM5" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-MODEM5 routing-mark=static-MODEM5 scope=30 \
    target-scope=10
add check-gateway=arp comment="MODEM1  - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-MODEM1 routing-mark=MODEM1 scope=30 target-scope=\
    10
add check-gateway=arp comment="MODEM1  - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-MODEM5 routing-mark=MODEM1 scope=30 target-scope=\
    10
add check-gateway=arp comment="MODEM4  - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-MODEM4 routing-mark=MODEM4 scope=30 target-scope=\
    10
add check-gateway=arp comment="MODEM4  - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-MODEM1 routing-mark=MODEM4 scope=30 target-scope=\
    10
add check-gateway=arp comment="MODEM5  - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-MODEM5 routing-mark=MODEM5 scope=30 target-scope=\
    10
add check-gateway=arp comment="MODEM1  - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-MODEM4 routing-mark=MODEM5 scope=30 target-scope=\
    10
add check-gateway=arp comment="Default Route - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-MODEM1 scope=30 target-scope=10
add check-gateway=arp comment="Default Route - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-MODEM4 scope=30 target-scope=10
add check-gateway=arp comment="Default Route - Distance 3" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=pppoe-MODEM5 scope=30 target-scope=10

Who is online

Users browsing this forum: aamiryasin2121, Baidu [Spider], satman1w and 58 guests