sinet.com.kh

Saturday, January 20, 2018

Load Balancing 2 WAN Configuration

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


/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn

add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2

add chain=prerouting dst-address=192.168.1.0/24 in-interface=Local
add chain=prerouting dst-address=192.168.2.0/24 in-interface=Local

add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN1_conn per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN2_conn per-connection-classifier=both-addresses-and-ports:2/1

add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=Local new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=Local new-routing-mark=to_WAN2

/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2

/ip route
add check-gateway=ping distance=1 gateway=96.9.76.1 routing-mark=To_WAN1
add check-gateway=ping distance=1 gateway=203.217.170.1 routing-mark=To_WAN2
add check-gateway=ping distance=1 gateway=96.9.76.1
add check-gateway=ping distance=2 gateway=203.217.170.1

1 comment:

  1. https://www.youtube.com/watch?v=zmC_TRi_ipk

    ReplyDelete