Why wont check-gateway work for DHCP assigned internet acess

Hello

I wanted to implement failover on my RB433UAH by using
http://wiki.mikrotik.com/wiki/Two_gateways_failover

I plug in my primary internet conection to Eth1 and get IP settings assigned by DHCP.
As a secondary internet I use an USB 3G modem also getting settings by DHCP.
If my primary internet goes down, I want my RB to switch over to my 3G modem by enabling the check-gateway=ping on my default routes.

For these two internet connections, I dynamically gets default routes added to my routing table.

On dynamically added routes, I cannot use check-gateway, nor can I change the distance
I cannot add static default routes as my gateways are not static - they may vary over time and with ISP.

How is this intended to work?

/Per

/routing filter
add action=passthrough chain=dynamic-in disabled=no set-check-gateway=ping

Try that.

EDIT: You can change the distance under the dhcp client for that interface.

Thanks allot.

I’ll try…

Also, for some reason, I cannot ping my 3G gateway. I don’t know why, so it might be impossible to do the ping-check unless you can just check one of the interfaces. Is there a posibility for that?

(I can set the default distance under dhcp-client for my wired internet, but I cannot find how to increase it for the PPP client (that is used for 3G))

/Per

Now I tried, but unfortunately I cannot get it to work.

If I unplug my wired internet from my RouterBoard, the dynamic route gets inactive and my 3G route becomes the active one.
Conclusion: When the RB looses the ehternet link it reacts by changeing route.

I have my RB connected via a switch to my ISP. If I unplug the cable between the switch and the ISP, the RB still sees a link, but shouldn’t be able to ping the gateway. In this case, the RB does not react by changeing active default route, even though I have the
/routing filter
chain=dynamic-in protocol=“” invert-match=no action=passthrough set-check-gateway=ping



/Per

it should work. if you double click on the dynamic route does it show its using check-gateway now? Maybe that routing filter isn’t being applied properly.

No, the check-ping is empty in the default route !!!

/Per
settings.JPG

weird. which version of routeros?

can you post:

/ip route print terse where dynamic dst-address=0.0.0.0/0
and
/routing filters export

Sam

Hello

Im runing RouterOS 4.13


> /ip route print terse where dynamic dst-address=0.0.0.0/0
 0 ADS  dst-address=0.0.0.0/0 gateway=192.168.110.1 gateway-status=192.168.110.1 reachable ether1 distance=0 scope=30 target-scope=10 
 1  DS  dst-address=0.0.0.0/0 gateway=10.112.113.251 gateway-status=10.112.113.251 reachable GPRS-Telia distance=1 scope=30 target-scope=10 


[admin@SevenAcreRemoteRoute] > /routing filter export 
# feb/09/2011 06:55:35 by RouterOS 4.13
# software id = 7WYN-I37Q
#
/routing filter
add action=passthrough chain=dynamic-in comment="" disabled=no invert-match=no protocol="" set-check-gateway=ping

Was the information what you requested?
Did you get any ideas from it?

Hi.

I realized that i had the protocol=“” specified.
If I remove that part (disabling the protocols in WinBox) the default routes get the check-gateway set to “ping” .

When I now disable connection to my wired internet, the route gets inactive after a short vile,
BUT my alternate route to internet (through 3G) never gets the Active flag.

How come?

/Per

any solution?
i have the same situation :frowning: