Community discussions

MikroTik App
 
maozilee
just joined
Topic Author
Posts: 22
Joined: Sat Apr 18, 2009 7:32 am

can pcc run as a load balancing server?

Fri Apr 30, 2010 5:24 am

I have one internet connection,two intranet servers.

I know that PCC can run for two internet connections,,,,,

My question is how to make pcc work as a load balancing server????

the result like this:
XXX.XXX.XXX:80->192.168.1.2:80
XXX.XXX.XXX:80->192.168.1.3:80

thx!
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: can pcc run as a load balancing server?

Fri Apr 30, 2010 6:32 am

you can probably just setup 2 dst-nat rules, with the first one using a 50/50. just a thought.

add action=dst-nat chain=dstnat comment="" disabled=no dst-address=1.2.3.4 \
dst-port=80 protocol=tcp random=50 to-addresses=192.168.1.2
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=1.2.3.4 \
dst-port=80 protocol=tcp to-addresses=192.168.1.3

the second rule doesnt have random so it catches any remaining.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: can pcc run as a load balancing server?

Sun May 02, 2010 7:35 pm

or use 'per-connection-classifier' instead of 'random': it will make results more predictable
 
maozilee
just joined
Topic Author
Posts: 22
Joined: Sat Apr 18, 2009 7:32 am

Re: can pcc run as a load balancing server?

Sat May 08, 2010 2:44 pm

you can probably just setup 2 dst-nat rules, with the first one using a 50/50. just a thought.

add action=dst-nat chain=dstnat comment="" disabled=no dst-address=1.2.3.4 \
dst-port=80 protocol=tcp random=50 to-addresses=192.168.1.2
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=1.2.3.4 \
dst-port=80 protocol=tcp to-addresses=192.168.1.3

the second rule doesnt have random so it catches any remaining.

thanks changeip,

your configuration is only a dstnat way! not the safest way, i need pcc feature, which know servers in intranet work fine or not!

not only split traffic ,but also implement redundancy function
 
maozilee
just joined
Topic Author
Posts: 22
Joined: Sat Apr 18, 2009 7:32 am

Re: can pcc run as a load balancing server?

Sat May 08, 2010 2:46 pm

or use 'per-connection-classifier' instead of 'random': it will make results more predictable

Could you check my example?

the result l want is:
192.168.200.1:80->192.168.1.2:80
192.168.200.1:80->192.168.1.3:80

what i did:

add action=dst-nat chain=dstnat comment="" disabled=no dst-address=192.168.200.1 \
dst-port=80 protocol=tcp per-connection-classifier=dst-address:2/0
to-addresses=192.168.1.2
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=192.168.200.1 \
dst-port=80 protocol=tcp per-connection-classifier=dst-address:2/1 to-addresses=192.168.1.3

Is that work fine?

great thx!
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: can pcc run as a load balancing server?

Mon May 10, 2010 2:02 am

you use 'dst-address' classifier with fixed dst-address=192.168.200.1 - only one of rules will catch packets. use 'src-address' classifier.

will 'NetWatch' (pinging) be enough for failover checking?

Who is online

Users browsing this forum: lif2k3, qatar2022, sas2k, svmk and 117 guests