Why OSPF Router Does Not Have Neighbors

ciscoospfrouter

I have two Routers in the Cisco Packet Tracer:

enter image description here

Router2-1, Router2-2, Router2-3 all have their own loopback 0 with IP address 1.1.1.1, 2.2.2.2, 3.3.3.3.

I only launched the OSPF progress in the Router2-1's Gig0/0/0 port and annunciated .

There is in the running-config:

......
!
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 0.0.0.0 area 0
!
......

there is no neighbor in the Router2-1:

Router#show ip ospf neighbor 

Router#

In logically speaking, there should have a neighbor of Router2-2, why there is none.


EDIT-01

But, however, after I launched the OSPF 1 in the Router2-2's Gig0/0/0, the Router2-1 still can not find the OSPF neighbor.

Router#show ip ospf neighbor 

Router#

and, in the Router2-2's running-configuration:

...
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 0.0.0.0 area 0
!
...

how can I know which interface launched the ospf 1?

the Router2-1 ospf database:

Router#show ip ospf database 
            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         34          0x80000001 0x00510c 0

the Router2-2 ospf database:

Router#show ip ospf database 
            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         325         0x80000001 0x000550 0

but each other show the ospf neighbor all get empty result.

Router#show ip ospf neighbor 

Router#

EDIT-02

In my Router2-2, the interface:

Router>show ip interface brief 
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0/0   192.168.1.1     YES manual up                    up 
GigabitEthernet0/0/1   192.168.2.1     YES manual up                    up 
Loopback0              2.2.2.2         YES manual up                    up 
Vlan1                  unassigned      YES unset  administratively down down

Best Answer

If you have IP addresses configured correctly on router's interfaces, you should be good to go. But! Change your network configuration in OSPF section to this:

router ospf 1
 network 0.0.0.0 255.255.255.255 area 0

OSPF network statement uses wildcard, not netmask.

[EDIT]

As mentioned by Ron Maupin, real devices are able to detect user intention and build neighbor relation even with network 0.0.0.0 0.0.0.0 area 0.

Proof:

enter image description here

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.0
 duplex full
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0


R1#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:26    10.1.1.2        FastEthernet0/0


R1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/2] via 10.1.1.2, 00:14:28, FastEthernet0/0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, FastEthernet0/0
L        10.1.1.1/32 is directly connected, FastEthernet0/0

PacketTracer unable to recognize the situation :

enter image description here

R2#sh ip ospf neighbor 

R2#