OSPF over Unnumbered Link
The only time that OSPF forms adjacency between neighbors that are no reside on the same subnet is when the neighbors are connected through an unnumbered point-to-point link. When enabling OSPF on an unnumbered interface, use the address-wildcard-mask pair of the primary physical interface which the unnumbered interface relies upon.
Note: OSPF does not work if one side unnumbered while the other side numbered on a link, as this would create discrepancy in the OSPF database and prevents routes from being installed into the routing table.
Below shows the OSPF neighbors, IP routing table, and OSPF database on RT1:
RT1#sh ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 220.127.116.11 0 FULL/ - 00:00:33 172.16.2.1 Serial0/0 RT1# RT1#sh ip route Gateway of last resort is not set 18.104.22.168/32 is subnetted, 1 subnets C 22.214.171.124 is directly connected, Loopback0 126.96.36.199/32 is subnetted, 1 subnets O 188.8.131.52 [110/65] via 172.16.2.1, 00:00:34, Serial0/0 172.16.0.0/24 is subnetted, 2 subnets C 172.16.1.0 is directly connected, FastEthernet1/0 O 172.16.2.0 [110/65] via 172.16.2.1, 00:00:34, Serial0/0 RT1# RT1#sh ip ospf database OSPF Router with ID (184.108.40.206) (Process ID 100) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 220.127.116.11 18.104.22.168 58 0x80000002 0x00C835 3 22.214.171.124 126.96.36.199 61 0x80000001 0x00B73E 3 RT1#