Hi there,
Your simplest option is to install a floating static route.
Assuming your primary ISP gateway is 1.1.1.1 and the secondary is 2.2.2.2, use the following config :
!
ip route 0.0.0.0 0.0.0.0 1.1.1.1
ip route 0.0.0.0 0.0.0.0 2.2.2.2 10
!
In the event of the primary link going down the secondary route will be installed.
You may instead want to consider using ip sla to cover scenarios where the ISP link is not simply down/down. Assuming you are using gi0/1 for the primary ISP and gi0/2 for the secondary:
!
ip sla 1
icmp-echo 1.1.1.1 source-interface gi0/1
timeout 1000
threshold 2
frequency 3
!
ip sla schedule 1 life forever start-time now
!
track 1 ip sla 1 reachability
!
ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 1
!
This will ping the ISP gateway, once it is no longer reachable, the static route will be removed and the second route installed. It will then be re-installed once the primary ISP becomes reachable again.
cheers,
Seb.