Dual WAN Fallover Question for DHCP Client

Hi Mikrotik Team

Today set my Dual WAN Fallover (WAN Backup), and used this code to get that working. Ether1 is working as PPPoE client, and Ether2 is using LAN connection from another router near me. The both connections are totally different between. Different bandwidth etc.. Ether1 is getting adress from 10.103.0.1 and Ether2 is getting DHCP from 192.168.1.1 . Both interfaces Ether1 and Ether2 are into “WAN” list.

/ip/route
add dst-address=8.8.8.8 gateway=pppoe-out1 scope=10
add dst-address=208.67.222.222 gateway=pppoe-out1 scope=10
add dst-address=8.8.4.4 gateway=ether2 scope=10
add dst-address=208.67.220.220 gateway=ether2 scope=10

/ip/route
add dst-address=10.103.0.1 gateway=8.8.8.8 scope=10 target-scope=11 check-gateway=ping
add dst-address=10.103.0.1 gateway=208.67.222.222 scope=10 target-scope=11 check-gateway=ping
add dst-address=192.168.1.1 gateway=8.8.4.4 scope=10 target-scope=11 check-gateway=ping
add dst-address=192.168.1.1 gateway=208.67.220.220 scope=10 target-scope=11 check-gateway=ping

/ip/route
add distance=1 gateway=10.103.0.1 target-scope=12
add distance=2 gateway=192.168.1.1 target-scope=12

With just this code added, i didnt get internet on Ether2 (When ether1 is down), until i add DHCP Client manually for Ether2 interface. The WAN Fallover works, but, into DHCP Client window Ether1 stuck on “Searching” into status as shown bellow:

Can someone tell me if i do something wrong with my setup, and for that DHCP Client stuck, and didnt release IP adress? Thanks

Hard to say with just the routes.

Post your whole configuration, instructions here:
http://forum.mikrotik.com/t/forum-rules/173010/1

and also twice (once when ISP1 is used and once when it has failed over to ISP2) the output of:

/ip address print

How exactly are you simulating the loss of connection for ISP1?



This is entire configuration for router:

# 2025-05-04 18:43:59 by RouterOS 7.17.2
# software id = XXXXX
#
# model = C53UiG+5HPaxD2HPaxD
# serial number = XXXXX
/container mounts
add dst=/opt/adguardhome/work name=adguard-work src=\
    /usb2/adguard-home/opt/adguardhome/work
add dst=/opt/adguardhome/conf name=adguard-conf src=\
    /usb2/adguard-home/opt/adguardhome/conf
/interface bridge
add admin-mac=XXX auto-mac=no comment=defconf name=bridge \
    port-cost-mode=short
add name=docker
/interface wifi
set [ find default-name=wifi1 ] channel.skip-dfs-channels=all \
    configuration.country="North Macedonia" .dtim-period=3 .mode=ap \
    .multicast-enhance=enabled .ssid="Mikrotik - 5G" mtu=1500 \
    security.authentication-types=wpa2-psk,wpa3-psk .connect-priority=0/1 \
    .disable-pmkid=yes .ft=no .ft-over-ds=no .wps=disable steering.rrm=yes \
    .wnm=yes
set [ find default-name=wifi2 ] channel.skip-dfs-channels=all \
    configuration.country="North Macedonia" .dtim-period=3 .mode=ap \
    .multicast-enhance=enabled .ssid=Mikrotik-2G mtu=1500 \
    security.authentication-types=wpa2-psk,wpa3-psk .connect-priority=1/2 \
    .disable-pmkid=yes .ft=no .ft-over-ds=no .wps=disable steering.rrm=yes \
    .wnm=yes
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
    use-peer-dns=yes user=username
/interface veth
add address=192.168.34.2/24 gateway=192.168.34.1 gateway6="" name=adguardhome
/interface wireguard
add comment=back-to-home-vpn listen-port=14671 mtu=1420 name=back-to-home-vpn
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge lease-time=10m name=defconf
/ip smb users
add disabled=yes name=guest
add name=admin
/container
add interface=adguardhome mounts=adguard-work,adguard-conf root-dir=\
    usb2/adguard-home start-on-boot=yes workdir=/opt/adguardhome/work
/container config
set registry-url=https://registry-1.docker.io tmpdir=usb2/pull
/ip smb
set domain=WORKGROUP
/interface bridge port
add bridge=bridge comment=defconf interface=ether3 internal-path-cost=10 \
    path-cost=10
add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 \
    path-cost=10
add bridge=bridge comment=defconf interface=ether5 internal-path-cost=10 \
    path-cost=10
add bridge=bridge comment=defconf interface=wifi1 internal-path-cost=10 \
    path-cost=10
add bridge=docker interface=adguardhome
add bridge=bridge interface=wifi2
add bridge=*F interface=pppoe-out1
/interface bridge settings
set use-ip-firewall=yes
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=pppoe-out1 list=WAN
add interface=ether2 list=WAN
/interface ovpn-server server
add mac-address=private name=ovpn-server1
/interface wireguard peers
add allowed-address=192.168.216.3/32,fc00:0:0:216::3/128 client-address=\
    192.168.216.3/32,fc00:0:0:216::3/128 client-dns=192.168.216.1 \
    client-endpoint=private client-keepalive=30s \
    comment="C53UiG+5HPaxD2HPaxD | samsung " interface=\
    back-to-home-vpn name=peer2 persistent-keepalive=30s private-key=\
    "private="
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
    192.168.88.0
add address=192.168.34.1/24 comment="AdGuard Home" interface=docker network=\
    192.168.34.0
/ip cloud
set back-to-home-vpn=enabled ddns-enabled=yes ddns-update-interval=10m
/ip dhcp-client
add comment=defconf interface=ether1
add interface=ether2
/ip dhcp-server lease
add address=192.168.88.251 client-id=1:9c:14:63:7e:91:95 mac-address=\
    xxx server=defconf
add address=192.168.88.243 client-id=1:d4:cf:f9:dd:90:55 mac-address=\
    xxx server=defconf
add address=192.168.88.18 client-id=1:10:51:7:5e:1:eb mac-address=\
    xxx server=defconf
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
    192.168.88.1
/ip dns
set allow-remote-requests=yes servers=192.168.34.2
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan type=A
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment=AdGuardHome src-address=\
    192.168.34.0/24
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip route
add comment="Dual WAN" disabled=no dst-address=8.8.8.8/32 gateway=pppoe-out1 \
    routing-table=main scope=10 suppress-hw-offload=no
add comment="Dual WAN" disabled=no dst-address=208.67.222.222/32 gateway=\
    pppoe-out1 routing-table=main scope=10 suppress-hw-offload=no
add comment="Dual WAN" disabled=no dst-address=8.8.4.4/32 gateway=ether2 \
    routing-table=main scope=10 suppress-hw-offload=no
add comment="Dual WAN" disabled=no dst-address=208.67.220.220/32 gateway=\
    ether2 routing-table=main scope=10 suppress-hw-offload=no
add check-gateway=ping comment="Dual WAN" disabled=no dst-address=\
    10.103.0.1/32 gateway=8.8.8.8 routing-table=main scope=10 \
    suppress-hw-offload=no target-scope=11
add check-gateway=ping comment="Dual WAN" disabled=no dst-address=\
    10.103.0.1/32 gateway=208.67.222.222 routing-table=main scope=10 \
    suppress-hw-offload=no target-scope=11
add check-gateway=ping comment="Dual WAN" disabled=no dst-address=\
    192.168.1.1/32 gateway=208.67.220.220 routing-table=main scope=10 \
    suppress-hw-offload=no target-scope=11
add comment="Dual WAN" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    10.103.0.1 routing-table=main suppress-hw-offload=no target-scope=12
add comment="Dual WAN" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
    192.168.1.1 routing-table=main suppress-hw-offload=no target-scope=12
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api-ssl disabled=yes
/ip smb shares
add directory=usb2/disk name=disk valid-users=admin
set [ find default=yes ] directory=pub
/ip traffic-flow
set active-flow-timeout=1m
/ip traffic-flow target
add dst-address=192.168.88.30 port=666 version=5
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
    33434-33534 protocol=udp
add action=accept chain=input comment=\
    "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
    udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
    protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=input comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
add action=accept chain=forward comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
    "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
    hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
    500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=forward comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
/snmp
set enabled=yes location=192.168.88.35 trap-generators="" trap-version=2
/system clock
set time-zone-name=Europe/Skopje
/system note
set show-at-login=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

This is output from /ip adress print when WAN1 from Ether 1 is usung:

[admin@MikroTik] > /ip address print
Flags: D - DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE
#   ADDRESS           NETWORK        INTERFACE       
;;; defconf
0   192.168.88.1/24   192.168.88.0   bridge          
;;; AdGuard Home
1   192.168.34.1/24   192.168.34.0   docker          
;;; back-to-home-vpn
2 D 192.168.216.1/24  192.168.216.0  back-to-home-vpn
3 D 192.168.1.228/24  192.168.1.0    ether2          
4 D 10.103.X.248/32   10.103.X.1     pppoe-out1

and this is output from WAN2 when Ether1 is down/disabled:

[admin@MikroTik] > /ip address print
Flags: D - DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE
#   ADDRESS           NETWORK        INTERFACE       
;;; defconf
0   192.168.88.1/24   192.168.88.0   bridge          
;;; AdGuard Home
1   192.168.34.1/24   192.168.34.0   docker          
;;; back-to-home-vpn
2 D 192.168.216.1/24  192.168.216.0  back-to-home-vpn
3 D 192.168.1.228/24  192.168.1.0    ether2

I simulating downtime for WAN1 by simply disabling the Ether1 intereface from Winbox. :slight_smile:

Yep, then it is normal, as the pppoe-out1 is “standing on the shoulders” of ether1, if you disable ether1 you disable also pppoe-out1, so that devices loses the connection to the DHCP server (and the DHCP client on the Mikrotik waits forever).

What is connected physically to eher1 ?
A fiber or dsl modem/adapter by the ISP?

The failover should then be simulated in three ways:

  1. the cable between your Mikrotik ether1 and the ISP device physically disconnected (this will as well result in ether1/pppoe-out1 having no more an IP from the DHCP server)
  2. the connection on the other side of the ISP device physically disconnected (depending on how the device works/it is configured, the DHCP server may also not provide an IP anymore, but is relatively rare)
  3. replace the 8.8.8.8 (or whatever) canary with an actually unreachable address and see what happens

As you can see, your ether1 “never” gets an IP, it is the pppoe-out1 that gets one 10.103.X.248 when the ether1 interface is enabled.

Usually a DHCP server (from the ISP device) also provides a route, which being dynamic will have a distance of 0 and take precedence over yours (that seem like having both distance=1?).

Check (when everything is connected and running normally with ISP1 as working connection) and if needed post for comment the output of:

/ip route print

1`. Here is problem1
add bridge**=F* interface=pppoe-out1
Do not add the pppoe interface to the bridge!!!

  1. Here is problem2
    /ip dhcp-client
    add comment=defconf interface=ether1

    This should be disabled or removed, the client settings for wan are dealt with in the pppoe settings!!

  2. Problem number 3
    /interface pppoe-client
    add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 use-peer-dns=yes user=cvetanovski.dean

    You are attempting to use default routes and its likely interfering with the manual routes you are setting up for failover.
    Set this to disabled…

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

As far as pppoe goes, my understanding is that the majority of the time the IP provided is dynamic thus please confirm yours is indeed static!

  1. Manual routes KISS EDIT: correction forgot to include check-gateway! tx to CGX
    /ip route
    add check-gateway=ping comment=“Primary WAN” dst-address=0.0.0.0/0 gateway=8.8.8.8 routing-table=main scope=10 target-scope=12
    add check-gateway=ping comment=“PrimaryWAN” distance=2 dst-address=0.0.0.0/0 gateway=208.67.222.222 routing-table=main scope=10 target-scope=12
    add comment=“Primary ISP” dst-address=8.8.8.8/32 gateway=pppoe-out1 routing-table=main scope=10 target-scope=11
    add comment=“Primary ISP” distance=2 dst-address=208.67.222.222/32 gateway=pppoe-out1 routing-table=main scope=10 target-scope=11

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    add comment=Secondary WAN distance=4 dst-address=0.0.0.0/0 gateway=ether2 routing-table=main

There is no need for any further work for wan2 as there are no other options if it goes down.

  1. This is normally not required but you may have good reasons…
    /interface bridge settings
    set use-ip-firewall=yes
    ???
  1. Removed pppoe-out1 interface from bridge !
  2. Turn disabled !
  3. Turn it Disabled that option !
  4. Removed all previous Routes i have entered before , and insert your as was writen. For now works just fine.

Just one more question.. When open speed test for server it show IP adress from Secondary backup Line (ether2), and i think it not should show that, but from PPPoE connection i think? This is image from routes currently:

Sorry need to see script not pics.
/export file=anynameyouwish (minus router serial number, any WANIP public information, keys, passwords )

The pic does show that the first recursive is active, and the second recursive not being used and the backup not being used.
Thus nothing strange from that at least.

Configuration i have posted before. The strange is that when make a speedtest it detect that External IP is from second WAN from pool 46.x.x.x, and should be from first main WAN and from pool 15.10.x.x

But then you reported changing some settings, so the posted configuration is not the one currently running (or you lied :open_mouth: when you said you changed it :wink: ) , anav wants to see the current one.

There is always the concrete possibility that EITHER:

  1. the description of the changes you made is not accurate enough
    OR:
  2. the changes you actually made are even slightly different from the description.

Posting the situation “as is” eliminates the risk of misunderstandings or miscommunication.

No reason to lie, but however will post current configuration bellow:

@anav here is it.

# 2025-05-05 16:23:29 by RouterOS 7.17.2
# software id = XX
#
# model = C53UiG+5HPaxD2HPaxD
# serial number = XXX
/container mounts
add dst=/opt/adguardhome/work name=adguard-work src=\
    /usb2/adguard-home/opt/adguardhome/work
add dst=/opt/adguardhome/conf name=adguard-conf src=\
    /usb2/adguard-home/opt/adguardhome/conf
/interface bridge
add admin-mac=48:A9:8A:BA:XX:XX auto-mac=no comment=defconf name=bridge \
    port-cost-mode=short
add name=docker
/interface wifi
set [ find default-name=wifi1 ] channel.skip-dfs-channels=all \
    configuration.country="North Macedonia" .dtim-period=3 .mode=ap \
    .multicast-enhance=enabled .ssid="Mikrotik - 5G" mtu=1500 \
    security.authentication-types=wpa2-psk,wpa3-psk .connect-priority=0/1 \
    .disable-pmkid=yes .ft=no .ft-over-ds=no .wps=disable steering.rrm=yes \
    .wnm=yes
set [ find default-name=wifi2 ] channel.skip-dfs-channels=all \
    configuration.country="North Macedonia" .dtim-period=3 .mode=ap \
    .multicast-enhance=enabled .ssid=Mikrotik-2G mtu=1500 \
    security.authentication-types=wpa2-psk,wpa3-psk .connect-priority=1/2 \
    .disable-pmkid=yes .ft=no .ft-over-ds=no .wps=disable steering.rrm=yes \
    .wnm=yes
/interface pppoe-client
add disabled=no interface=ether1 name=pppoe-out1 use-peer-dns=yes user=\
    my.username
/interface veth
add address=192.168.34.2/24 gateway=192.168.34.1 gateway6="" name=adguardhome
/interface wireguard
add comment=back-to-home-vpn listen-port=14671 mtu=1420 name=back-to-home-vpn
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge lease-time=10m name=defconf
/ip smb users
add disabled=yes name=guest
add name=admin
/container
add interface=adguardhome mounts=adguard-work,adguard-conf root-dir=\
    usb2/adguard-home start-on-boot=yes workdir=/opt/adguardhome/work
/container config
set registry-url=https://registry-1.docker.io tmpdir=usb2/pull
/ip smb
set domain=WORKGROUP
/interface bridge port
add bridge=bridge comment=defconf interface=ether3 internal-path-cost=10 \
    path-cost=10
add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 \
    path-cost=10
add bridge=bridge comment=defconf interface=ether5 internal-path-cost=10 \
    path-cost=10
add bridge=bridge comment=defconf interface=wifi1 internal-path-cost=10 \
    path-cost=10
add bridge=docker interface=adguardhome
add bridge=bridge interface=wifi2
/interface bridge settings
set use-ip-firewall=yes
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=pppoe-out1 list=WAN
add interface=ether2 list=WAN
/interface ovpn-server server
add mac-address=FE:FF:05:E5:XX:XX name=ovpn-server1
/interface wireguard peers
add allowed-address=192.168.216.3/32,fc00:0:0:216::3/128 client-address=\
    192.168.216.3/32,fc00:0:0:216::3/128 client-dns=192.168.216.1 \
    client-endpoint=hee08prymek.vpn.mynetname.net client-keepalive=30s \
    comment="C53UiG+5HPaxD2HPaxD | samsung SM-S918B" interface=\
    back-to-home-vpn name=peer2 persistent-keepalive=30s private-key=\
    "private=" public-key=\
    "private="
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
    192.168.88.0
add address=192.168.34.1/24 comment="AdGuard Home" interface=docker network=\
    192.168.34.0
/ip cloud
set back-to-home-vpn=enabled ddns-enabled=yes ddns-update-interval=10m
/ip dhcp-client
add comment=defconf disabled=yes interface=ether1
add interface=ether2
/ip dhcp-server lease
add address=192.168.88.251 client-id=1:9c:14:63:7e:91:95 mac-address=\
    9C:XX:63:7E:XX:95 server=defconf
add address=192.168.88.243 client-id=1:d4:cf:f9:dd:90:55 mac-address=\
    D4:XX:F9:DD:90:55 server=defconf
add address=192.168.88.18 client-id=1:10:51:7:5e:1:eb mac-address=\
    10:51:07:XX:01:EB server=defconf
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
    192.168.88.1
/ip dns
set allow-remote-requests=yes servers=192.168.34.2
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan type=A
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment=AdGuardHome src-address=\
    192.168.34.0/24
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip route
add comment="Tran Kabel WAN" disabled=no dst-address=0.0.0.0/0 gateway=\
    8.8.8.8 routing-table=main scope=10 suppress-hw-offload=no target-scope=\
    12
add comment="Tran Kabel WAN" disabled=no distance=2 dst-address=0.0.0.0/0 \
    gateway=208.67.222.222 routing-table=main scope=10 suppress-hw-offload=no \
    target-scope=12
add comment="Tran Kabel WAN" disabled=no dst-address=8.8.8.8/32 gateway=\
    pppoe-out1 routing-table=main scope=10 suppress-hw-offload=no \
    target-scope=11
add comment="Tran Kabel WAN" disabled=no distance=2 dst-address=\
    208.67.222.222/32 gateway=pppoe-out1 routing-table=main scope=10 \
    suppress-hw-offload=no target-scope=11
add comment="Telekom WAN Backup" disabled=no distance=4 dst-address=0.0.0.0/0 \
    gateway=ether2 routing-table=main suppress-hw-offload=no
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api-ssl disabled=yes
/ip smb shares
add directory=usb2/disk name=disk valid-users=admin
set [ find default=yes ] directory=pub
/ip traffic-flow
set active-flow-timeout=1m
/ip traffic-flow target
add dst-address=192.168.88.30 port=666 version=5
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
    33434-33534 protocol=udp
add action=accept chain=input comment=\
    "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
    udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
    protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=input comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
add action=accept chain=forward comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
    "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
    hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
    500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=forward comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
/snmp
set enabled=yes location=192.168.88.35 trap-generators="" trap-version=2
/system clock
set time-zone-name=Europe/Skopje
/system note
set show-at-login=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

The failover configuration looks good to me, and it is coherent with the pic you previously posted of the route list.
The ether2 route is only S (static) whilst the “good” ones via pppoe-out1 and 8.8.8.8 are AS (Active Static).
The result of speednet must be an artifact (or could it be browser cache)? :confused:
In any case, if you try, while doing another speedtest, to simply disconnect the cable from ether2, you will be sure that ether2 is NOT used.

Nothing I can see thus far that would cause any issues.
Couple of things seem off.

  1. The second NAT rule seems to be doing nothing, you identify a source address but what is being source natted too???
    So perhaps you should explain why you have the second rule ( intent-purpose ??)
    /ip firewall nat
    add action=masquerade chain=srcnat comment=“defconf: masquerade”
    ipsec-policy=out,none out-interface-list=WAN
    add action=masquerade chain=srcnat comment=AdGuardHome src-address=
    192.168.34.0/24

  2. Please explain the purpose of this rule: set use-ip-firewall=yes ???
    If you simply thought this was required because you have a bridge, then remove it…

  1. That NAT is for container that was used on router! Currently is not but will activate it!!

  2. That was from default configuration from MTK. I dont have set something like that!

Yes that seems fine. Question was why browser is using, wan 2 as server testing..

Nope, this is not part of any default setting, its on the config you provided, and the only way it is enabled is if you made it so, but in any case no biggie, just disable it.
( mostly used for queuing I believe ).
/interface bridge settings
set use-ip-firewall=yes

The reason is because you currently have two ECMP routes with distance 1 (the two routes with + at the top of the route table), one of them has 192.168.1.1 as gateway, which goes through ether2. You should go to IP → DHCP Client and set Add Default Route to no for the entry associated with ether2.

In addition to that, currently your static default routes are missing “check-gateway=ping”. You can update/replace the content of the static routes with this:


/ip route
add comment="Tran Kabel WAN" \
    dst-address=0.0.0.0/0 gateway=8.8.8.8 routing-table=main \
    scope=30 target-scope=11 distance=1 check-gateway=ping
add comment="Tran Kabel WAN" \
    dst-address=0.0.0.0/0 gateway=208.67.222.222 routing-table=main \
    scope=30 target-scope=11 distance=2 check-gateway=ping
add comment="Tran Kabel WAN Recursive" 
    dst-address=8.8.8.8/32 gateway=pppoe-out1 routing-table=main 
    scope=11 target-scope=10
add comment="Tran Kabel WAN Recursive" \
    dst-address=208.67.222.222/32 gateway=pppoe-out1 routing-table=main \
    scope=11 target-scope=10
add comment="Telekom WAN Backup" 
    dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-table=main 
    scope=30 target-scope=10 distance=4

Some updates:

  • Use check-gateway=ping on the two main WAN routes with destination 0.0.0.0/0
  • No needs to change distance on the recursive route with destination 208.67.222.222/32
  • Target scope of the recursive routes only needs to be 10 (value of the scope of the connected routes)
  • Explicitly set the scope of the recursive routes to be at least 1 above target-scope, in this case 11
  • Set target-scope of the two static default routes that reference those recursive routes to be at least this value, in this case 11
  • Set scope of the two static default routes that reference those recursive routes to 30, the default value for static routes, although technically an effective value of 12 is already enough.
  • The manually added default route with distance 4 that uses Telekom WAN can use 192.168.1.1 as gateway, because that’s the gateway that the dynamic route (added when Add Default Route = yes) listed. It’s better than only specifying ether2.

In WinBox you can turn on the visibility of the two Scope and Target Scope columns of the route table for a better picture.

As alternative for the manually added “Telekom WAN Backup” route, you can remove it, and instead set Add Default Route back to yes for the DHCP client instance attached to ether2, but this time, also go to the Advanced tab and change the value of Default Route Distance to 4.

That was my fault cgx, I provided the incomplete routes setup ( forgot to ensure the check-gateway=ping were included )
Should have been.
/ip route
add check-gateway=ping comment=“Primary WAN” dst-address=0.0.0.0/0 gateway=8.8.8.8 routing-table=main scope=10 target-scope=12
add check-gateway=ping comment=“PrimaryWAN” distance=2 dst-address=0.0.0.0/0 gateway=208.67.222.222 routing-table=main scope=10 target-scope=12
add comment=“Primary ISP” dst-address=8.8.8.8/32 gateway=pppoe-out1 routing-table=main scope=10 target-scope=11
add comment=“Primary ISP” distance=2 dst-address=208.67.222.222/32 gateway=pppoe-out1 routing-table=main scope=10 target-scope=11
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
add comment=Secondary WAN distance=4 dst-address=0.0.0.0/0 gateway=ether2 routing-table=main

Concur the secondary wan could be handed in ip dhcp settings, using default route=yes, with distance set at 4, either way works just fine.

Yes Disabling “Default Route to NO” for Ether2 DHCP Client makes the change do not see mixed External IP when open speedtest or other sites where external IP is exposed ! But if just disable “Default Route to NO” when disable Ether1 intereface, the recursive to Ether2 not happens. Why? To makes recursive, must keep “Default Route to Yes” for Ether2, and add “Default Route Distance” to “4” from Advanced Tab. Added PING tag to Routes too, that was missed.

Thank you Anav, your comments help me a lot in resolving this. Disabling “Default Route = Yes” for Ether 2 DHCP Client makes recursive do not work for some reason. Was needed to set "Default Route Distance to 4, and keep “Default Route = Yes” to start working. Now dont see mixed External IP.

One question more.. I know that is not topic for this, but when use first WAN my IPTV constantly buffers and stop playing.. When disable first WAN, and switch to second one, it works without buffering, even it is with much smaller speed then previous one. For examl. First one is 50/50 DL/UL respectively, and second one is 10/1 (Yes ADSL is still alive in some areas in 2025 year :F )

Yes, I prefer to turn off the default route in IP DHCP Settings so its clear to the reader what the routes are doing, clearly in this case the default route, if still in place for WAN2, with the same distance as the PRIMARY, would act like ECMP and thus get some of the sessions. Turning it off and using the manual route or changing its distance from default 1 to 4 accomplish the same thing.

As stated I prefer the manual route as its more flexible to make changes later. For example if you want a vpn service or to forward a port to the lan via WAN2, then one has to ensure the WAN2 is also up and thus one applies recursive to it and then one just modifies the existing manual route accordingly.

As to IPTV buffering, no clue… It may be best to use IPTV solely with WAN2?
Others more versed in traffic flow irregularities should be able to point you in the right direction