I have 3 servers running behind Mikrotik.
When a user connects to 1.1.1.1, I want him to be dstnat to 2.2.2.1. Easy enough.
But, when the next user connects to 1.1.1.1, I want him to be dstnat to 2.2.2.2.
Then, when the next user connects to 1.1.1.1, they should be dstnat to 2.2.2.3.
Then it should start over, when the next user connects to 1.1.1.1, it should dstnat to 2.2.2.1
etc.
Can this be done?
fewi
August 19, 2011, 5:26pm
2
There’s no real round robin function. However, you can use PCC for this to more or less balance across endpoints.
/ip firewall nat
add chain=dstnat dst-address=1.1.1.1 per-connection-classifier=src-address:3/0 action=dst-nat to-address=2.2.2.1
add chain=dstnat dst-address=1.1.1.1 per-connection-classifier=src-address:3/1 action=dst-nat to-address=2.2.2.2
add chain=dstnat dst-address=1.1.1.1 per-connection-classifier=src-address:3/2 action=dst-nat to-address=2.2.2.3
Again, not round robin, but the more load there is from clients the more evenly traffic will be spread around.
http://wiki.mikrotik.com/wiki/How_PCC_works_(beginner) still applies if you want more information on the different classifiers, which influence how traffic is distributed.