Community discussions

MikroTik App
 
miankamran7100
Member Candidate
Member Candidate
Topic Author
Posts: 252
Joined: Tue Sep 17, 2019 9:28 am

Mikrotik officel PCC Video

Wed Aug 23, 2023 2:53 pm

Dear Sir,
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

/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
You do not have the required permissions to view the files attached to this post.
Last edited by tangent on Wed Aug 23, 2023 9:01 pm, edited 1 time in total.
Reason: Wrapped config in code block
 
msatter
Forum Guru
Forum Guru
Posts: 2912
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: Mikrotik officel PCC Video

Wed Aug 23, 2023 4:13 pm

It distributs connections and how much traffic is going to flow over a connection is not known in advance.

https://m.youtube.com/watch?t=200&v=nlb ... e=youtu.be
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19395
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mikrotik officel PCC Video

Wed Aug 23, 2023 4:26 pm

(1) Dont start experimenting is my advice,

(2) If you have set up your load balancing the solution should work.
Perhaps your sample size of time was not large enough.
Remember if it always starts with wan1, it may always appear to have slightly greater throughput at any point in time.
The 2nd and 3rd seem balanced.

(3) Output chain rules should be passthrough=no.

(4) No requirement to state source address on srcnat rules.
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_WAN1
add action=masquerade chain=srcnat out-interface=ether2_WAN2
add action=masquerade chain=srcnat out-interface=ether3_WAN3


(5) In terms of PCC and failover, what is the plan you wish to accomplish.
IF W1 goes down, switch all W1 traffic to W2, and if W2 is down switch all to W3?
IF W2 goes down, switch all W2 traffic to W1, and if W1 is down switch all to W3?
IF W3 goes down, switch all W3 traffic to W1, and if W1 is down switch all to W2?

More importantly are all three accounts from the same provider so failover is a useless concept to start with and can be ignored???

(6) Finally if you do have fixed WANIPs, static, then its much better to put them in the proper format for so.

/ip firewall nat
add action=scr-nat chain=srcnat out-interface=ether1_WAN1 to-address=192.168.15.11
add action=src-nat chain=srcnat out-interface=ether2_WAN2 to-address=192.168.16.11
add action=src-nat chain=srcnat out-interface=ether3_WAN3 to address=192.1658.17.11


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

you may wish to change the percentages. instead of 3........
5/0 - wan1
5/1 -wan2
5/2 -wan3
5/3- wan2
5/4-wan3
 
miankamran7100
Member Candidate
Member Candidate
Topic Author
Posts: 252
Joined: Tue Sep 17, 2019 9:28 am

Re: Mikrotik officel PCC Video

Wed Aug 23, 2023 8:43 pm

(1) Dont start experimenting is my advice,

(2) If you have set up your load balancing the solution should work.
Perhaps your sample size of time was not large enough.
Remember if it always starts with wan1, it may always appear to have slightly greater throughput at any point in time.
The 2nd and 3rd seem balanced.

(3) Output chain rules should be passthrough=no.

(4) No requirement to state source address on srcnat rules.
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_WAN1
add action=masquerade chain=srcnat out-interface=ether2_WAN2
add action=masquerade chain=srcnat out-interface=ether3_WAN3


(5) In terms of PCC and failover, what is the plan you wish to accomplish.
IF W1 goes down, switch all W1 traffic to W2, and if W2 is down switch all to W3?
IF W2 goes down, switch all W2 traffic to W1, and if W1 is down switch all to W3?
IF W3 goes down, switch all W3 traffic to W1, and if W1 is down switch all to W2?

More importantly are all three accounts from the same provider so failover is a useless concept to start with and can be ignored???

(6) Finally if you do have fixed WANIPs, static, then its much better to put them in the proper format for so.

/ip firewall nat
add action=scr-nat chain=srcnat out-interface=ether1_WAN1 to-address=192.168.15.11
add action=src-nat chain=srcnat out-interface=ether2_WAN2 to-address=192.168.16.11
add action=src-nat chain=srcnat out-interface=ether3_WAN3 to address=192.1658.17.11


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

you may wish to change the percentages. instead of 3........
5/0 - wan1
5/1 -wan2
5/2 -wan3
5/3- wan2
5/4-wan3
Sir, I don't know what is the problem but usually WhatsApp calls drop. also some time no internet on the LAN.
why this is happening?
 
miankamran7100
Member Candidate
Member Candidate
Topic Author
Posts: 252
Joined: Tue Sep 17, 2019 9:28 am

Re: Mikrotik officel PCC Video

Wed Aug 23, 2023 9:02 pm

(1) Dont start experimenting is my advice,

(2) If you have set up your load balancing the solution should work.
Perhaps your sample size of time was not large enough.
Remember if it always starts with wan1, it may always appear to have slightly greater throughput at any point in time.
The 2nd and 3rd seem balanced.

(3) Output chain rules should be passthrough=no.

(4) No requirement to state source address on srcnat rules.
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_WAN1
add action=masquerade chain=srcnat out-interface=ether2_WAN2
add action=masquerade chain=srcnat out-interface=ether3_WAN3


(5) In terms of PCC and failover, what is the plan you wish to accomplish.
IF W1 goes down, switch all W1 traffic to W2, and if W2 is down switch all to W3?
IF W2 goes down, switch all W2 traffic to W1, and if W1 is down switch all to W3?
IF W3 goes down, switch all W3 traffic to W1, and if W1 is down switch all to W2?

More importantly are all three accounts from the same provider so failover is a useless concept to start with and can be ignored???

(6) Finally if you do have fixed WANIPs, static, then its much better to put them in the proper format for so.

/ip firewall nat
add action=scr-nat chain=srcnat out-interface=ether1_WAN1 to-address=192.168.15.11
add action=src-nat chain=srcnat out-interface=ether2_WAN2 to-address=192.168.16.11
add action=src-nat chain=srcnat out-interface=ether3_WAN3 to address=192.1658.17.11


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

you may wish to change the percentages. instead of 3........
5/0 - wan1
5/1 -wan2
5/2 -wan3
5/3- wan2
5/4-wan3
Sir, I don't know what is the problem but usually WhatsApp calls drop. also some time no internet on the LAN.
why this is happening?

(6) Finally if you do have fixed WANIPs, static, then it's much better to put them in the proper format for so.

/ip firewall nat
add action=scr-nat chain=srcnat out-interface=ether1_WAN1 to-address=192.168.15.11
add action=src-nat chain=srcnat out-interface=ether2_WAN2 to-address=192.168.16.11
add action=src-nat chain=srcnat out-interface=ether3_WAN3 to address=192.168.17.11

Sir,
What is the purpose of this rule? Am not understand.
Please explain
Regards,
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19395
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mikrotik officel PCC Video

Wed Aug 23, 2023 9:23 pm

The fixed/static setting/format does NOT drop all existing conditions due to a temporary interruption but the dynamic source-nat format will!
That may help solve some of your timeouts...........


Also according do Discher MUM

Try using “both addresses” or “source address “ for PCC
classifier. While “both addresses and ports” gives the greatest
chance for randomization and better possibility for even
distribution, it can create these types of issues.

Who is online

Users browsing this forum: No registered users and 6 guests