Hướng dẫn load blancing mikrotik 3 WAN(PPPoE) to 1 LAN

/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=LAN2 \
new-connection-mark=to_WAN1 passthrough=yes
add action=mark-connection chain=prerouting disabled=no in-interface=LAN2 \
new-connection-mark=to_WAN2 passthrough=yes
add action=mark-connection chain=prerouting disabled=no in-interface=LAN2 \
new-connection-mark=to_WAN3 passthrough=yes

add action=mark-routing chain=prerouting disabled=no in-interface=LAN2 \
new-routing-mark=to_WAN1 passthrough=yes src-address-list=to_WAN1
add action=mark-routing chain=prerouting disabled=no in-interface=LAN2 \
new-routing-mark=to_WAN2 passthrough=yes src-address-list=to_WAN2
add action=mark-routing chain=prerouting disabled=no in-interface=LAN2 \
new-routing-mark=to_WAN3 passthrough=yes src-address-list=to_WAN3

add action=mark-connection chain=prerouting connection-state=new disabled=no \
in-interface=LAN2 new-connection-mark=to_WAN1 nth=2,1 passthrough=yes
add action=mark-connection chain=prerouting connection-state=new disabled=no \
in-interface=LAN2 new-connection-mark=to_WAN2 nth=2,2 passthrough=yes
add action=mark-connection chain=prerouting connection-state=new disabled=no \
in-interface=LAN2 new-connection-mark=to_WAN3 nth=2,3 passthrough=yes

add action=add-src-to-address-list address-list=to_WAN1 address-list-timeout=\
1d chain=prerouting connection-mark=to_WAN1 disabled=no in-interface=\
LAN2
add action=add-src-to-address-list address-list=to_WAN2 address-list-timeout=\
1d chain=prerouting connection-mark=to_WAN2 disabled=no in-interface=\
LAN2
add action=add-src-to-address-list address-list=to_WAN2 address-list-timeout=\
1d chain=prerouting connection-mark=to_WAN3 disabled=no in-interface=\
LAN2

add action=mark-routing chain=prerouting connection-mark=to_WAN1 disabled=no \
in-interface=LAN2 new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=to_WAN2 disabled=no \
in-interface=LAN2 new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=to_WAN3 disabled=no \
in-interface=LAN2 new-routing-mark=to_WAN3 passthrough=yes

/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=WAN1
add action=masquerade chain=srcnat disabled=no out-interface=WAN2
add action=masquerade chain=srcnat disabled=no out-interface=WAN3

Tin Liên Quan