所以我有一个奇怪的问题。如果我在以太网接口上配置一个 /30 ip,例如 Router1 上的 10.10.10.1/30 和 Router2 上以太网接口上的 10.10.10.2/30,我可以互相 ping 通... OSPF 没有问题(邻接是形成等)
但是,如果我删除这些配置并将每个 ip 分配给每个路由器上的 loopback0 接口,我将无法 ping 它们并且没有形成邻接。
我已经配置了 OSPF 并且接口被添加到区域 0。我不确定为什么会发生这种情况。如果您需要我的任何配置/输出,请告诉我。
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