Setting Failover with 2 ISP on 1 router

Hi,

I have 2 Internet Connecttion and i want to set set 1 primary & other as a failover. i have installed 3 lan cards 1as PUBLIC, 2nd as ISP2 & 3rd as LOCAL.
Now i need to set Public as Primary Gateway & isp2 as failover gateway.
Pls let me know if i have to set 2 gateways in IP/ROUTE.
How to set the failover, do i have to write a scripts or it can be done by ip routing.

Now i have installed a new lan card for the new ISP2 when i try to enable it through winbox, it gives error "could’nt change interface ISP2 - setting flag error(6). what is this error.


Pls reply me as soonn as possible.

you can do in another way.
set all interface up.
do network watch for the first ISP.
if UP do script1
if down do script2

script1:
set default gateway to ISP 1

script2:
set default gateway to ISP 2