Skip to content

Latest commit

 

History

History
171 lines (106 loc) · 6.87 KB

loadbalance-setting.md

File metadata and controls

171 lines (106 loc) · 6.87 KB

Setting up Load Balance with mwan3 (for all devices)

!!!if you don't understand English, use translate.google.com to translate it into Indonesian!!!

  1. Install Load Balance package first if you don't have it (use terminal)
opkg update; opkg install mwan3 luci-app-mwan3

2. Interface creation & setting up firewall

  • Plug in your modems
  • Open LuCi IP Address -> Network -> Interface
  • Add new interface

firefox_za5Llw3UvC

  • Write interface name

image

  • Protocol interface -> DHCP Client

image

  • Cover the following interface -> ethX (X is number, according your plugged in modems)

image

  • After creating new interface -> back to Network -> Interface
  • Edit your written interface name

firefox_PiwSOtnqMq

  • Open Firewall Settings tab

image

  • Create / Assign firewall-zone
  • goto "unspecified -or- create:"
  • Write new firewall name for selected interface

image

  • Open your LuCi IP Address -> Network -> Firewall

firefox_PQ3VvRmdDE

  • Scroll down and find new firewall you create before, then edit it

image

  • Find this scroll bar, and slide right until Edit button appeared

firefox_uNHJC6p6W6

  • Click Edit button

image

Zone (this is firewall name)

  • Input -> Reject
  • Output -> Accept
  • Forward -> Reject
  • Masquerading -> Checked
  • MSS clamping -> Checked
  • Covered networks -> interface name

image

image

Inter-Zone Forwarding

image

  • Allow forward to destination zones -> dont select anything
  • Allow forward from source zones -> lan

image

Note : Repeat step 2 for every first new ethernet device connected and openwrt can't recognize it in Interface

3. Setting up loadbalance / mwan3

  • Open your LuCi IP Address -> Network -> Load Balancing
  • Open Interface tab -> Delete all interface

firefox_GxKWIifcax

  • Create new Interface with Interface name inside Network -> Interface and create new one according your Interface name then click ```Add`` button

firefox_VzkD9xY9oF

image

  • Scroll down and click Save & Apply

firefox_f84tTmbT6a

  • Open Member tab -> Delete all member

firefox_AlSfIVZjMx

  • Create new Member and set Interface to Interface name above and create new one according your Interface name with metric 1 and weight 1

firefox_qSFR797GCx

firefox_yTkoajEC0Q

firefox_PMr8Lkiugr

  • Click Save & Apply
  • Open Policies tab -> Delete all, except BALANCED

image

  • Edit Balanced and set Member used to Member name above

firefox_E8pWSnXAen

firefox_qSn9AxASh9

  • Click Save & Apply
  • Open Rules tab -> Delete all, except DEFAULT_RULE

image

  • Edit DEFAULT_RULE

image

image

image

  • Click Save & Apply
Note : this load balance settings is created for vpn injection, even no internet, this setting will recognize modem as online device
  • Edit etc/config/mwan3 file using WinSCP or Terminal or Putty
  • Find created Network Interface name before, i use ueth1 for an example
  • Edit config like this (copy and paste it! if it's differents, you can compare these scripts to your config
.........

config interface 'ueth1'
	option enabled '1'
	option initial_state 'online'
	list track_ip '0.0.0.0'
	option family 'ipv4'
	option track_method 'ping'
	option reliability '1'
	option check_quality '0'
	option keep_failure_interval '1'
	option timeout '5'
	option interval '3'
	option failure_interval '3'
	option recovery_interval '1'
	option down '5'
	option up '5'
	option count '4'
	option size '24'
	
...........
  • Then copy and paste config interface 'interface_name' until end of line of scripts above
  • Then edit it to other interface name

Note : if you want to set (if no internet connection on interface, then ISP off, then mwan3 restart, then connect to other ISP), just change list track_ip '0.0.0.0' to list track_ip '8.8.8.8' or something else.