How do I set up a backup static route on a linux router. For example if I have 2 routers R1 and R2, connected through a switch, through two links:
R1(eth1)->switch->R2(eth1)
R1 (eth2)->switch->R2(eth2)
Behind router R2 is a LAN(LAN A) How do I set two routes to LAN A from R1, one that uses a main next hop the eth1 from R2, and one that uses a secundary next hop the address from eth2 from R2. Something like when the main next hop is unavailable, the secondary route should be used. Could someone please help me? Thanks
[EDIT] Should I use different metrics when creating the two routes?
[EDIT2]