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

 

 

 

 结论:

R1与R2 的掩码不同,但OSPF的网络类型为P-to-P或者P-to-MP的话可以正常建立邻居也可以正常

如果网络类型为Broadcast即要选举DR的话就不能建立邻居,因为会产生2类LSA,而2类LSA的内容就是描述掩码的,不一致的话不能建立邻居

拓扑不变
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
!

 

 结论:

如果两边的网络类型不一致,可以建立邻居但不会传递LSA信息

 
 
posted @ 2020-05-06 22:24  tim54252  阅读(1739)  评论(0编辑  收藏  举报