Page 1 of 1

Unstable Ping After Load Balance

Posted: Sun Jan 01, 2023 4:40 pm
by telecomnetwork2022
Hello brothers

before pcc load balance Ping 10 to 30 TOP Jitter 1 to 15

after pcc load balance Ping 10 to 200 TOP Jitter 20 to 70

i tried to change PCC to NTH same issues

+ ping in 2 wan stable
+ fasttrack disable
+ no firewall rule just managle rule
+ i am using pppoe server for connection client
use peer dns = no
use peer ntp = no
allow rmote dns request = yes

Re: Unstable Ping After Load Balance

Posted: Sun Jan 01, 2023 5:14 pm
by Amm0
It's either increased CPU or the config. Hard to know.

Re: Unstable Ping After Load Balance

Posted: Sun Jan 01, 2023 5:48 pm
by telecomnetwork2022
It's either increased CPU or the config. Hard to know.
- TOP CPU LOAD 0-2%
- what the correct configration for loadbalance 2 wan 1 =100mb 2= 50mb in PCC method

Re: Unstable Ping After Load Balance

Posted: Sun Jan 01, 2023 6:17 pm
by Amm0
My point is no one knows without at least some config to see what's actually going on & might be more attention here. For example, if you're also using queues, etc. that also be a related to your ping problem, etc.

At a high level, I'd personally approach this using ECMP instead of PCC first, but even that depends on your needs/problem. But for ECMP, you can use the 100Mb WAN twice, and the 50Mb once in /ip/route – all with the same "distance=" will create the ECMP load balance automatically & you can list same gateway multiple times to match ratios of PCC. But you may have reasons for using PCC (e.g. your traffic patterns, WAN types, QoS, etc.)...

Re: Unstable Ping After Load Balance

Posted: Mon Jan 02, 2023 11:21 am
by telecomnetwork2022
My point is no one knows without at least some config to see what's actually going on & might be more attention here. For example, if you're also using queues, etc. that also be a related to your ping problem, etc.

At a high level, I'd personally approach this using ECMP instead of PCC first, but even that depends on your needs/problem. But for ECMP, you can use the 100Mb WAN twice, and the 50Mb once in /ip/route – all with the same "distance=" will create the ECMP load balance automatically & you can list same gateway multiple times to match ratios of PCC. But you may have reasons for using PCC (e.g. your traffic patterns, WAN types, QoS, etc.)...
can you help me to make ECMP load balance is there any docs or manual or video to loadbalance 2 wan 100 and 50

Re: Unstable Ping After Load Balance

Posted: Mon Jan 02, 2023 1:17 pm
by telecomnetwork2022
look in #11 and #2

Image

Re: Unstable Ping After Load Balance

Posted: Mon Jan 02, 2023 2:09 pm
by rextended
If the queue is full, the ping is dropped or delayed, so what's weird?

You haven't even specified what hardware and software you're talking about.

Could also be a RB133C3 With RouterOS 4.16

Re: Unstable Ping After Load Balance

Posted: Mon Jan 02, 2023 2:25 pm
by telecomnetwork2022
If the queue is full, the ping is dropped or delayed, so what's weird?

You haven't even specified what hardware and software you're talking about.

Could also be a RB133C3 With RouterOS 4.16
the weird is i have traffic 150MB and the queue is not full
Hardware RB4011IGS CPU 0%

need manual for ecmb load balance if you can

Re: Unstable Ping After Load Balance

Posted: Mon Jan 02, 2023 4:50 pm
by Amm0
need manual for ecmp [edit] load balance if you can
I'd start with the differences between PCC ,ECMP, etc here (e.g. packet vs session):
https://help.mikrotik.com/docs/display/ ... +Balancing

Unforentently Mikrotik's docs do leave you hanging with ECMP. But it quite easy. In V7, an ECMP route is created just by add routes for same distance=1. So for example, if we assuming your 100Mbs WAN1's gateway is 2.1.1.1, and your 50Mb/s WAN2's gateway is 2.2.2.2 (and you already do any NAT stuff), an load balanced (by session) is created by:
/ip route add distance=1 dst-address=0.0.0.0/0 gateway=2.1.1.1 check-gateway=ping 
/ip route add distance=1 dst-address=0.0.0.0/0 gateway=2.1.1.1 check-gateway=ping 
/ip route add distance=1 dst-address=0.0.0.0/0 gateway=2.2.2.2 check-gateway=ping 


You'll note they all use the same distance and "E" will appear in the routing table. You'd need to REPLACE your existing WAN gateways, remove PCC, etc. to use. But that's the approach, as show your 100Mb/s WAN would be favored 2 to 1 with 50Mb/s WAN. e.g. you send 2x the traffic out WAN1, since it has 2x the speed of WAN2.

I don't know what config you have or are working with. But without a config and ideally diagram... I can't even say ECMP is what you need. But that's how it works.

Re: Unstable Ping After Load Balance

Posted: Mon Jan 02, 2023 5:07 pm
by telecomnetwork2022
need manual for ecmp [edit] load balance if you can
I'd start with the differences between PCC ,ECMP, etc here (e.g. packet vs session):
https://help.mikrotik.com/docs/display/ ... +Balancing

Unforentently Mikrotik's docs do leave you hanging with ECMP. But it quite easy. In V7, an ECMP route is created just by add routes for same distance=1. So for example, if we assuming your 100Mbs WAN1's gateway is 2.1.1.1, and your 50Mb/s WAN2's gateway is 2.2.2.2 (and you already do any NAT stuff), an load balanced (by session) is created by:
/ip route add distance=1 dst-address=0.0.0.0/0 gateway=2.1.1.1 check-gateway=ping 
/ip route add distance=1 dst-address=0.0.0.0/0 gateway=2.1.1.1 check-gateway=ping 
/ip route add distance=1 dst-address=0.0.0.0/0 gateway=2.2.2.2 check-gateway=ping 


You'll note they all use the same distance and "E" will appear in the routing table. You'd need to REPLACE your existing WAN gateways, remove PCC, etc. to use. But that's the approach, as show your 100Mb/s WAN would be favored 2 to 1 with 50Mb/s WAN. e.g. you send 2x the traffic out WAN1, since it has 2x the speed of WAN2.

I don't know what config you have or are working with. But without a config and ideally diagram... I can't even say ECMP is what you need. But that's how it works.
thank you
this my config in routes my Ver = 6.49.last

192.168.5.1 / mark connection = WAN1_con
192.168.6.1 / mark connection = WAN2_con

IN Firewall Managle
i have tow rule for wan 1 and 2 rule for wan 2
Rule for mark connection and Rule for mark packet

is that Right

Re: Unstable Ping After Load Balance

Posted: Mon Jan 02, 2023 5:24 pm
by Amm0
Post the entire config if you want anyone to help. Make sure to use "hide-sensitive=yes" and feel free to redact public IP etc. or whatever else you think is sensitive.

I can't say ECMP is going to "fix an unstable ping" – which is your alleged problem – more an alternative approach depending on your goals

Re: Unstable Ping After Load Balance

Posted: Tue Jan 03, 2023 9:03 pm
by telecomnetwork2022
My config

Wan 1= 100MB
Wan 2 = 50MB
# model = RB4011iGS+
# serial number =
/interface bridge
add admin-mac=D:C8:17 auto-mac=no comment=defconf name=bridge
/interface ethernet switch port
set 0 default-vlan-id=0
set 1 default-vlan-id=0
set 2 default-vlan-id=0
set 3 default-vlan-id=0
set 4 default-vlan-id=0
set 5 default-vlan-id=0
set 6 default-vlan-id=0
set 7 default-vlan-id=0
set 8 default-vlan-id=0
set 9 default-vlan-id=0
set 10 default-vlan-id=0
set 11 default-vlan-id=0
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik

interface bridge port
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=ether9
add bridge=bridge comment=defconf interface=ether10
add bridge=bridge comment=defconf interface=sfp-sfpplus1

/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254

ip firewall filter //all disable
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked disabled=yes
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" disabled=yes \
protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" disabled=yes \
dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
disabled=yes ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
disabled=yes ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related disabled=yes
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked disabled=yes
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid disabled=yes
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new disabled=yes in-interface-list=WAN


ip firewall mangle

add action=mark-connection chain=prerouting dst-address-type=!local \
new-connection-mark=WAN_CON_1 passthrough=yes per-connection-classifier=\
both-addresses-and-ports:2/0 src-address=192.168.88.0/24
add action=mark-connection chain=prerouting dst-address-type=!local \
new-connection-mark=WAN_CON_2 passthrough=yes per-connection-classifier=\
both-addresses-and-ports:2/1 src-address=192.168.88.0/24
add action=mark-routing chain=prerouting connection-mark=WAN_CON_1 \
new-routing-mark=ROUTING1 passthrough=yes src-address=192.168.88.0/24
add action=mark-routing chain=prerouting connection-mark=WAN_CON_2 \
new-routing-mark=ROUTING2 passthrough=yes src-address=192.168.88.0/24

/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none

/ip route
add comment=WAN1 distance=1 gateway=192.168.20.1 routing-mark=ROUTING1
add comment=WAN2 distance=1 gateway=192.168.1.1 routing-mark=ROUTING2

add distance=1 gateway=192.168.20.1
add distance=2 gateway=192.168.1.1