未作point-to-point 配置之前
--------------------------------------------------------------------------------->>
我们会发现学习到对方loopback地址永远是/32位,原因是OSPF默认设置了Loopback地址的网络类型,并且把loopback地址当成一个stub主机。
我尝试过使用summery-address、和通告是使用1.0.0.0 0.255.255.255 ,但是结果一样学习到对方loopback地址永远为/32
R1#show ip ospf interface loopback0
Loopback0 is up, line protocol is up
Internet Address 1.1.1.1/8, Area 0
Process ID 1, Router ID 1.1.1.1,
Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 10.0.0.2, 00:08:59, Ethernet0
C 10.0.0.0/8 is directly connected, Ethernet0
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 10.0.0.1, 00:07:28, Ethernet0
C 2.0.0.0/8 is directly connected, Loopback0
C 10.0.0.0/8 is directly connected, Ethernet0
做了 point-to-point 配置之后
------------------------------------------------------------------------------------------>>
R1#show ip ospf interface loopback0
Loopback0 is up, line protocol is up
Internet Address 1.1.1.1/8, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
No Hellos (Passive interface)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Loopback0
O 2.0.0.0/8 [110/11] via 10.0.0.2, 00:00:53, Ethernet0
C 10.0.0.0/8 is directly connected, Ethernet0
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
O 1.0.0.0/8 [110/11] via 10.0.0.1, 00:01:47, Ethernet0
C 2.0.0.0/8 is directly connected, Loopback0
C 10.0.0.0/8 is directly connected, Ethernet0