Community discussions

MikroTik App
 
muk
just joined
Topic Author
Posts: 10
Joined: Thu Jul 21, 2022 3:17 pm

2 WAN Auto Failover

Fri Feb 03, 2023 4:05 pm

Hi
Dear Team
Hope you are fine
I have RB951G-2HnD v7.7
i want to make auto failover links in router board. when the 1st link is down physically then automatically shifted to 2nd link but, when link is down logically then link is not shifted to another link.
how can i resolve this issue..??
You do not have the required permissions to view the files attached to this post.
 
User avatar
thn80
Frequent Visitor
Frequent Visitor
Posts: 60
Joined: Tue Jan 24, 2023 8:25 pm
Location: Germany

Re: 2 WAN Auto Failover

Fri Feb 03, 2023 4:08 pm

What exactly have you configured so far?
 
muk
just joined
Topic Author
Posts: 10
Joined: Thu Jul 21, 2022 3:17 pm

Re: 2 WAN Auto Failover

Fri Feb 03, 2023 4:33 pm

What exactly have you configured so far?
RouterOS 7.7
model = RB951G-2HnD

/interface bridge
add name=bridge1_LAN

/interface ethernet
set [ find default-name=ether1 ] name=WAN1_ether1
set [ find default-name=ether2 ] name=WAN2_ether2
set [ find default-name=ether3 ] name=WAN3_ether3
set [ find default-name=ether4 ] name=ether4_LAN
set [ find default-name=ether5 ] name=ether5_LAN

/ip pool
add name=dhcp_pool1 ranges=77.77.77.51-77.77.77.254

/ip dhcp-server
add address-pool=dhcp_pool1 interface=bridge1_LAN lease-time=1h name=dhcp1

/routing table
add disabled=no fib name=WAN2_route
add disabled=no fib name=WAN3_route
add disabled=no fib name=WAN1_route
add disabled=no fib name=to_WAN1
add disabled=no fib name=to_WAN2

/interface bridge port
add bridge=bridge1_LAN interface=ether4_LAN
add bridge=bridge1_LAN interface=wlan1
add bridge=bridge1_LAN interface=wlan2
add bridge=bridge1_LAN interface=ether5_LAN

/ip address
add address=192.168.18.151/24 interface=WAN2_ether2 network=192.168.18.0
add address=192.168.100.151/24 interface=WAN1_ether1 network=192.168.100.0
add address=77.77.77.1/24 interface=bridge1_LAN network=77.77.77.0
add address=192.168.50.151/24 interface=WAN3_ether3 network=192.168.50.0

/ip dhcp-server network
add address=77.77.77.0/24 gateway=77.77.77.1

/ip dns
set allow-remote-requests=yes servers=8.8.8.8,4.4.2.2

/ip firewall mangle
add action=mark-connection chain=output connection-mark=no-mark \
    connection-state=new new-connection-mark=WAN1_Conn out-interface=\
    WAN1_ether1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_Conn \
    new-routing-mark=to_WAN1 out-interface=WAN1_ether1 passthrough=yes
add action=mark-connection chain=output connection-mark=no-mark \
    connection-state=new new-connection-mark=WAN2_Conn out-interface=\
    WAN2_ether2 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_Conn \
    new-routing-mark=to_WAN2 out-interface=WAN2_ether2 passthrough=yes

/ip firewall nat
add action=masquerade chain=srcnat src-address=77.77.77.0/24
add action=masquerade chain=srcnat out-interface=WAN1_ether1
add action=masquerade chain=srcnat out-interface=WAN2_ether2
add action=masquerade chain=srcnat out-interface=WAN3_ether3

/ip route
add check-gateway=ping disabled=no distance=3 dst-address=0.0.0.0/0 gateway=\
    192.168.100.1 pref-src="" routing-table=main scope=30 \
    suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
    192.168.18.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=\
    no target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    192.168.18.1 pref-src="" routing-table=WAN2_route scope=30 \
    suppress-hw-offload=no target-scope=10
add disabled=yes distance=1 dst-address=8.8.8.8/32 gateway=192.168.100.1 \
    pref-src="" routing-table=main scope=10 suppress-hw-offload=no \
    target-scope=10
add disabled=yes distance=1 dst-address=4.4.2.2/32 gateway=192.168.18.1 \
    pref-src="" routing-table=main scope=10 suppress-hw-offload=no \
    target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    192.168.50.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=\
    no target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    192.168.50.1 pref-src="" routing-table=WAN3_route scope=30 \
    suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\
    8.8.8.8 pref-src="" routing-table=to_WAN1 scope=30 suppress-hw-offload=no \
    target-scope=11
add check-gateway=ping disabled=yes distance=2 dst-address=0.0.0.0/0 gateway=\
    4.4.2.2 pref-src="" routing-table=to_WAN1 scope=30 suppress-hw-offload=no \
    target-scope=11
add check-gateway=ping disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\
    4.4.2.2 pref-src="" routing-table=to_WAN2 scope=30 suppress-hw-offload=no \
    target-scope=11
add check-gateway=ping disabled=yes distance=2 dst-address=0.0.0.0/0 gateway=\
    8.8.8.8 pref-src="" routing-table=to_WAN2 scope=30 suppress-hw-offload=no \
    target-scope=11

Who is online

Users browsing this forum: lurker888, Wave and 46 guests