Hi guys,
I have set up my RB951G-2HnD with dual Internet connections WAN1 and WAN2 and WLAN users. I have done PCC load balancing and failover.
The problem arises when, for example, the first Internet is disconnected and does not automatically switch over to the second Internet. The first interface must be manually disabled to enable the second Internet. After the first Internet connection is reconnected, the Internet remains on the second line of the Internet until it is manually disabled again.
Failover really doesn’t work. I also tried these settings on other Mikrotik device 433UAH and it didn’t make any difference. also I also checked the routing lines several times for Longest Prefix matching and I don’t know where the problem is.
I want the WAN2 to be activated immediately when the WAN1 is disconnected, and after the WAN1 is comes up, the WAN1 will be primary line and serve users.
Also provide users with both Internet broadband when both are connected.
Please guide how the problem solved. Any advise would be greatly appreciated.
The settings are as follows :
Ether2 - WAN1 (192.168.3.2/24), main ISP → 2Mb Bandwidth
Ether3 - WAN2 (192.168.3.10/24) → 8 Mb Bandwidth
wlan1 - local network 192.168.2.1/24
my configuration:
/interface ethernet
set [ find default-name=ether2 ] name=WAN1-ether2
set [ find default-name=ether3 ] name=WAN2-ether3
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk eap-methods=“” group-ciphers=
tkip,aes-ccm management-protection=allowed mode=dynamic-keys name=
profile1 supplicant-identity=“” unicast-ciphers=tkip,aes-ccm
wpa-pre-shared-key=“mikrotik” wpa2-pre-shared-key=“mikrotik”
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-g/n channel-width=20/40mhz-Ce
disabled=no frequency=2422 mode=ap-bridge radio-name=MyWifiNet
security-profile=profile1 ssid=MyWifiNet
/ip pool
add name=dhcp_pool0 ranges=192.168.2.20-192.168.2.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=wlan1 lease-time=2d name=
dhcp1
/ip address
add address=192.168.3.2/24 interface=WAN1-ether2 network=192.168.3.0
add address=192.168.10.2/24 interface=WAN2-ether3 network=192.168.10.0
add address=192.168.2.1/24 interface=wlan1 network=192.168.2.0
/ip dhcp-server network
add address=192.168.2.0/24 dns-server=8.8.8.8,4.2.2.4 gateway=192.168.2.1
ntp-server=202.162.32.12
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall mangle
add action=accept chain=prerouting dst-address=192.168.3.0/24 in-interface=
wlan1
add action=accept chain=prerouting dst-address=192.168.10.0/24 in-interface=
wlan1
add action=mark-connection chain=prerouting connection-mark=no-mark
in-interface=WAN1-ether2 new-connection-mark=ISP1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark
in-interface=WAN2-ether3 new-connection-mark=ISP2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface=wlan1 new-connection-mark=ISP1_conn
passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface=wlan1 new-connection-mark=ISP2_conn
passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting connection-mark=ISP1_conn
in-interface=wlan1 new-routing-mark=to_ISP1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ISP2_conn
in-interface=wlan1 new-routing-mark=to_ISP2 passthrough=yes
add action=mark-routing chain=output connection-mark=ISP1_conn
new-routing-mark=to_ISP1 passthrough=yes
add action=mark-routing chain=output connection-mark=ISP2_conn
new-routing-mark=to_ISP2 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1-ether2
add action=masquerade chain=srcnat out-interface=WAN2-ether3
/ip route
add check-gateway=ping distance=1 gateway=192.168.3.1 routing-mark=to_ISP1
add check-gateway=ping disabled=yes distance=1 gateway=192.168.10.1
routing-mark=to_ISP2
add check-gateway=ping distance=1 gateway=192.168.3.1
add check-gateway=ping distance=2 gateway=192.168.10.1