I configured my Mikrotik with 3ISP Load Balance according to Mikrotik's officially below-mentioned link.
https://www.youtube.com/watch?v=nlb7XAv57tw.
But I'm facing a problem is that
ISP 1 consumes 9.3
ISP 1 consumes 5.1
ISP 1 consumes 5.2
what will happen if I make distance =1 for my all gateway in IP routes
Code: Select all
/interface ethernet
set [ find default-name=ether1 ] comment="ether1 - PTCL" name=ether1_WAN1
set [ find default-name=ether2 ] comment="ether2 - Wateen" name=ether2_WAN2
set [ find default-name=ether3 ] comment="ether3 - Optix" name=ether3_WAN3
set [ find default-name=ether4 ] disabled=yes
set [ find default-name=ether5 ] disabled=yes
set [ find default-name=ether6 ] disabled=yes
set [ find default-name=ether7 ] disabled=yes
set [ find default-name=ether8 ] disabled=yes
set [ find default-name=ether9 ] disabled=yes
set [ find default-name=ether10 ] comment=ether10 name=ether10_LAN poe-out=\
off
set [ find default-name=sfp-sfpplus1 ] disabled=yes
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=192.168.8.30-192.168.8.200
/ip dhcp-server
add address-pool=dhcp_pool0 interface=ether10_LAN lease-time=10m name=dhcp1
/routing bgp template
set default disabled=no output.network=bgp-networks
/routing ospf instance
add disabled=no name=default-v2
/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2
/routing table
add fib name=to_wan1
add fib name=to_wan2
add fib name=to_wan3
/system logging action
set 0 memory-lines=1
/ip neighbor discovery-settings
set discover-interface-list=all
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=192.168.8.1/24 comment=LAN interface=ether10_LAN network=\
192.168.8.0
add address=192.168.15.11/24 comment=WAN1 interface=ether1_WAN1 network=\
192.168.15.0
add address=192.168.16.11/24 comment=WAN2 interface=ether2_WAN2 network=\
192.168.16.0
add address=192.168.17.11/24 comment=WAN3 interface=ether3_WAN3 network=\
192.168.17.0
/ip dhcp-server network
add address=192.168.8.0/24 gateway=192.168.8.1
/ip dns
set allow-remote-requests=yes cache-size=10000KiB servers=\
8.8.8.8,1.1.1.1,8.8.4.4
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark \
connection-state=new in-interface=ether1_WAN1 new-connection-mark=\
wan1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
connection-state=new in-interface=ether2_WAN2 new-connection-mark=\
wan2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
connection-state=new in-interface=ether3_WAN3 new-connection-mark=\
wan3_conn passthrough=yes
add action=mark-routing chain=output connection-mark=wan1_conn \
new-routing-mark=to_wan1 passthrough=yes
add action=mark-routing chain=output connection-mark=wan2_conn \
new-routing-mark=to_wan2 passthrough=yes
add action=mark-routing chain=output connection-mark=wan3_conn \
new-routing-mark=to_wan3 passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
connection-state=new dst-address-type=!local in-interface=ether10_LAN \
new-connection-mark=wan1_conn passthrough=yes per-connection-classifier=\
both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting connection-mark=no-mark \
connection-state=new dst-address-type=!local in-interface=ether10_LAN \
new-connection-mark=wan2_conn passthrough=yes per-connection-classifier=\
both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting connection-mark=no-mark \
connection-state=new dst-address-type=!local in-interface=ether10_LAN \
new-connection-mark=wan3_conn passthrough=yes per-connection-classifier=\
both-addresses-and-ports:3/2
add action=mark-routing chain=prerouting connection-mark=wan1_conn \
in-interface=ether10_LAN new-routing-mark=to_wan1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=wan2_conn \
in-interface=ether10_LAN new-routing-mark=to_wan2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=wan3_conn \
in-interface=ether10_LAN new-routing-mark=to_wan3 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_WAN1 src-address=\
192.168.8.0/24
add action=masquerade chain=srcnat out-interface=ether2_WAN2 src-address=\
192.168.8.0/24
add action=masquerade chain=srcnat out-interface=ether3_WAN3 src-address=\
192.168.8.0/24
/ip route
add check-gateway=ping comment=WAN1 disabled=no dst-address=0.0.0.0/0 \
gateway=192.168.15.1 routing-table=to_wan1
add check-gateway=ping comment=WAN2 disabled=no dst-address=0.0.0.0/0 \
gateway=192.168.16.1 routing-table=to_wan2
add check-gateway=ping comment=WAN3 disabled=no dst-address=0.0.0.0/0 \
gateway=192.168.17.1 routing-table=to_wan3
add check-gateway=ping comment=WAN1 disabled=no dst-address=0.0.0.0/0 \
gateway=192.168.15.1
add check-gateway=ping comment=WAN2 disabled=no distance=2 dst-address=\
0.0.0.0/0 gateway=192.168.16.1 pref-src="" routing-table=main scope=30 \
suppress-hw-offload=no target-scope=10
add check-gateway=ping comment=WAN3 disabled=no distance=3 dst-address=\
0.0.0.0/0 gateway=192.168.17.1 pref-src="" routing-table=main scope=30 \
suppress-hw-offload=no target-scope=10
/routing bfd configuration
add disabled=no interfaces=all min-rx=200us min-tx=200us multiplier=5
/system clock
set time-zone-name=Asia/Karachi