Mikrotik 2 WAN Load Balancing 2 LAN's and Hotspot_Pppoe Server


This post shows on how you can arrange load adjusting of various wan connections utilizing Mikrotik Routerboard equipment (or RouterOS x86 rendition). In this precedent I have utilized Mikrotik Routerboard RB 750 hex light model. 2 port's was associated with Dsl Modem. what's more, 1 port was associated with pppoe LAN User.1 port was associated With Hotspot LAN user.Don't neglect to rename the interface names Copy File's
Step1: Add interface Ethernet Name
  • /interface ethernet
  • set [ find default-name=ether1 ] name=WAN1
  • set [ find default-name=ether2 ] name=WAN2
  • set [ find default-name=ether3 ] name=ether3-PPPoE
  • set [ find default-name=ether4 ] name=ether4-Hotspot
  • set [ find default-name=ether5 ] name=ether5-mikrotiksystems.com
Step2: Add Hotspot Configuration
  • /ip hotspot profile
  • set [ find default=yes ] html-directory=flash/hotspot
  • add dns-name=login.net hotspot-address=192.168.22.1 html-directory=\
  •     flash/hotspot login-by=http-chap,https,http-pap name=hsprof1
  • /ip hotspot user profile
  • set [ find default=yes ] transparent-proxy=yes
  • add name="2 MB" rate-limit=1M/2M transparent-proxy=yes
  • /ip pool
  • add name=hs-pool-4 ranges=192.168.22.2-192.168.22.254
  • /ip hotspot
  • add address-pool=hs-pool-4 addresses-per-mac=1 disabled=no interface=\
  •     ether4-Hotspot name=hotspot1 profile=hsprof1
  • /ip hotspot user
  • add name=admin password=1234 profile="2 MB" server=hotspot1
  • /system note set note="Mikrotik Configuration By |www.mikrotiksystems.com|" show-at-login=yes
  • /system clock
  • set time-zone-name=Asia/Riyadh
  • /system routerboard settings
  • set boot-device=nand-only silent-boot=no
  • /ip dhcp-server
  • add address-pool=hs-pool-4 authoritative=after-2sec-delay disabled=no \
  •     interface=ether4-Hotspot lease-time=1h name=dhcp1

Step3: Add ip Pool and Dhcp-Server
  • /ip pool
  • add name=PPPOE_POOL ranges=10.5.50.2-10.5.50.254
Step4: Add Ip Address
  • /ip address
  • add address=192.168.1.2/24 interface=WAN1 network=192.168.1.0
  • add address=192.168.2.2/24 interface=WAN2 network=192.168.2.0
  • add address=10.5.50.1/24 interface=ether3-PPPoE network=10.5.50.0
  • add address=192.168.22.1/24 interface=ether4-Hotspot network=192.168.22.0
Step5:Add DNS

/ip dns

set allow-remote-requests=yes servers=192.168.22.1,8.8.4.4

Step6: Add Pppoe Server and Firewall Rule
  • /ppp profile
  • set *0 dns-server=8.8.8.8,8.8.4.4 local-address=10.5.50.1 remote-address=\
  •     PPPOE_POOL
  • add dns-server=8.8.8.8,8.8.4.4 local-address=10.5.50.1 name=2MB only-one=yes \
  •     rate-limit=500K/2M remote-address=PPPOE_POOL
  • /interface pppoe-server server
  • add authentication=pap,chap disabled=no interface=ether3-PPPoE max-mru=1480 \
  •     max-mtu=1480 one-session-per-host=yes service-name=service1
  • /ip dhcp-server network
  • add address=192.168.22.0/24 comment="hotspot network" gateway=192.168.22.1
  • /ip firewall filter 
  • add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
  •     disabled=yes
  • /ip firewall mangle
  • add action=mark-routing chain=prerouting comment=WAN1__PPPoE new-routing-mark=\
  •     pppoe-wan1 passthrough=yes src-address=10.5.50.2-10.5.50.254
  • add action=mark-routing chain=prerouting comment=WAN2__HOTSPOT \
  •     new-routing-mark=hotspot-wan2 passthrough=yes src-address=192.168.22.0/24
  • /ip firewall nat
  • add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
  •     disabled=yes
  • add action=masquerade chain=srcnat comment="WAN1 MASQUERADE" out-interface=WAN1
  • add action=masquerade chain=srcnat comment="WAN2 MASQUERADE" out-interface=WAN2
  • add action=masquerade chain=srcnat comment="masquerade pppoe network" \
  •     src-address=10.5.50.2-10.5.50.254
  • add action=masquerade chain=srcnat comment="masquerade hotspot network" \
  •     src-address=192.168.22.0/24
  • /ip proxy
  • set cache-path=web-proxy1
  • /ppp secret 
  • add name=admin password=1234 profile=2MB service=pppoe
Step7:Add Route
  • /ip route
  • add distance=1 gateway=192.168.1.1 routing-mark=pppoe-wan1
  • add distance=1 gateway=192.168.2.1 routing-mark=hotspot-wan2
  • add distance=1 gateway=192.168.2.1
  • add distance=1 gateway=192.168.1.1
if you have face error to view this video: Download Complete {Script} {Download Backup}


Author  Bilal Ahmad

• Hands on Experience with Cisco & Huawei Layer 2 & Layer 3 devices and Mikrotik Routers. • Maintained and managed several long distances RF point to point and point to multipoint links.