Page 1 of 1

Percentage IN PCC Load Balancd

Posted: Sat Jan 07, 2023 1:24 pm
by telecomnetwork2022
So we have 2 line
wan 1= 200M
wan 2=50MB

Traffic = 50% from wan1 and 50% from Wan2

Need Edit Rule to set load balance 70% from Wan 1 and 30 Form Wan 2

THANK

Current config

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

Re: Percentage IN PCC Load Balancd

Posted: Sat Jan 07, 2023 1:35 pm
by msatter
66% = 1/3->1 2/3->1 3/3->2

Re: Percentage IN PCC Load Balancd

Posted: Sat Jan 07, 2023 1:56 pm
by telecomnetwork2022
thats wrong bro
66% = 1/3->1 2/3->1 3/3->2
So good

why is 3/1 3/2 3/3
why not 3/0 3/1 3/2

can you help me to write the addistional rule i need

Re: Percentage IN PCC Load Balancd

Posted: Sat Jan 07, 2023 5:19 pm
by msatter
Even simpler: 1/3 goes to two and the rest goes to one.

You so only need one PCC line that marks traffic for routing2 and the rest you just mark for routing1 as long it is not marked earlier for routing2.

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:3/0 src-address=192.168.88.0/24

add action=mark-connection chain=prerouting dst-address-type=!local \
connection-mark=!WAN_CON_2 new-connection-mark=WAN_CON_1 \
passthrough=yes src-address=192.168.88.0/24

Bye

Re: Percentage IN PCC Load Balancd

Posted: Sat Jan 07, 2023 7:54 pm
by chechito
Wan1 5/0
Wan1 5/1
Wan1 5/2
Wan1 5/3
Wan2 5/4

Using PCC

Re: Percentage IN PCC Load Balancd

Posted: Sat Jan 07, 2023 10:30 pm
by msatter
@chechito: really? Secondly, that is 80:20

Simpler, 5/4 to Wan2 what is left to Wan1.
Do you now get, how it can work?

Bye

Re: Percentage IN PCC Load Balancd

Posted: Sat Jan 07, 2023 11:07 pm
by telecomnetwork2022
wich the correct answer??

Re: Percentage IN PCC Load Balancd

Posted: Sun Jan 08, 2023 1:08 am
by msatter
You can be the judge on that.

Re: Percentage IN PCC Load Balancd  [SOLVED]

Posted: Mon Jan 09, 2023 3:05 pm
by anav
Chechito had the right idea actually just didnt take it far enough.

WAN2 - 7/0
WAN2 - 7/1
WAN1 - 7/2
WAN1 - 7/3
WAN1 -7/4
WAN1 - 7/5
WAN1 - 7/6

To use Msatters cute but not fully explained shortcut..................

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:7/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:7/1 src-address=192.168.88.0/24

add action=mark-connection chain=prerouting dst-address-type=!local \
connection-mark=!WAN_CON_2 new-connection-mark=WAN_CON_1 \
passthrough=yes src-address=192.168.88.0/24