Community discussions

MikroTik App
 
areeb111
just joined
Topic Author
Posts: 15
Joined: Mon Sep 07, 2009 1:58 pm

PCC Loac Balancing Help Please

Tue Sep 15, 2009 12:28 am

Dear Sir,

i have followed the instructions of http://wiki.mikrotik.com/wiki/PCC on my routeros 3.28

And i have changed the script as my IPs so please let me know what is the wrong in this ??
because it's not functional and when i am going to IP-Routes - i will find the gateway for the wan 2 is marked in blue color ??
here is the pic and the script

Image
/ ip firewall mangle
add chain=input in-interface=wan1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=wan2 action=mark-connection new-connection-mark=wan2_conn



add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1     
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2


add chain=prerouting  dst-address=192.168.0.0/24  action=accept in-interface=out 
add chain=prerouting  dst-address=192.168.1.0/24  action=accept in-interface=out


add chain=prerouting dst-address-type=!local in-interface=out per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=out per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=wan2_conn passthrough=yes


add chain=prerouting connection-mark=wan1_conn in-interface=out action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=out action=mark-routing new-routing-mark=to_wan2


/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.0.1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_wan2 check-gateway=ping


add dst-address=0.0.0.0/0 gateway=192.168.0.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=2 check-gateway=ping


/ ip firewall nat 
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC Loac Balancing Help Please

Tue Sep 15, 2009 1:32 pm

it's inactive (blue) because it's 2nd default gateway in 'main' routing table. there can be only one active default route per table, so it's normal. if wan1 fails, this route will come up
 
areeb111
just joined
Topic Author
Posts: 15
Joined: Mon Sep 07, 2009 1:58 pm

Re: PCC Load Balancing Help Please

Tue Sep 15, 2009 4:09 pm

Thank you , But how can i activate both of them so i will have the load divided by the 2 inputs (wan1 , wan2)
I mean some connections will go through wan1 and the other will go through wan2 ???
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCC Loac Balancing Help Please

Tue Sep 15, 2009 5:27 pm

it should already work in this way

Who is online

Users browsing this forum: ErgotRye, JimF, sukram, tdw and 86 guests