Routes doesnt get update after quagga restart

image

I have got a configuration where two OpenWRT routers are connected running quagga-ospf in both. I want R1 to learn routes from R2. So R1 never advertises its routes and R2 always advertises its routes. When I restart quagga in R1, R1 learns routes from R2. But when quagga gets restarted in R2, R1 loses all routes learnt from R2, despite having connectivity between them.

Below is the R1 Configuration:

/etc/quagga/ospfd.conf

password zebra
enable password password
!
!
!
!
interface wg_1
 ip ospf network non-broadcast
 ip ospf hello-interval 10
 ip ospf dead-interval 40
 ip ospf priority 0
!
!
!
!
router ospf
 ospf router-id 10.1.3.2
 network 10.1.3.0/24 area 0.0.0.10
 neighbor 10.1.3.1
access-list vty permit 127.0.0.0/8
access-list vty deny any
!
line vty
 access-class vty
!

/etc/quagga/zebra.conf

password zebra
!
access-list vty permit 127.0.0.0/8
access-list vty deny any
!
line vty
 access-class vty
 
interface wg_1
    multicast

Below is the R2 configuration:

/etc/quagga/ospfd.conf

hostname quagga-router
password zebra
enable password password
!
!
!
interface wg_1
 ip ospf network non-broadcast
 ip ospf hello-interval 10
 ip ospf dead-interval 40
 ip ospf priority 99
 ip ospf area 0.0.0.10
!
router ospf
 ospf router-id 10.1.3.1
 network 10.1.3.0/24 area 0.0.0.10
 neighbor 10.1.3.2
 redistribute connected
 redistribute kernel
 distribute-list KERNELOUT out connected
 distribute-list KERNELOUT out kernel
 access-list KERNELOUT permit 10.1.1.0/24
!
line vty
 no login
!

/etc/quagga/zebra.conf

! -*- zebra -*-
hostname Router
password zebra
enable password zebra
!
interface wg_1
 multicast
!
ip forwarding
!
!
line vty
!

When quagga is restarted in R2, R1 loses the route 10.1.1.0/24

Below are some of the output from the router R1.

show ip ospf neighbor


show ip ospf interface


show ip route

image
show ip ospf database
image
Its showing in the database but route is not getting added. what I'm doing wrong? Is any configuration missing?