• Breaking News

    Monday 25 April 2016

    64. Mikrotik 4 PPPoE connections Load Balancing and Fail Over(NTH Method)


     /interface pppoe-client
    add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
        dial-on-demand=no disabled=no interface=ether1 max-mru=1480 \
        max-mtu=1480 mrru=disabled name=pppoe-out1 password=1234 profile=default \
        service-name="" use-peer-dns=yes user=sysnet1@isp
    add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
        dial-on-demand=no disabled=no interface=ether2 max-mru=1480 \
        max-mtu=1480 mrru=disabled name=pppoe-out2 password=1234 profile=default \
        service-name="" use-peer-dns=no user=sysnet2@isp
    add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
        dial-on-demand=no disabled=no interface=ether3 max-mru=1480 \
        max-mtu=1480 mrru=disabled name=pppoe-out3 password=1234 profile=default \
        service-name="" use-peer-dns=no user=sysnet2@isp
    add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
        dial-on-demand=no disabled=no interface=ether4 max-mru=1480 \
        max-mtu=1480 mrru=disabled name=pppoe-out4 password=1234 profile=default \
        service-name="" use-peer-dns=no user=sysnet2@isp

    ================================================================================================================================

    /interface ethernet
    set 0 name=Local

    /ip address
    add address=192.168.2.1/24 interface=Local

    /ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=103.28.3.187,8.8.8.8

    /ip firewall mangle
    add chain=prerouting in-interface=Local connection-state=new nth=4,1 action=mark-connection new-connection-mark=conn1 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=Local connection-mark=conn1 action=mark-routing new-routing-mark=conn1 passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=Local connection-state=new nth=4,2 action=mark-connection new-connection-mark=conn2 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=Local connection-mark=conn2 action=mark-routing new-routing-mark=conn2 passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=Local connection-state=new nth=4,3 action=mark-connection new-connection-mark=conn3 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=Local connection-mark=conn3 action=mark-routing new-routing-mark=conn3 passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=Local connection-state=new nth=4,3 action=mark-connection new-connection-mark=conn4 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=Local connection-mark=conn4 action=mark-routing new-routing-mark=conn4 passthrough=no comment="" disabled=no

    /ip firewall nat
    add chain=srcnat connection-mark=conn1 action=masquerade out-interface=pppoe-out1 comment="" disabled=no
    add chain=srcnat connection-mark=conn2 action=masquerade out-interface=pppoe-out2 comment="" disabled=no
    add chain=srcnat connection-mark=conn3 action=masquerade out-interface=pppoe-out3 comment="" disabled=no
    add chain=srcnat connection-mark=conn4 action=masquerade out-interface=pppoe-out4 comment="" disabled=no

    /ip route
    add dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=255 target-scope=10 routing-mark=conn1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=255 target-scope=10 routing-mark=conn2 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=pppoe-out3 scope=255 target-scope=10 routing-mark=conn3 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=pppoe-out4 scope=255 target-scope=10 routing-mark=conn4 comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=pppoe-out1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=pppoe-out2 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=pppoe-out3 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=pppoe-out4 comment="" disabled=no

    You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel