If we have two different leased line links from two different service provider and they are reaching to my remote branch network from HQ. Network looks as below.
R Router1--isp1--R1--core sw1---HQ
R Router1--isp2--R2--core sw1---HQ
My question is how R1 or R2 discover that the link of respective ISP is gone down even the next hop public ip address of ISP is PINGable or reachable to switchover to the backup link if we are using any Dynamic or Static routing redundancy method at router level?
In addition, incase of dynamic routing how the protocol use the method to find out the status of any link.