sinet.com.kh

Monday, December 10, 2018

Load Balancing 3 WAN and 1 LAN

 Load Balancing 3 WAN and 1 LAN
Today we will show you how to configure Load Balancing 3 WAN and 1 LAN detail as bellow:
1. Comment Interface
2. Create Bridge LAN
3. Configure DHCP Client for WAN1, WAN2, and WAN3
4. Configure IP Address for Bridge LAN
5. Configure DHCP Server for Bridge LAN
6. Configure Mangle
7. Configure Routes
8. Configure NAT
9. Add Port to Bridge LAN

WAN1: 96.9.86.187/27
WAN2: 96.9.69.75/24
WAN3: 96.9.86.115/27
Bridge LAN:  172.16.1.1/22

In this configuration we use Mikrotik CCR1036-12G-4S with Firmware v6.43.7
*Note: DNS and Default route will get automatically for this configuration.
1. Comment Interface

2. Create Bridge LAN
/interface bridge
add name=bridge-LAN


3. Configure DHCP Client for WAN1, WAN2, and WAN3
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=sfp1-Mr.Doeun-Sela-17044
add default-route-distance=2 dhcp-options=hostname,clientid disabled=no interface="sfp2-Mr.Doeun-Sela(Line2)-17551"
add default-route-distance=3 dhcp-options=hostname,clientid disabled=no interface="sfp3-Mr.Doeun-Sela(Line3)-19201"


4. Configure IP Address for Bridge LAN

5. Configure DHCP Server for Bridge LAN
/ip address
add address=172.16.1.1/22 interface=bridge-LAN network=172.16.0.0


6. Configure Mangle
/ip firewall mangle
add action=mark-connection chain=input in-interface="sfp1-Mr.Doeun-Sela(Line1)-17044" new-connection-mark=WAN1_CONN passthrough=no
add action=mark-connection chain=input in-interface="sfp2-Mr.Doeun-Sela(Line2)-17551" new-connection-mark=WAN2_CONN passthrough=no
add action=mark-connection chain=input in-interface="sfp3-Mr.Doeun-Sela(Line3)-19201" new-connection-mark=WAN3_CONN passthrough=no


add action=mark-routing chain=output connection-mark=WAN1_CONN new-routing-mark=TO_WAN1 passthrough=no
add action=mark-routing chain=output connection-mark=WAN2_CONN new-routing-mark=TO_WAN2 passthrough=no
add action=mark-routing chain=output connection-mark=WAN3_CONN new-routing-mark=TO_WAN3 passthrough=no


add action=mark-connection chain=prerouting dst-address-type=!local in-interface=bridge-LAN new-connection-mark=WAN1_CONN passthrough=yes per-connection-classifier=both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=bridge-LAN new-connection-mark=WAN2_CONN passthrough=yes per-connection-classifier=both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=bridge-LAN new-connection-mark=WAN3_CONN passthrough=yes per-connection-classifier=both-addresses-and-ports:3/2


add action=mark-routing chain=prerouting connection-mark=WAN1_CONN in-interface=bridge-LAN new-routing-mark=TO_WAN1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=WAN2_CONN in-interface=bridge-LAN new-routing-mark=TO_WAN2 passthrough=no
add action=mark-routing chain=prerouting connection-mark=WAN3_CONN in-interface=bridge-LAN new-routing-mark=TO_WAN3 passthrough=no


7. Configure Routes

8. Configure NAT

9. Add Port to Bridge LAN

No comments:

Post a Comment