I'm trying to setup a complete redundant network by having different links connecting between my three main sites. I have 6 WAN routers connecting between these sites -please refer to the attached diagram-. I'm trying to achieve this redundancy through static routes by playing with the routes metric numbers (i.e. by assigning a lower number to my preferred primary route). The problem I faced with this design was b/ Routers 1 & 5... Router 1 should reach Router 5 through Link 1-5 first but if failed it should reach through Link 3-5 or 4-6, this is fine if Router 1 could detect the failure of Router 5 (i.e. Link 1-5 is the one which failed)... but what if the internal interface of Router 5 is what failed, Router 1 will keep trying to connect through Link 1-5!! Even if I configured a static route on Router 1 to go through Router 2, Router 1 will keep trying to reach netwrok 192.168.166.0 through Router 5 as the link is still up causing a loop between these 2 routers!!
This, on the other side, is the case when the internal interface of Router 5 fails while traffic is being routed to the 192.168.166.0 subnet from Router 3.
In summary: I want Site A to reach Site C through Link 1-5 but if failed, the alternative path should be Link 1-2 and then Link 3-5 or if Router 3 has a problem, Link 4-5 should be used instead.
Is this something that can still be achieved through static routes? Or should I be thinking of a Dynamic routing solution such as OSPF? Is there a way to force Link 1-5 to fail if the internal inteface of Router 5 failed (i.e. pairing interfaces together and failing one if the other one failed)?
If I should be using OSPF, can you please clarify how the configuration should be or can you redirect me to a document that could help me in my configuration?