OSPF不同掩码与不同网络类型之间建立邻居
拓扑如下:
R1:
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
!
router ospf 1
R2:
interface FastEthernet0/0
ip address 12.1.1.60 255.255.255.128
ip ospf network point-to-point
ip ospf 1 area 0
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
router ospf 1
![](https://img2020.cnblogs.com/blog/2029945/202005/2029945-20200506221808563-937982799.png)
结论:
R1与R2 的掩码不同,但OSPF的网络类型为P-to-P或者P-to-MP的话可以正常建立邻居也可以正常
如果网络类型为Broadcast即要选举DR的话就不能建立邻居,因为会产生2类LSA,而2类LSA的内容就是描述掩码的,不一致的话不能建立邻居
拓扑不变
![](https://img2020.cnblogs.com/blog/2029945/202005/2029945-20200506221042824-1421222833.png)
R1:
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
ip ospf network broadcast
ip ospf 1 area 0
R2:
interface FastEthernet0/0
ip address 12.1.1.60 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
![](https://img2020.cnblogs.com/blog/2029945/202005/2029945-20200506222305385-1969396798.png)
结论:
如果两边的网络类型不一致,可以建立邻居但不会传递LSA信息
作者:tim54252
如果您看了本篇博客,觉得对您有所收获,请点击右下角的 [推荐]
如果您想转载本博客,请注明出处
如果您对本文有意见或者建议,欢迎留言
感谢您的阅读,请关注我的后续博客