多点接入网络要求掩码一致,不一致导致ospf邻居无法建立。以太网也是多点接入此时我们以sw1和r3为例进行演示说明。
一、ospf排错:多点接入网络要求掩码一致,不一致导致ospf邻居无法建立
以太网也是多点接入此时我们以sw1和r3为例进行演示说明:
- [sw1]display current-configuration interface vlanif 30
- ip address 10.1.30.10 255.255.255.0
- ospf enable 1 area 0.0.0.34
- [r3]display current-configuration interface g 0/0/0
- ip address 10.1.35.3 255.255.255.0
- ospf enable 1 area 0.0.0.35
r3和sw1正常建立ospf邻居关系
此时我们把sw1的vlan30接口掩码更改为30
- [sw1]interface vlanif 30
- [sw1-vlanif30]ip address 10.1.30.10 28
此时sw1和r3接口直连仍然可以正常ping通,但是ospf邻居建立失败
通过查看ospf error可以看到网络掩码不匹配:
此时我们把sw1的掩码还原为24即可正常建立ospf邻居关系
- [sw1]interface vlanif 30
- [sw1-vlanif30]ip address 10.1.30.10 24
二、点到点网络掩码不一致不影响ospf邻居关系建立
下面我们针对r3和r4之间的ppp链路进行不同掩码配置
掩码均为24,r3和r4正常建立ospf邻居关系
此时我们把r3的s2/0/0接口配置掩码为28
- [r3]interface serial 2/0/0
- [r3-serial2/0/0]ip address 10.1.34.3 28
此时r3和r4依然可以正常建立ospf邻居关系
友情链接