Add alternate route

Following is my network diagram

My question is:
How to add route so that Router 3 can reach router 2 through router 1 AND vice versa
[Shown in green]

I think you have the concept of WAN incorrect according to your drawings. Technically you have just interfaces, one of which is a private ip range 10.x.x.x( not routable on the internet ), and your 20 & 30 ranges technically routable on the internet

Anyhow, you need a 3rd set of IP's on each interface of routers that are directly connected as your current (wan)IP's are a subnet range to themselfs.

Ideally you would use /30 subnets and that both sets of routers on the connection are within the same subnet. You would then manually enter IP routes in each router so they know how to get to each other.
That said, no idea why you would then want a GRE once you set up static routes. The other option would be a routing protocol like RIP/OSPF/BGP to link them together.


Anyhow:

For simplicity, I will assume the following IP assignments for the /30 subnets between the routers:

Router 1 to Router 2:
IP for Router 1: 10.0.0.1/30
IP for Router 2: 10.0.0.2/30

Router 2 to Router 3:
IP for Router 2: 10.0.0.5/30
IP for Router 3: 10.0.0.6/30

Router 3 to Router 1:
IP for Router 3: 10.0.0.9/30
IP for Router 1: 10.0.0.10/30


Router 1 Configuration:

ether1 will be connected to Router 2 with IP 10.0.0.1/30.
ether2 will be connected to Router 3 with IP 10.0.0.10/30.

Commands for Router 1:

/ip address add address=10.0.0.1/30 interface=ether1
/ip address add address=10.0.0.10/30 interface=ether2

Router 2 Configuration:

ether1 will be connected to Router 1 with IP 10.0.0.2/30.
ether2 will be connected to Router 3 with IP 10.0.0.5/30.

Commands for Router 2:

/ip address add address=10.0.0.2/30 interface=ether1
/ip address add address=10.0.0.5/30 interface=ether2

Router 3 Configuration:

ether1 will be connected to Router 2 with IP 10.0.0.6/30.
ether2 will be connected to Router 1 with IP 10.0.0.9/30.

Commands for Router 3:

/ip address add address=10.0.0.6/30 interface=ether1
/ip address add address=10.0.0.9/30 interface=ether2

Static Routes Setup:

On Router 1:
To reach Router 3, add a route via Router 2:

/ip route add dst-address=10.0.0.6 gateway=10.0.0.2

To reach Router 2 (directly connected):

/ip route add dst-address=10.0.0.2 gateway=10.0.0.1

On Router 2:

To reach Router 1, add a route via Router 3:

/ip route add dst-address=10.0.0.10 gateway=10.0.0.6

To reach Router 3 (directly connected):

/ip route add dst-address=10.0.0.6 gateway=10.0.0.5

On Router 3:

To reach Router 2, add a route via Router 1:

/ip route add dst-address=10.0.0.2 gateway=10.0.0.10

To reach Router 1 (directly connected):

/ip route add dst-address=10.0.0.10 gateway=10.0.0.9

I have done the above, What i am asking is, can i add alternate route, so that if one of the two GRE Tunnel is down due to internet down because of ISP then i can reach 2nd router through 1st router from 3rd Router
I have edited the image so people can understand my question easily

How are Router 1 and Router 2 connected? Which router receives what address from the other one as de facto WAN? An export of the configuration of one or both routers would be quite helpful:

export file=anynameyouwish

All three routers have to have WAN connections to reach each other.
If one router goes down, then it is no longer in play period. The other two can still reach each other.

The exception to the above, which may be a possibility in your case ( vague diagrams ), is if two routers of the routers can be connected physically to each other, like in the same room. If one of them goes down, the other can be used for connectivity to the WAN for both routers.

What is not possible is tunneling without any internet UNLESS it has physical access to another router (that has a wan connection) to go through.

It actually the same as any other multi-wan failover case. So easiest approach is increase the 0.0.0.0 default gateway’s distance= to a higher number than the primary default route (distance=1 is default, so backup could be distance=2).

If just using GRE for a particular subnet, it’s stlll same distance= trick on any /ip/route… Because if two/more routes have same dst-address=, since only one route can active, and it’s the one with lowest distance (if dst-address= & distance= same in /ip/route, that’s load balanced ECMP route, but different topic)

As killersoft explains, you need IP addresses, in unique subnets, on each end of the GRE tunnel. And the far end’s IP is what to use in the gateway= for the default route (or subnet). Although he’s right to you can using /30, using /32 might be easier. This requires setting network= on the GRE IP addresses. (And, /31 are not supported AFAIK, although that might be even clear from pure IP routing POV, the /32 is functionally the same).

I didn’t test this, but this should be close – assuming I understand the problem that is

Router1
/interface/gre add name=gre2 local-address= remote-address=
/interface/gre add name=gre3 local-address= remote-address=
/ip/address add interface=gre2 address=172.22.1.2 network=172.22.2.1
/ip/address add interface=gre3 address=172.22.1.3 network=172.22.3.1
/ip/route add dst-address=192.168.3.0/24 gateway=gre3 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.2.0/24 gateway=gre2 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.2.0/24 gateway=gre3 distance=2
/ip/route add dst-address=192.168.3.0/24 gateway=gre2 distance=2

Router2
/interface/gre add name=gre1 local-address= remote-address=
/interface/gre add name=gre3 local-address= remote-address=
/ip/address add interface=gre1 address=172.22.2.1 network=172.22.1.2
/ip/address add interface=gre3 address=172.22.2.3 network=172.22.3.2
/ip/route add dst-address=192.168.1.0/24 gateway=gre1 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.3.0/24 gateway=gre3 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.3.0/24 gateway=gre1 distance=2
/ip/route add dst-address=192.168.1.0/24 gateway=gre3 distance=2

Router3
/interface/gre add name=gre1 local-address= remote-address=
/interface/gre add name=gre2 local-address= remote-address=
/ip/address add interface=gre1 address=172.22.3.1 network=172.22.1.3
/ip/address add interface=gre2 address=172.22.3.2 network=172.22.2.3
/ip/route add dst-address=192.168.2.0/24 gateway=gre2 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.1.0/24 gateway=gre1 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.1.0/24 gateway=gre2 distance=2
/ip/route add dst-address=192.168.2.0/24 gateway=gre1 distance=2

I just noticed router1 and router2 are the same room…

But the same approach would work to keep pure Layer3 static routing, just without GRE between Router1 and Router2

Router1
/interface/gre add name=gre2 local-address= remote-address=
/interface/gre add name=gre3 local-address= remote-address=
/ip/address add interface= address=172.22.1.2 network=172.22.2.1
/ip/address add interface=gre3 address=172.22.1.3 network=172.22.3.1
/ip/route add dst-address=192.168.3.0/24 gateway=gre3 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.2.0/24 gateway=172.22.2.1 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.2.0/24 gateway=gre3 distance=2
/ip/route add dst-address=192.168.3.0/24 gateway=172.22.2.1 distance=2

Router2
/interface/gre add name=gre1 local-address= remote-address=
/interface/gre add name=gre3 local-address= remote-address=
/ip/address add interface= address=172.22.2.1 network=172.22.1.2
/ip/address add interface=gre3 address=172.22.2.3 network=172.22.3.2
/ip/route add dst-address=192.168.1.0/24 gateway=172.22.1.2 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.3.0/24 gateway=gre3 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.3.0/24 gateway=172.22.1.2 distance=2
/ip/route add dst-address=192.168.1.0/24 gateway=gre3 distance=2

Router3
/interface/gre add name=gre1 local-address= remote-address=
/interface/gre add name=gre2 local-address= remote-address=
/ip/address add interface=gre1 address=172.22.3.1 network=172.22.1.3
/ip/address add interface=gre2 address=172.22.3.2 network=172.22.2.3
/ip/route add dst-address=192.168.2.0/24 gateway=gre2 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.1.0/24 gateway=gre1 distance=1 check-gateway=ping
/ip/route add dst-address=192.168.1.0/24 gateway=gre2 distance=2
/ip/route add dst-address=192.168.2.0/24 gateway=gre1 distance=2


BUT… if Router2 and Router1 are in SAME room directly connected & redundancy is the goal… Using bridging+VLANs and using 2 VRRP interfaces (one for each 192.168.1.0/24 and 192.168.2.0/24) likely be better approach & pretty simple since you can set Router1 can be VRRP master for 192.168.1.0/24, and Router2 can be master for 192.168.2.0/24, so that each LAN goes out the local WAN by default. The GRE stuff be same to Router3 even with VRRP between Router1 and Router2.