CONFIGURAZIONI MIKROTIK LOADBALANCING  2 WAN 2 LAN

ESEMPIO DI CONFIGURAZIONE 

 

 

 

set [ find default-name=ether2 ] name=wlan1

set [ find default-name=ether3 ] name=wlan2

 

/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

 

/ip address

add address=192.168.2.253/24 interface=sfp1 network=192.168.2.0

add address=192.168.4.1/24 interface=ether1 network=192.168.4.0

 

/ip dhcp-client

add add-default-route=no dhcp-options=hostname,clientid disabled=no interface=\

    wlan1 use-peer-dns=no use-peer-ntp=no

add add-default-route=no dhcp-options=hostname,clientid disabled=no interface=\

    wlan2 use-peer-dns=no use-peer-ntp=no

 

/ip dns

set servers=1.1.1.1,8.8.8.8

 

/ip firewall mangle

add action=mark-connection chain=input in-interface=wlan1 new-connection-mark=\

    wlan1_conn

add action=mark-connection chain=input in-interface=wlan2 new-connection-mark=\

    wlan2_conn

add action=mark-routing chain=output connection-mark=wlan1_conn \

    new-routing-mark=to_wlan1

add action=mark-routing chain=output connection-mark=wlan2_conn \

    new-routing-mark=to_wlan2

add action=accept chain=prerouting disabled=yes dst-address=192.168.4.0/24 \

    src-address=192.168.2.0/24

add action=accept chain=prerouting disabled=yes dst-address=192.168.2.0/24 \

    src-address=192.168.4.0/24

 

/ip firewall nat

add action=masquerade chain=srcnat out-interface=wlan1

add action=masquerade chain=srcnat out-interface=wlan2

 

/ip route

add distance=1 gateway=192.168.5.1 routing-mark=to_wlan1

add distance=1 gateway=192.168.178.1 routing-mark=to_wlan2

add check-gateway=ping distance=1 gateway=192.168.178.1,192.168.5.1

 

/ip service

set www-ssl disabled=no port=9443

 

/lcd

set default-screen=interfaces read-only-mode=yes

 

/system clock

set time-zone-name=Europe/Rome