组网如下:
MSR1与MSR2建立OSPF邻居
并且MSR1将直连路由11.11.11.11/32引入到OSPF路由中
关键配置如下:
MSR1
interface LoopBack0
ip address 11.11.11.11 255.255.255.255
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 1.1.1.2 255.255.255.0
ospf network-type p2p
ospf 1
import-route direct
area 0.0.0.0
network 1.1.1.0 0.0.0.255
MSR2
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 1.1.1.1 255.255.255.0
ospf 1
area 0.0.0.0
network 1.1.1.0 0.0.0.255
在MSR2中的OSPF的LSDB中可以看到11.11.11.11/32的LSA,但是MSR2的OSPF路由表中看不到11.11.11.11/32的路由
[MSR2]display ospf lsdb
OSPF Process 1 with Router ID 1.1.1.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 11.11.11.11 11.11.11.11 4 48 80000009 0
Router 1.1.1.1 1.1.1.1 756 36 80000008 0
Network 1.1.1.1 1.1.1.1 756 32 80000001 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 11.11.11.11 11.11.11.11 4 36 80000001 1
External 1.1.1.0 11.11.11.11 4 36 80000001 1
[MSR2]display ospf routing
OSPF Process 1 with Router ID 1.1.1.1
Routing Table
Routing for network
Destination Cost Type NextHop AdvRouter Area
1.1.1.0/24 1 Transit 0.0.0.0 1.1.1.1 0.0.0.0
Total nets: 1
Intra area: 1 Inter area: 0 ASE: 0 NSSA: 0
问题分析:
检查配置,发现MSR1与MSR2接口类型不一致,所以导致MSR2中的11.11.11.11/32的LSA无法被计算加入路由表,MSR1的接口类型是P2P,MSR2的接口类型默认是广播
MSR1
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 1.1.1.2 255.255.255.0
ospf network-type p2p
MSR2
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 1.1.1.1 255.255.255.0
解决方法:
将MSR1与MSR2的接口类型都改为一致即可,本例改为广播
但是现场组网中建议改为P2P,因为广播类型的接口要参与DR与BDR选举,所以OSPF中断到建立至少需要40秒的时间。
[MSR2]display ospf routing
OSPF Process 1 with Router ID 1.1.1.1
Routing Table
Routing for network
Destination Cost Type NextHop AdvRouter Area
1.1.1.0/24 1 Transit 0.0.0.0 1.1.1.1 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
11.11.11.11/32 1 Type2 1 1.1.1.2 11.11.11.11
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作