Load Balance PCC Mikrotik

Load Balance PCC Mikrotik

/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=pppoe-speedy1 \
new-connection-mark=speedy1_con passthrough=yes
add action=mark-connection chain=prerouting disabled=no in-interface=pppoe-speedy2 \
new-connection-mark=speedy2_con passthrough=yes

add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
in-interface=ether5-LAN new-connection-mark=speedy1_con passthrough=yes \
per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
in-interface=ether5-LAN new-connection-mark=speedy2_con passthrough=yes \
per-connection-classifier=both-addresses:2/1

add action=mark-routing chain=prerouting connection-mark=speedy1_con disabled=no \
in-interface=ether5-LAN new-routing-mark=to_speedy1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=speedy2_con disabled=no \
in-interface=ether5-LAN new-routing-mark=to_speedy2 passthrough=yes

add action=mark-routing chain=output connection-mark=speedy1_con disabled=no \
new-routing-mark=to_speedy1 passthrough=yes
add action=mark-routing chain=output connection-mark=speedy2_con disabled=no \
new-routing-mark=to_speedy2 passthrough=yes

/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=118.97.20.185 routing-mark=to_speedy1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=122.129.197.225 routing-mark=to_speedy2 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=118.97.20.185 scope=30 target-scope=10

Demikian cara load balance pcc mikrotik, semoga bermanfaat

Comments are closed.