In this article, I will show you how to do load balancing based on client IP address. If you have multiple ISP connections in your network, you can send your network traffic through those ISP connections and can make a load balancing network.
The following steps will show how to configure PPPoE Client on MikroTik WAN interface.
PPPoE WAN connection
Configure PPPoE Client on WAN1 interface.
Choose your WAN interface from Interfaces dropdown menu.
Put your ISP given username in User input field and password in Password input field. Also uncheck Add Default Route checkbox.
Configure PPPoE Client on WAN2 interface
Choose your WAN interface from Interfaces dropdown menu. Also uncheck Add Default Route checkbox.
Assigning LAN Gateway
we will now assign LAN Gateway IP so that LAN user can communicate with MikroTik Router. Put your LAN gateway IP in address input field : 192.168.88.0/24.
NAT Configuration
Now we will create NAT rule so that our LAN user can access internet through our MikroTik router.
Go to "IP" > "Firewall" > "NAT".
Click on NAT tab in this window and then click on add new button. Choose "masquerade" from Action drop down menu. choose "srcnat" from Chain drop-down menu and put your LAN IP block address in Srt Address input field : 192.168.88.0/24.
Mangle Rule Creation
Now we have to create Mangle rules which will divide our LAN users into two groups and mark them for proper routing. Choose "prerouting" option from Chain drop-down menu and put Group A IP block in Address input field : 192.168.88.0/25.
Choose "mark routing" option from Action drop-down menu and put "GroupA" in New Routing Mark input box. Similarly, Choose prerouting option from Chain drop-down menu and put Group B IP block in Address input field, and put Group B IP block in Address input field : 192.168.88.128/25.
Choose "mark routing" option from Action drop-down menu and put "GroupB" in New Routing Mark input box.
Now you have to configure routing, so that your different user group can use different WAN connection for accessing internet.
Put "pppoe out 1" in Gateway input field and choose "GroupA" from Routing Mark drop-down menu.
Similarly,Put "pppoe out 2" in Gateway input field and choose "GroupB" from Routing Mark drop-down menu.
After this configuration, your GroupA users will access internet through WAN1 gateway, and GroupB users will access internet through WAN2 gateway.
Facebook: https://www.facebook.com/routerbest
Twitter: https://twitter.com/routerbestcom
Tags: Mikrotik