I have build a GRE tunnel between RouterA and RouterB.
There is a OSPF1 router connect to RouterA with ethernet cable
another OSPF2 router connect to RouterB
with ethernet cable
all these four router are eanble OSPF
however OSPF1 router can only form neighbor with RouterA
RouterA can form neighbor with RouterB and
RouterB can form neighbor with RouterA and
OSPF2 router can only form neighbor with RouterB
Could anybody help me, what wrong with configuration that OSPF1 router cannot form OSPF neighbor with OSPF2.
Perhaps the original poster can clarify what the network topology is (what connects to what). So far I understand that OSPF1 connects to routerA via Ethernet, that OSPF2 connects to routerB via Ethernet. It is not clear how routerA connects to routerB other than by GRE tunnel. It is not clear whether OSPF1 connects to anything other than routerA or whether OSPF2 connects to anything other than routerB.
So far it sounds like OSPF is working as it should. A router can form neighbor relationship only with routers to which it is connected. So far it sounds like OSPF1 only connects to routerA and OSPF1 only forms neighbor relationship with routerA (this is normal). It sounds like routerA connects to both OSPF1 and routerB and it forms neighbor relationship with OSPF1 and routerB (this is normal). It sounds like routerB connects to routerA and to OSPF2 and it forms neighbor relationship with routerA and OSPF2 (this is normal). And it sounds like OSPF2 connects only to routerB and it forms neighbor relationship only with routerB (this is normal).
I am not sure that there is any problem. If there is a problem then the original poster needs to help us understand what the problem is.