Branch is connected to headoffice and DR site . It has got multiple tunnels one pointing to HO and other pointing to DR .
When we check Headoffice ( WAN 2 router ) for show ip route 192.168.18.0 which is branch IP it shows that route is getting learned from direct tunnel and route is considered as intra area . It shows Intra area because the outside interface is advertised with area 300 even though the inside is in area 0 . This makes WAN 2 work as ABR .
However when I do show ip route 192.168.18.0 from WAN 1 it shows route as Inter area because that route is getting learned from WAN 2 inside interface so both becomes area 0 .
DR link from DR to HO and terminated that on WAN 1 . Aim is that if WAN1 and WAN2 links fail then branch should be accesiable through DR link . Routing is configured for DR to HO however when I do show ip route 192.168.18.0 on WAN 1 it starts learning routes from DR as first priority ( Intra area ) while my aim was to get it learned from Headoffice link ( considered as Inter area for other devices and intra area for WAN 2 ) . Only if Headoffice link fails then it should learn through DR
increase the ip ospf cost on interface. ( set the Lower value of IP ospf cost on DR router towards WAN1 link). So it will take the first path as Head Office(WAN2) router.. If WAN 2 fails.. it will go for DR..( also reduce ospf cost b/w WAN2 & WAN 1)
I do not believe that increasing costs on interface will help here.
The original poster has indicated that the 192.168.18.0/24 is learnt as intra-area route on WAN1. Because OSPF strictly prefers intra-area routes to inter-area routes, changing the link costs is useless.
I wonder, however, how is it possible that WAN1 router learns about this network as an intra-area route. That would mean that WAN1 router already has a link in the area 300 and is also an ABR. That, however, contradicts what the original poster had indicated earlier: "However when I do show ip route 192.168.18.0 from WAN 1 it shows route as Inter area because that route is getting learned from WAN 2 inside interface so both becomes area 0 . "
Perhaps the original poster can clarify this better. In any case, a better topology picture would be helpful. In particular, I would like to see the individual tunnels and OSPF adjacencies between routers including better information about areas and their boundaries.
Here is a revised diagram . Even though WAN 1 has tunnels to other branches I have removed link in this latest diagram as it will create confusion and those tunnels are not related to this problem .
Branch communicates to WAN 2 using tunnel
Branch communicates to DR Site using tunnel
This issue is not related to ospf cost , it is related to inter and intra area routes . If i connect DR link to WAN 2 rather than WAN 1 then things would become fine as both routes would be of same type and selection would be done using metric calculation .
However due to some limitations I have to terminate this link on some other device i.e. WAN 1 or Switch ( below drawn ) .
In current case if I change DR from area 300 to area 0 would it be helpful ?
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...