So I have a weird issue. If I configure a /30 ip on an ethernet interface, for example 10.10.10.1/30 on Router1 and 10.10.10.2/30 on an ethernet interface on Router2, I can ping each other fine...no issues with OSPF (adjacency is formed, etc)
However, if I remove those configs and assign each ip to the loopback0 interface on each router, I'm unable to ping them and no adjacency is formed.
I have OSPF configured and the interfaces are added to area 0. I'm not sure why this is happening. If you need any configs/output from me, please let me know.
Router 1 - with private ip configured on ethernet interface as ptp link comes up fine.
---------
#sho ip ospf neighbor
Port Address Pri State Neigh Address Neigh ID Ev
8/21-8/22 10.10.10.1 1 FULL/OTHER 10.10.10.2 10.10.10.2 5
ethernet 8/21-8/22,OSPF enabled
IP Address 10.10.10.1, Area 0
OSPF state ptr2ptr, Pri 1, Cost 1, Options 2, Type pt-2-pt Events 3
Router 2
---------
#sh ip ospf neighbor
Port Address Pri State Neigh Address Neigh ID Ev
5/1-5/2 10.10.10.2 1 FULL/OTHER 10.10.10.1 10.10.10.1 14
If I switch to the loopbacks with the publicly routable ip, here is the output:
Router 1
--------
No ospf neighbor formation
lb2,OSPF enabled
IP Address 111.111.111.1, Area 0
OSPF state DR, Pri 1, Cost 0, Options 2, Type broadcast Events 5
Timers(sec): Transit 1, Retrans 5, Hello 10, Dead 40
DR: Router ID 111.111.111.1 Interface Address 111.111.111.1
BDR: Router ID 0.0.0.0 Interface Address 0.0.0.0
Neighbor Count = 0, Adjacent Neighbor Count= 0
#sh ip route 111.111.111.0
Total number of IP routes: 262007, avail: 137 (out of max 262144)
Destination NetMask Gateway Port Cost Type
111.111.111.0 255.255.255.252 0.0.0.0 lb2 1 D
Router 2
--------
No ospf neighbor formation
lb1,OSPF enabled
IP Address 111.111.111.2, Area 0
OSPF state DR, Pri 1, Cost 0, Options 2, Type broadcast Events 11
Timers(sec): Transit 1, Retrans 5, Hello 10, Dead 40
DR: Router ID 111.111.111.2 Interface Address 111.111.111.2
BDR: Router ID 0.0.0.0 Interface Address 0.0.0.0
Neighbor Count = 0, Adjacent Neighbor Count= 0
#sh ip route 111.111.111.0
Total number of IP routes: 262119, avail: 21 (out of max 262144)
Destination NetMask Gateway Port Cost Type
111.111.111.0 255.255.255.252 0.0.0.0 lb1 1 D