Ofcourse,youwanttodoloadbalancing!Thereareseveralwayshowtodoit.Dependingontheparticularsituation,youmay findonebestsuitedforyou.
PolicyRoutingbasedonClientIPAddress
Ifyouhaveanumberofhosts,youmaygroupthembyIPaddresses.Then,dependingonthesourceIPaddress,sendthetraffic outthroughGateway#1or#2.Thisisnotreallythebestapproach,givingyouperfectloadbalancing,butit'seasytoimplement, andgivesyousomecontroltoo. LetusassumeweuseforourworkstationsIPaddressesfromnetwork192.168.100.0/24.TheIPaddressesareassignedas follows: 192.168.100.1127areusedforGroupAworkstations 192.168.100.128253areusedforGroupBworkstations 192.168.100.254isusedfortherouter. AllworkstationshaveIPconfigurationwiththeIPaddressfromtherelevantgroup,theyallhavenetworkmask255.255.255.0, and192.168.100.254isthedefaultgatewayforthem.WewilltalkaboutDNSserverslater. Now,whenwehaveworkstationsdividedintogroups,wecanrefertothemusingsubnetaddressing: GroupAis192.168.100.0/25,i.e.,addresses192.168.100.0127 GroupBis192.168.100.128/25,i.e.,addresses192.168.100.128255
I yud ntudrtn ti,tk teTPI Bsc cus, f o o o nesad hs ae h C/P ais ore o,lo frsm rsucsaotsbetn o teItre! r ok o oe eore bu untig n h nent
wiki.mikrotik.com/wiki/Load_Balancing_over_Multiple_Gateways
1/4
17/05/12
AllIPtrafficcomingfromworkstationsismarkedwiththeroutingmarksGroupAorGroupB.Wecanusethesemarksinthe wiki.mikrotik.com/wiki/Load_Balancing_over_Multiple_Gateways
2/4
17/05/12
Thisthingisnotgoingtowork,unlessyoudomasqueradingforyourLAN!ThesimplestwaytodoitisbyaddingoneNATrulefor Src.Address192.168.100.0/24andActionmasquerade:
TestthesetupbytracingtheroutetosomeIPaddressontheInternet! FromaworkstationofGroupA,itshouldgolikethis:
C\taet- 8888 :>rcr d ... Taigruet 8888oe amxmmo 3 hp rcn ot o ... vr aiu f 0 os 1 2m s 2 1 m 0 s .. . 2m s 4m s 2m s 12181024 9.6.0.5 3m s 1... 0101
wiki.mikrotik.com/wiki/Load_Balancing_over_Multiple_Gateways
3/4
17/05/12
FromaworkstationofGroupB,itshouldgolikethis:
C\taet- 8888 :>rcr d ... Taigruet 8888oe amxmmo 3 hp rcn ot o ... vr aiu f 0 os 1 2m s 2 1 m 0 s .. . 2m s 4m s 2m s 12181024 9.6.0.5 3m s 1... 0581
wiki.mikrotik.com/wiki/Load_Balancing_over_Multiple_Gateways
4/4